| Pre-requisite:This workflow example was created using following configuration | |||
| Visual studio 2008 | |||
| .net Framework 3.5 | |||
| Article assumes that the user understands the difference between sequential workflow and State machine workflow. For an overview please refer | |||
| Sequential Workflow:http://msdn.microsoft.com/en-us/library/ms735937.aspx | |||
| State Machine Workflow:http://msdn.microsoft.com/en-us/library/ms735945.aspx | |||
| Getting started | |||
| Whoever are old .net developer using Visual studio, can relate a WF development similar to the way you develop a webservice ie. You create a webservice and expect a application(usually a asp.net application) to host it,similarly WF service is created and expect a host application to call that service. However Webservice and WF are completely different and are nowhere interchangeable.I will divide this article into 3 parts, | |||
| 1. Creating a WF, we will look into sequential Console application | |||
| 2. Create a Host application (an asp.net application). | |||
| 3. How Host and WF will communicate with each other. | |||
| Creating a Sequential Workflow | |||
| Steps | |||
| 1. Open visual studio File > New project. | |||
| 2. Select c# ->Workflow-> Sequential Workflow Console application. | |||
| 3. Give appropriate project name (I gave it as CallAnalysis.WF) | |||
| Figure1 | |||
| 4. The project will create Workflow1.cs, Workflow1.designer.cs, and Program.cs. Selecting the design mode for Workflow1.cs will show you an empty sequential workflow.(figure1) | |||
| Business scenario | |||
| Now before we continue lets create our business scenario or objective or functionality that the WF will do. Let’s say you are working as a support analyst for an application where you get calls from application users. Calls can be divided as Incidents and Service request. Further incident can be divided into critical, high and medium and Service request is divided into severity1, severity2 and severity3. | |||
| Figure 3 | |||
| Now let’s maps the scenario to our workflow application. To make things simple we will use the if-else activity and code activity only. | |||
| 1. Open Tool box and drag the if-else between | |||
| |||
| Figure 4 | |||
| 2. Give appropriate names to the ifelseActivity1, ifelseBranchActivity1 and ifelseBranchActivity2. In the drop activity for ifelseBranchActivity1 add an if-else activity. Name the controls as shown below. |
Showing posts with label WF. Show all posts
Showing posts with label WF. Show all posts
Tuesday, September 8, 2009
Workflow foundation (WF): Creating a Simple sequential workflow with ASP.NET.
Subscribe to:
Posts (Atom)