介绍
包含网关
可以看作是排他网关
和并行网关
的结合体
包含网关
根据流向支持两种情况:
-
分支: 从
包含网关
向后流出,解析所有后继顺序流
的条件表达式,为解析结果为true
的所有顺序流创建分支 -
汇聚: 在此等待,直到所有
存在运行分支
的前继顺序流
分支都到达以后,流程才会通过该包含网关
演示
JSON规范
- 1{
- 2 nodes: [
- 3 {
- 4 id: 'startEvent_1',
- 5 name: 'Start',
- 6 type: 'startEventNone',
- 7 },
- 8 // 包含网关-分支
- 9 {
- 10 id: 'gateway_1',
- 11 name: 'Gateway Inclusive(out)',
- 12 type: 'gatewayInclusive',
- 13 },
- 14 {
- 15 id: 'activity_1',
- 16 name: 'ActivityNone',
- 17 type: 'activityNone',
- 18 },
- 19 {
- 20 id: 'activity_2',
- 21 name: 'ActivityNone',
- 22 type: 'activityNone',
- 23 },
- 24 {
- 25 id: 'activity_3',
- 26 name: 'ActivityNone',
- 27 type: 'activityNone',
- 28 },
- 29 // 包含网关-汇聚
- 30 {
- 31 id: 'gateway_2',
- 32 name: 'Gateway Inclusive(in)',
- 33 type: 'gatewayInclusive',
- 34 },
- 35 {
- 36 id: 'endEvent_1',
- 37 name: 'End',
- 38 type: 'endEventNone',
- 39 },
- 40 ],
- 41 edges: [
- 42 {
- 43 id: 'edge_1',
- 44 name: '',
- 45 source: 'startEvent_1',
- 46 target: 'gateway_1',
- 47 },
- 48 // 后继顺序流
- 49 {
- 50 id: 'edge_2',
- 51 name: '',
- 52 source: 'gateway_1',
- 53 target: 'activity_1',
- 54 options: {
- 55 // 条件表达式
- 56 conditionExpression: "context.vars.get('x')===1",
- 57 },
- 58 },
- 59 // 后继顺序流
- 60 {
- 61 id: 'edge_3',
- 62 name: '',
- 63 source: 'gateway_1',
- 64 target: 'activity_2',
- 65 options: {
- 66 // 条件表达式
- 67 conditionExpression: "context.vars.get('x')===2",
- 68 },
- 69 },
- 70 // 后继顺序流
- 71 {
- 72 id: 'edge_4',
- 73 name: '',
- 74 source: 'gateway_1',
- 75 target: 'activity_3',
- 76 options: {
- 77 // 条件表达式
- 78 conditionExpression: "context.vars.get('x')===1",
- 79 },
- 80 },
- 81 // 前继顺序流
- 82 {
- 83 id: 'edge_5',
- 84 name: '',
- 85 source: 'activity_1',
- 86 target: 'gateway_2',
- 87 },
- 88 // 前继顺序流
- 89 {
- 90 id: 'edge_6',
- 91 name: '',
- 92 source: 'activity_2',
- 93 target: 'gateway_2',
- 94 },
- 95 // 前继顺序流
- 96 {
- 97 id: 'edge_7',
- 98 name: '',
- 99 source: 'activity_3',
- 100 target: 'gateway_2',
- 101 },
- 102 {
- 103 id: 'edge_8',
- 104 name: '',
- 105 source: 'gateway_2',
- 106 target: 'endEvent_1',
- 107 },
- 108 ],
- 109},
- node
名称 | 说明 |
---|---|
id | gateway_1,节点Id |
name | Gateway Inclusive(out),节点名称 |
type | gatewayInclusive,表示该节点类型为包含网关 |
-
edge
- 参见:转移线:顺序流
评论: