Workflow notes
WF – Workflow. Graphical Representation that defines a set of tasks or processes that produce a result
Workflow principles
- Coordinate work done by people and software
- Long running and stateful
- Automate business processes
- Graphically build workflow
1. Workflow – Can be either Sequential or State machine workflow.
Sequential workflow
- Activities executed in well-defined order
- It may involve branching or looping of activities
- Contains a set of states
- First state represents start state, Last state represents final state
- Event driven model
3. Custom Activities – Develop custom workflows based on business needs
4. Host process – Workflow cannot run as a standalone product. A host process can be Windows Forms or Web Services or Web Services
5. Runtime Engine – Responsible for executing workflow instance
6. Runtime Services – Important services are
- Persistence Services – Save the state of workflow
- Tracking Services – Enable developers to monitor workflow
- Transaction Services – Provide transaction support needed for data integrity
1. Create a simple sequential workflow console application as shown below
2. Add a While loop
3. Add an if else activity for the while loop
4. Add a code activity for if-else/while loop as shown below
5. Add code as shown in below pic, Declare rollNumbers, marks
6. Add a Declarative Rule Condition and enter the condition
7. Add Code for first If-Else
8. Add Code for Second If-Else
9. Add code for code activity as below
10. Build the application. Workflow result as shown in console window
More Reads - WF4: How to Unit Test a Workflow that calls a WCF Service
Happy reading.....
No comments:
Post a Comment