Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
3e912992
F
Flowable Engine
项目概览
开发团队
/
Flowable Engine
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Flowable Engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3e912992
编写于
9月 09, 2011
作者:
T
trademak
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added documentation for the inclusive gateway
上级
a561f9b1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
134 addition
and
0 deletion
+134
-0
userguide/src/en/chapters/ch07-BPMN.xml
userguide/src/en/chapters/ch07-BPMN.xml
+134
-0
userguide/src/en/images/bpmn.inclusive.gateway.png
userguide/src/en/images/bpmn.inclusive.gateway.png
+0
-0
未找到文件。
userguide/src/en/chapters/ch07-BPMN.xml
浏览文件 @
3e912992
...
...
@@ -1527,6 +1527,140 @@ assertEquals("Ship Order", task2.getName());</programlisting>
</section>
</section>
<section
id=
"bpmnInclusiveGateway"
>
<title>
Inclusive Gateway
</title>
<section
id=
"bpmnInclusiveGatewayDescription"
>
<title>
Description
</title>
<para>
The
<emphasis
role=
"bold"
>
Inclusive Gateway
</emphasis>
can be seen as a combination of an exclusive
and a parallel gateway. Like an exclusive gatway you can define conditions on outgoing sequence flows
and the inclusive gateway will evaluate them. But the main difference is that the inclusive gateway can take
more than one sequence flow, like the parallel gateway.
</para>
<para>
The functionality of the inclusive gateway is based on the incoming and outgoing sequence flow:
<itemizedlist>
<listitem>
<para>
<emphasis
role=
"bold"
>
fork:
</emphasis>
all outgoing sequence flow conditions are evaluated and for the sequence flow conditions that
evaluate to true the flows are followed in parallel, creating one concurrent
execution for each sequence flow.
</para>
</listitem>
<listitem>
<para>
<emphasis
role=
"bold"
>
join:
</emphasis>
all concurrent executions arriving at the inclusive gateway wait in the gateway
until an execution has arrived for each of the incoming sequence flows that have a process token.
This is an important difference with the parallel gatway. So in other words, the inclusive gateway will only wait
for the incoming sequence flows that will be executed.
After the join, the process continues past the joining inclusive gateway.
</para>
</listitem>
</itemizedlist>
Note that an inclusive gateway can have
<emphasis
role=
"bold"
>
both fork and join behavior
</emphasis>
,
if there are multiple incoming and outgoing sequence flow for the same inclusive gateway.
In that case, the gateway will first join all incoming sequence flows that have a process token, before splitting
into multiple concurrent paths of executions for the outgoing sequence flows that have a condition that evaluates to true.
</para>
</section>
<section
id=
"bpmnInclusiveGatewayGraphicalNotation"
>
<title>
Graphical Notation
</title>
<para>
A parallel gateway is visualized as a gateway (diamond shape) with the 'circle' symbol inside.
<mediaobject><imageobject><imagedata
align=
"center"
fileref=
"images/bpmn.inclusive.gateway.png"
/></imageobject></mediaobject>
</para>
</section>
<section
id=
"bpmnInclusiveGatewayXML"
>
<title>
XML representation
</title>
<para>
Defining an inclusive gateway needs one line of XML:
<programlisting>
<
inclusiveGateway id=
"
myInclusiveGateway
"
/>
</programlisting>
The actual behavior (fork, join or both), is defined by
the sequence flows connected to the inclusive gateway.
</para>
<para>
For example, the model above comes down to the following XML:
<programlisting>
<
startEvent id=
"
theStart
"
/
>
<
sequenceFlow id=
"
flow1
"
sourceRef=
"
theStart
"
targetRef=
"
fork
"
/
>
<emphasis
role=
"bold"
>
<
inclusiveGateway id=
"
fork
"
/
>
</emphasis>
<
sequenceFlow sourceRef=
"
fork
"
targetRef=
"
receivePayment
"
>
<
conditionExpression xsi:type=
"
tFormalExpression
">
${paymentReceived == false}
<
/conditionExpression
>
<
/sequenceFlow
>
<
sequenceFlow sourceRef=
"
fork
"
targetRef=
"
shipOrder
"
>
<
conditionExpression xsi:type=
"
tFormalExpression
">
${shipOrder == true}
<
/conditionExpression
>
<
/sequenceFlow
>
<
userTask id=
"
receivePayment
"
name=
"
Receive Payment
"
/
>
<
sequenceFlow sourceRef=
"
receivePayment
"
targetRef=
"
join
"
/
>
<
userTask id=
"
shipOrder
"
name=
"
Ship Order
"
/
>
<
sequenceFlow sourceRef=
"
shipOrder
"
targetRef=
"
join
"
/
>
<emphasis
role=
"bold"
>
<
inclusiveGateway id=
"
join
"
/
>
</emphasis>
<
sequenceFlow sourceRef=
"
join
"
targetRef=
"
archiveOrder
"
/
>
<
userTask id=
"
archiveOrder
"
name=
"
Archive Order
"
/
>
<
sequenceFlow sourceRef=
"
archiveOrder
"
targetRef=
"
theEnd
"
/
>
<
endEvent id=
"
theEnd
"
/
>
</programlisting>
</para>
<para>
In the above example, after the process is started, two tasks will be created if the process variables
paymentReceived == false and shipOrder == true. In case only one of these process variables equals to true
only one task will be created. If no condition evaluates to true and exception is thrown. This can be prevented
by specifying a default outgoing sequence flow. In the following example one task will be created, the ship order task:
<programlisting>
HashMap
<
String, Object
>
variableMap = new HashMap
<
String, Object
>
();
variableMap.put("receivedPayment", true);
variableMap.put("shipOrder", true);
ProcessInstance pi = runtimeService.startProcessInstanceByKey("forkJoin");
TaskQuery query = taskService.createTaskQuery()
.processInstanceId(pi.getId())
.orderByTaskName()
.asc();
List
<
Task
>
tasks = query.list();
assertEquals(1, tasks.size());
Task task = tasks.get(0);
assertEquals("Ship Order", task.getName());
</programlisting>
When this task is completed, the second inclusive gateway will join the two
executions and since there is only one outgoing sequence flow, no concurrent paths
of execution will be created, and only the
<emphasis>
Archive Order
</emphasis>
task will be active.
</para>
<para>
Note that an inclusive gateway does not need to be 'balanced' (i.e. a matching number
of incoming/outgoing sequence flow for corresponding inclusive gateways).
An inclusive gateway will simply wait for all incoming sequence flow and create
a concurrent path of execution for each outgoing sequence flow, not influenced by
other constructs in the process model.
</para>
</section>
</section>
<section
id=
"bpmnUserTask"
>
...
...
userguide/src/en/images/bpmn.inclusive.gateway.png
0 → 100644
浏览文件 @
3e912992
36.4 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录