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.
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?