Advanced Workflow mode in-depth business scenario analysis (1) -- multiplexing

Source: Internet
Author: User

Opening part

(1) Description

Two or more branches are merged into a single subsequent path, and each enable entry to the branch activates an execution thread in the subsequent path. Although multiple branches are merged graphically, this multi-path merge does not synchronize any subsequent threads activated by these branches.

(2) abstract model description

Multi-channel merged Flash Animation

In, B and C are the branches after multi-path selection. There can be more than two such branches. Assume there are also E, F ......, Such branches are not synchronized in the multi-path selection. Each branch will activate the execution of d once, that is, D (B), D (C), D (e )......, These D threads do not interfere with each other.

(3) Business scenario examples

The reimbursement process is divided into three parts: accommodation fee, transportation fee, and special plane ticket reimbursement. Possible situations include: accommodation fee + transportation fee; accommodation fee + transportation fee + special plane ticket reimbursement; transportation fee + special plane ticket reimbursement ......

At the beginning of the process, fill in the reimbursement application (select the reimbursement content and select among the three expenses), and then activate the branches that fill in different reimbursement forms based on the selected content, at last, each reimbursement form must be approved.

If the process engine does not implement multi-channel merge, we can implement the above functions in disguise. For example:

However, the above implementation has the following shortcomings:

A. Repeat the workload. Approval is clearly the same activity, which must be divided into multiple ones;

B. statistics cannot be made. If you want to perform statistical analysis on the time, quantity, and other information of the approval activity, it is difficult to make statistics after being divided into multiple activities.

C. Resource allocation. Assume that a job is responsible for approval and the job stress should be balanced in this job, after being divided into multiple activities, this resource cannot be allocated.

(4) Implication

The subsequent path of multi-channel merge is the execution thread with the same behavior, which is similar to the multi-instance mode in another mode. When these threads need to be synchronized at the end, this synchronization is very complicated in the business scenario. For example, if the subsequent steps are certification, this type of business can be divided into the following situations. We will give an example one by one:

A. Force One-on-one: if a financial credential is generated for a single approved document, the threads of these multiple instances are not synchronized for the time being and are left for subsequent steps. This management method is common.

B. Mandatory multiple-to-one: the reimbursement documents generated for the same reimbursement application must be generated on a financial credential. Therefore, you must synchronize the certificate before making the certificate. This management method is common.

C. Any many-to-many: In this scenario, this is unlikely to happen, but it is very common in the general logistics business. Assume that the plane ticket is strictly approved and delayed for a long time. If the other two tickets are approved earlier, the two tickets are first generated with the same financial credential. Such arbitrary rules are generally determined by humans.

Related Article

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.