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.