07 connection with the gateway

First, the connection

May be provided in the flow connection id and name, the setting conditions Main config connection may decide which branch.
When the node completes the task, we need to bring the process variable to control the direction of flow.
 

 

 

 

Second, the gateway (ExclusiveGateway)

In fact, that white is the gateway event flow one core node, which need to make a judgment, if it is determined in line with a certain logic, then the event will flow to the right path up, we had branches. And to make a judgment of nodes is called the gateway.

1, an exclusive gateway

Branch operation:
(1) If the reimbursement amount is greater than 500, 1,000 or less, the task flow to the department manager for approval;
(2) if the amount is less than or equal to 500 reimbursed, the default flow to Treasury approval;
(3) If the reimbursement amount is greater than 1000, the task flow to the general manager for approval;
The default gateway setting exclusive branching, connection ID provided herein may be used to visualize the default connectivity options:
 

 

 

The problem can not be deployed to explain (stepped hole):
If the transfer conditions on the default branch connection and exclusive gateway, select the default branch, the deployment is unsuccessful.
Solution:
① If the branch condition set in the default branch connection, the branch in a row he does not set the default gateway.
② If you set the default branch in the exclusive gateway is not set branching conditions turn even longer.
After a successful deployment, set process variables during the boot process can be carried out transfer process.

2, parallel gateway (ParallelGateway)

2.1 What is the parallel gateway?

It may be branched (the fork) to a plurality of paths may be combined (join) a plurality of inlet paths.

Parallel gateway preconditions: a flow inlet and flow based on the sequence order of the outlet.

2.2 Parallel Gateway two important features:

Branch (fork): order all the outgoing streams in parallel, concurrent streams create a branch for each order. 

Merge (join): all landing parallel gateway, where it waits to enter the branch, until after all of the branches into the sequence flow arrives, it will flow through the aggregation gateway. 

2.3 Note:

1.如果并行网关同时具有入口顺序流和出口顺序流,并行网关会先执行入口顺序流,然后执行再分裂成多条可以执行的路径。

2.并行网关不执行计算条件。并行网关上面的计算条件会被忽略。

3.并行网关分支和合并是同时存在的,就是说,一个至少有一个分支和一个合并。但是,网关是可以不平衡的,分支和合并的数量可以不一致。

2.4 案例:模拟网上购物流程。

付款和收货办理人为买家,发货和收款办理人为商家。

流程图如下:

 

 

 

启动流程之后,任务表当中会多出两条任务数据,办理人分别为买家和商家。
 
实例表当中多出三条纪录,分别代表整个流程实例和两个分支的执行实例。而执行实例有必须属于某一个流程实例,所以要有父ID。
 

 

 

2.5 说明

1)一个流程中流程实例只有1个,执行对象有多个

2)并行网关的功能是基于进入和外出的顺序流的

分支(fork):并行后的所有外出顺序流,为每个顺序流都创建一个并发分支。

汇聚(join):所有到达并行网关,在此等待的进入分支, 直到所有进入顺序流的分支都到达以后, 流程就会通过汇聚网关。

3)并行网关的进入和外出都是使用相同节点标识

4)如果同一个并行网关有多个进入和多个外出顺序流, 它就同时具有分支和汇聚功能。 这时,网关会先汇聚所有进入的顺序流,然后再切分成多个并行分支。

5)并行网关不会解析条件。 即使顺序流中定义了条件,也会被忽略。

6)并行网关不需要是“平衡的”(比如,对应并行网关的进入和外出节点数目不一定相等)。如图中标示是合法的:
 
 

 

 

 

Guess you like

Origin www.cnblogs.com/Guorisy/p/12099256.html
07