have been curious about WF learning, hey, today will not, I have to contact the WF project, just began to search for WF new project on Baidu process, found that few such instances let me learn to operate, I want to give me a big project I also can not know how to operate, Because the contact is the site and management system production, so now the WF can only be small white, but in my study I saw the hope, the following simple summary of how I create a simple WF example, let him in the form of work flow up, hey.
I. Procedure for the purpose of creating a new workflow item
1. First create a new solution, then select Workflow in Visual C #, then make a "Workflow console Application" and give the project a name Wfdemo, as follows:
2. The creation is completed as follows, In the project will generate a file Workflow1.xaml, it is the main file of our production workflow, on the right side of the desktop is our choice of tools, it has the system comes with, there are also we can add, of course, we added is a class library.
3. Here we create a switch ... Case ... The practice of sentence judgment
first select the sequence in the control flow, double-click to
4. The Sequence class library appears on the desktop, and then we double-click sequence on the desktop to select the Flowchat tool, and double-click Flowchat will appear as shown in the following 2:
5. Then select the Switch<> tool that will appear on the desktop as shown below, then we select the parameter to pass in the string type
6. And so on, add multiple tools, and in which variables can be defined first, for example: variable num is the defined global variable, and the next complete design format is as follows:
7. Click Start to output the results we want on the console
Flowchart enables the modeling process with a single execution path and loops and loops back to the previous execution point ;
Switch<> executes one of its children for the result of execution;
Assign is assigned a value for a variable or parameter;
WriteLine writes text to the textwriteR.
Well, here it is, Hey, easy to create and use, first we know how to create a WF project, and then according to the process of the project go, it seems that WF more suitable for a management system, specific I still want to continue to work hard, refueling refueling.
Initial learning and creation of WF