WWF workflow learning notes (2)

Source: Internet
Author: User

There are two types of workflows in WWF: sequential workflows and state machine workflows. Like me, many people who are new to WWF may be confused about when to choose a sequential workflow, when should I select a state machine workflow?

Sequence workflow is the most understandable concept of a workflow. For example, registration> Medical Treatment> payment> drug retrieval is a typical sequence workflow, with the Sequential workflow model, you can easily model this scenario.

However, in reality, there are still some procedures that may not be so simple. Consider a defect management system. When a tester discovers a BUG, creates a defect, and assigns it to a developer, then he solved the BUG change and returned it to the tester for regression testing. After the tester confirmed that the BUG was resolved, he closed the BUG. This scenario looks similar to the registration process. However, the actual situation is probably like this. The tester found a BUG and assigned it to the developer Bill. After reading the Bug, Bill said: this is not my problem, this is from Clive. Then, the Bug is reassigned to the Clive. Or, Bill says, the tester has made a mistake. This is not a Bug at all. Then the Bug was rejected. Or Bill asks the tester for more detailed information. Or, Bill was in a good mood today and handled the Bug. Or the original tester went out and another tester took over the regression of the Bug. Or the tester opens a defect that should not be opened. Each participant may make a jump to any other step in a bunch of options. How can I design this sequence workflow?

In the face of such problems, using a state machine workflow is a better choice. You can set every state of a Bug to a Stage. The workflow is switched between States. You can easily use State Machine Workflow to model this process.

So, under what circumstances does a workflow have a simple judgment basis?

Cave provides a simple criterion: Do some important choices that affect the workflow occur outside the workflow )? Is it controlled by users? If so, it would be a headache to use the concept of sequential workflow for modeling. The state machine workflow selects the desired workflow status from outside the workflow.

Why is the state machine workflow more suitable for this situation? The root cause is that the sequential workflow is essentially modeling the workflow path, and the path information is encoded into the model. However, in some cases, we do not care about the workflow path. We only care about the current workflow status and what possible options will jump to another status. If we must use a sequential workflow to describe this situation, many complex path flows will be drawn, but these complex paths are not the problem domain we are concerned about. This results in a waste of development costs.

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.