WWF <Article 2>

Source: Internet
Author: User
I. Ordered Workflow

Ordered activities are the most basic and simple container-type activities in WWF workflows. Ordered activities can be used as branches of many other activities.

  

Code:

Private void codeexecute1 (Object sender, eventargs e) {console. writeline ("sequence workflow Step 1! ");} Private void codeexecute2 (Object sender, eventargs e) {console. writeline (" sequence workflow Step 2! ");} Private void codeexecute3 (Object sender, eventargs e) {console. writeline (" step 3 of sequential workflow! "); Console. readkey ();}

Effect:

  

Ii. ifelse

An ifelse activity is a container-type activity. Each branch of an ifelse activity consists of ordered activities. When designing a workflow, if you encounter logic judgment, you can implement it through ifelse activities.

  

In the toolbox, drag an ifelse and select "code condition" for the attribute "condition. Then, a condition is added. Enter the event name" ifelsebranch1judge "and press enter to enter the judgment code.

Private int icondition = 90; Public workflow1 () {initializecomponent ();} private void ifelsebranch1judge (Object sender, conditionaleventargs e) {// less than 10, then take this line E. result = icondition <10;} private void codeactivityappsexecutecode (Object sender, eventargs e) {console. writeline ("line less than 10");} private void codeactivity2_executecode (Object sender, eventargs e) {console. writeline ("line greater than 10"); console. readkey ();}

  If there are only two branches and the first branch is not met, the second branch is automatically followed. When there are multiple branches, the last one is automatically executed if the previous one is not met.

  

If the rules are declared, the method is as follows:

  

3. While

While activity is a container-type compliant activity, which is a typical rule-based workflow mode.

While activity has a key attribute "conditions". This property page also provides two methods to define its cyclic judgment conditions, they are "code condition" and "declarative rule condition" respectively. They are used in the same way as the logic judgment defined in the ifelse activity.

 

WWF <Article 2>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.