In this task, we will create a sample that will use the Parallel activity. The Parallel activity can execute its child activities in parallel, asynchronously.
Create a new Workflow Console Application under solution
Chapter02and name the project as
Workflow1.xamland create a workflow as shown in the following screenshot:
Set the properties of both Delay activities:
UsingParallelActivityas StartUp project. Press CTRL+F5 to build and run the workflow without debugging.
Workflow execution starts from Sequence1, then there is a delay of 5 seconds and the execution of Parallel will shift to the Sequence2 branch immediately. Now Sequence2 will delay for 5 seconds and the execution shift to the Sequence1 branch again, and now, both Sequence1 and Sequence2 are in a delaying state. The whole Parallel activity will wait there until one of them awakes....