In this simple WF Application i am going to loop through 1 to 10
First Create new Sequential Workflow Console Application project.
Now Drag and Drop WriteLine Activity from Tool box . Press F4 and Edit Text Property (Enter the Text in “”). Next Drag and Drop While Activity from the Toolbox.
Note: WriteLine Activity is used for to write some text in Console.
Inside the while activity now Drag and Drop Sequence activity so that we can add more then one Activity inside While. In while activity we need to set the condition so first we need to create Variables called counter, number and use Assign activity to manipulate the counter variable as shown below.
Now Drag and Drop If Activity and edit the condition and Drag and Drop WriteLine Activity in both Then and Else part as shown. change the DisplayName of the WriteLine Activity as shown below.
Here is the XAML View of the above Work Flow . the same workflow we can write in C#/VB Code too.
Now Press F5 we should we see the following Result.
Nandri( Thanks)
R.SeenivasaRagavan,
1 comment:
Hi,
Can you tell me some "real-world" examples of sequential workflow and state machine workflow?
Post a Comment