Invoking External Workflows with InvokeWorkflow

Here is a question for you: if you have an executing workflow, can that workflow execute a second workflow?

The answer is yes! There is an activity, InvokeWorkflow, that’s used to start a secondary workflow. Let’s briefly take a look at this activity by way of an example. We’ll create a new sample console application that starts a workflow that merely writes a message to the console. After writing this message, the workflow instance starts a second workflow instance that also writes a message, graphically showing us that both workflows executed.

Invoking a secondary workflow

  1. Although we could build a fancy demonstration application, we’ll revert to using a simple console application as we’ve done in ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.