General Workflow Questions

Welcome Forums General PowerShell Q&A General Workflow Questions

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
8 months, 1 week ago.

  • Author
    Posts
  • #95347

    Participant
    Points: 45
    Rank: Member

    I've been working on a migration workflow that connects to Exchange Online to migrate mailboxes and then copy the contents of the original mailbox to the new mailbox.

    Background Info:
    A script requests input from the user, imports the workflow, registers several ScheduledJob jobs, and then starts the workflow. The workflow has several steps, including ones using New-MoveRequest and Search-Mailbox. None of these steps execute in parallel. Each step updates the ArgumentList of a ScheduledJob. The ScheduledJob contains all of the logic to perform the particular step and outputs the status of all actions. A job instance is created using Start-Job -DefinitionName . The workflow formats the output of the jobs and saves to a log file.

    I have a few questions.

    1) Is is possible to connect to a workflow session to see current activity processing?

    2) Is it possible to view the data generated by Checkpoint-Workflow or Suspend-Workflow?

    3) What happens to background jobs started within a scheduled job that is started by the workflow? Is it possible to access the data for these jobs outside the workflow?

    4) If the host running the workflow crashes or restarts, I realize I would need to Resume-Workflow. If a workflow containing a scheduled job that was started which established an Exchange Online session, which in turn started a job in the remote session for Search-Mailbox, would those jobs continue?

    Thanks,
    Dave

  • #95373

    Keymaster
    Points: 1,625
    Helping HandTeam Member
    Rank: Community Hero

    1. Not really. It's not a "session;" it's Windows Workflow Foundation.

    2. It's fairly buried in WWF, but it is on-disk someplace. Probably in XML.

    3. Not usually. Again, WWF runs things, not PowerShell.

    4. Unlikely, and they'd be "detached" anyway. WWF has a very complex and odd set of rules, but basically everything you do in a workflow needs to be atomic, not a spun-off thread running on its own.

The topic ‘General Workflow Questions’ is closed to new replies.