- 浏览: 129013 次
- 性别:
文章分类
最新评论
-
cultivator129:
匿名用户没办法下载,也没找到登陆的地方,大家是怎么登陆的?
signavio-core-components编译初体验 -
511039003:
...
如何使用Guava的缓存管理 -
string2020:
activiti如何整合OSGI
Activiti User Guide -- Activit 用户指南 Part06 -
刺客8882010:
楼主可否给我份Demo,谢谢,控制部分代码在哪里写我不是很清楚 ...
利用Spring动态对Quartz定时任务管理 -
yu120:
有源码吗?
利用Spring动态对Quartz定时任务管理
Gateways
网关
A gateway is used to control the flow of execution (or as the BPMN 2.0 describes, the tokens of execution). A gateway is capable ofconsuming or generating tokens.
网关用来控制流程的执行(或者像BPMN2.0所描述:执行的令牌)。一个网关是可以销毁或产生令牌的。
A gateway is graphically visualized as a diamond shape, with an icon inside. The icon shows the type of gateway.
网关通常使用一个带有内部图标菱形图形进行表示。内部图标则表示网关的类型。
Exclusive gateway
唯一网关
描述
An exclusive gateway (also called the XOR gateway or more technical the exclusive data-based gateway), is used to model a decision in the process. When the execution arrives at this gateway, all outgoing sequence flow are evaluated in the order in which they are defined. The sequence flow which condition evaluates to true (or which doesn't have a condition set, conceptually having a 'true' defined on the sequence flow) is selected for continuing the process.
唯一网关(也称之为XOR 网关,或更技术一点的:基于数据的唯一网关),常用来为流程判断来建模。当执行到达了该网关时,所有的外出顺序流将按照定义的顺序被求值,被求值为真(或者没有设置条件的,我们默认为true)的顺序流将被用来继续流程执行。
Note that the semantics of outgoing sequence flow is different to that of the general case in BPMN 2.0. While in general all sequence flow which condition evaluates to true are selected to continue in a parallel way, only one sequence flow is selected when using the exclusive gateway. In case multiple sequence flow have a condition that evaluates to true, the first one defined in the XML (and only that one!) is selected for continuing the process. If no sequence flow can be selected, an exception will be thrown.
需要注意的是这里外出顺序流的语义是与BPMN2.0中一般例子中的有些区别的。在一般的情况下所有被求值为真的顺序流都会被以并行的方式执行,而在唯一网关中只有一个顺序流被执行。如果多个顺序被求值为真,那么在XML中定义的第一个(也只有这个)会被选中并继续执行。如果没有顺序流被选择,那么就是抛出一个异常。
图形符号
An exclusive gateway is visualized as a typical gateway (i.e. a diamond shape) with an 'X' icon inside, referring to the XOR semantics. Note that a gateway without an icon inside defaults to an exclusive gateway. The BPMN 2.0 specification does not allow mixing the diamond with and without an X in the same process definition.
唯一网关的图形表示是在标准的网关符号(菱形)中增加一个’X’图标,用来表示XOR的意思。注意如果网关符号中没有内部的小图标缺省也表示为唯一网关。在BPMN2.0标准中是不允许在一个流程定义中混合使用这两种符号的。
XML representation
XML 表示
The XML representation of an exclusive gateway is straight-forward: one line defining the gateway and condition expressions defined on the outgoing sequence flow. See the section on conditional sequence flow to see which options are available for such expressions.
唯一网关的XML表示是比较容易理解的:一行用来定义网关,条件表达式则定义的顺序流中。请参考条件顺序流章节了解表达式中那些选项可以使用。
Take for example the following model:
接下来是一个样例:
Which is represented in XML as follows:
XML表示如下:
<exclusiveGateway id="exclusiveGw" name="Exclusive Gateway" /> <sequenceFlow id="flow2" sourceRef="exclusiveGw" targetRef="theTask1"> <conditionExpression xsi:type="tFormalExpression">${input == 1}</conditionExpression> </sequenceFlow> <sequenceFlow id="flow3" sourceRef="exclusiveGw" targetRef="theTask2"> <conditionExpression xsi:type="tFormalExpression">${input == 2}</conditionExpression> </sequenceFlow> <sequenceFlow id="flow4" sourceRef="exclusiveGw" targetRef="theTask3"> <conditionExpression xsi:type="tFormalExpression">${input == 3}</conditionExpression> </sequenceFlow>
Parallel Gateway
并行网关
描述
Gateways can also be used to model concurrency in a process. The most straightforward gateway to introduce concurrency in a process model, is the Parallel Gateway, which allows to fork into multiple paths of execution or join multiple incoming paths of execution.
网关也可以用来为流程并发建模。流程模型中用来进行并发控制的最常用的网关就是并行网关,并行网关可以用来将执行拆分成多个并行的路径,也可以用来汇总执行的多个到达路径。
The functionality of the parallel gateway is based on the incoming and outgoing sequence flow:
并行网关的功能依赖于进入或流出的顺序流:
- join: all concurrent executions arriving at the parallel gateway wait in the gateway until an execution has arrived for each of the incoming sequence flow. Then the process continues past the joining gateway.
- join: 所有并发执行到达并行网关时都会进入等待状态,直到最后一个顺序流到达,然后流程才会继续执行。
- fork: all outgoing sequence flow are followed in parallel, creating one concurrent execution for each sequence flow.
- fork: 并行网关为后续的每一个外出顺序流都创建一个执行。
Note that a parallel gateway can have both fork and join behavior, if there are multiple incoming and outgoing sequence flow for the same parallel gateway. In that case, the gateway will first join all incoming sequence flow, before splitting into multiple concurrent paths of executions.
需要注意的是并行网关可以同时拥有fork和join功能,如果该并行网关同时拥有多个进入顺序流和多个外出顺序流。此时,并行网关在将流程分成多个并行路径执行之前会先合并所有进入顺序流。
An important difference with other gateway types is that the parallel gateway does not evaluate conditions. If conditions are defined on the sequence flow connected with the parallel gateway, they are simply neglected.
与其它类型的网关不同的是并行网关不会对顺序流中所定义的条件进行求值。连接到并行网关的顺序流如果定义了条件,网关会简单的忽略它。
图形符号
A parallel gateway is visualized as a gateway (diamond shape) with the 'plus' symbol inside, referring to the 'AND' semantics.
并行网关的图形符号是在网关(菱形)符号中增加一个带+号的内部图标来表示,表示“与”的意思。
XML representation
XML表示
Defining a parallel gateway needs one line of XML:
定义一个并行网关仅需要一行XML:
<parallelGateway id="myParallelGateway" />The actual behavior (fork, join or both), is defined by the sequence flow connected to the parallel gateway.
实际行为(fork、join还是同时),则依赖于与并行网关相连接的顺序流。
For example, the model above comes down to the following XML:
上面的模型可以用XML表示如下:
<startEvent id="theStart" /> <sequenceFlow id="flow1" sourceRef="theStart" targetRef="fork" /> <parallelGateway id="fork" /> <sequenceFlow sourceRef="fork" targetRef="receivePayment" /> <sequenceFlow sourceRef="fork" targetRef="shipOrder" /> <userTask id="receivePayment" name="Receive Payment" /> <sequenceFlow sourceRef="receivePayment" targetRef="join" /> <userTask id="shipOrder" name="Ship Order" /> <sequenceFlow sourceRef="shipOrder" targetRef="join" /> <parallelGateway id="join" /> <sequenceFlow sourceRef="join" targetRef="archiveOrder" /> <userTask id="archiveOrder" name="Archive Order" /> <sequenceFlow sourceRef="archiveOrder" targetRef="theEnd" /> <endEvent id="theEnd" />In the above example, after the process is started, two tasks will be created:
在上面的示例中,当流程启动后会有两个任务被创建:
ProcessInstance pi = runtimeService.startProcessInstanceByKey("forkJoin"); TaskQuery query = taskService.createTaskQuery() .processInstanceId(pi.getId()) .orderAsc(TaskQuery.PROPERTY_NAME); List<Task> tasks = query.list(); assertEquals(2, tasks.size()); Task task1 = tasks.get(0); assertEquals("Receive Payment", task1.getName()); Task task2 = tasks.get(1); assertEquals("Ship Order", task2.getName());When these two tasks are completed, the second parallel 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 Archive Order task will be active.
当这两个任务完成时,第二个并行网关就会把这两个执行进行合并,因为之后只有一个外出顺序流,所以不会创建并行流程执行,只有一个Archive Order任务被激活。
Note that a parallel gateway does not need to be 'balanced' (i.e. a matching number of incoming/outgoing sequence flow for corresponding parallel gateways). A parallel 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. So, the following process is legal in BPMN 2.0:
注意,并行网关不需要进行“平衡”(也就是说进入/流出的顺序流数目不需要一致)。并行网关只是简单的等待所有进入顺序流,并为所有外出顺序流创建并行执行路径,不要受其它流程建模构件的影响。因此,下面这个流程在BPMN2.0中是合法的:
发表评论
-
signavio-core-components编译初体验
2012-03-28 11:17 4691最近又开始研究Acti ... -
Activiti User Guide -- Activit 用户指南 Part11
2010-10-31 10:24 4678User task 用户任务 Descript ... -
Activiti User Guide -- Activit 用户指南 Part09
2010-10-31 10:08 3995Sequence flow 顺序流 Descript ... -
Activiti User Guide -- Activit 用户指南 Part08
2010-10-30 15:04 4565BPMN 2.0 constructs BPMN 2. ... -
Activiti User Guide -- Activit 用户指南 Part07
2010-10-30 14:53 3214Now we can start a new proce ... -
Activiti User Guide -- Activit 用户指南 Part06
2010-10-30 14:46 6980Chapter 7. BPMN 第七章 BPMN T ... -
Activiti User Guide -- Activit 用户指南 Part05
2010-10-24 17:09 3108Chapter 6. Deployment 第六章 部 ... -
Activiti User Guide -- Activit 用户指南 Part04
2010-10-24 17:07 3659Chapter 5. API 第五章 API Tab ... -
Activiti User Guide -- Activit 用户指南 Part03
2010-10-19 22:04 3456Chapter 4. Spring integratio ... -
Activiti User Guide -- Activit 用户指南 Part02
2010-10-17 18:36 3530Chapter 3. Configuration ... -
Activiti User Guide -- Activit 用户指南 Part01
2010-10-17 18:33 6115终于告一个段落了,前一段时间忙着开发一个流转引擎,所以 ...
相关推荐
赠送jar包:activiti-json-converter-5.21.0.jar; 赠送原API文档:activiti-json-converter-5.21.0-javadoc.jar; 赠送源代码:activiti-json-converter-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-...
这个“activiti-userguide-5-16”压缩包文件包含了 Activiti 5.16 版本的用户指南,帮助我们深入理解并有效使用这个流程管理工具。 1. **BPMN 2.0 规范**:Business Process Model and Notation 2.0(业务流程模型...
赠送jar包:activiti-engine-5.21.0.jar; 赠送原API文档:activiti-engine-5.21.0-javadoc.jar; 赠送源代码:activiti-engine-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-engine-5.21.0.pom; 包含...
赠送jar包:activiti-json-converter-5.21.0.jar; 赠送原API文档:activiti-json-converter-5.21.0-javadoc.jar; 赠送源代码:activiti-json-converter-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-...
赠送jar包:activiti-image-generator-5.21.0.jar; 赠送原API文档:activiti-image-generator-5.21.0-javadoc.jar; 赠送源代码:activiti-image-generator-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-...
赠送jar包:activiti-common-rest-5.21.0.jar; 赠送原API文档:activiti-common-rest-5.21.0-javadoc.jar; 赠送源代码:activiti-common-rest-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-common-rest-...
赠送jar包:activiti-bpmn-model-5.21.0.jar; 赠送原API文档:activiti-bpmn-model-5.21.0-javadoc.jar; 赠送源代码:activiti-bpmn-model-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-bpmn-model-...
赠送jar包:activiti-image-generator-5.21.0.jar; 赠送原API文档:activiti-image-generator-5.21.0-javadoc.jar; 赠送源代码:activiti-image-generator-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-...
activiti-spring-boot-starter-7.1.0.M1
activiti-spring-boot-starter-basic-6.0.0适配springboot2.1.2
activiti-bpmn-converter-5.18.0-sources.jar
赠送jar包:activiti-process-validation-5.21.0.jar; 赠送原API文档:activiti-process-validation-5.21.0-javadoc.jar; 赠送源代码:activiti-process-validation-5.21.0-sources.jar; 赠送Maven依赖信息文件:...
赠送jar包:activiti-bpmn-converter-5.21.0.jar; 赠送原API文档:activiti-bpmn-converter-5.21.0-javadoc.jar; 赠送源代码:activiti-bpmn-converter-5.21.0-sources.jar; 赠送Maven依赖信息文件:activiti-...
activiti-bpmn-converter-5.16.4.jar
本文将详细介绍如何在SpringBoot项目中整合Activiti,并通过提供的"springboot-activiti-test-master.zip"压缩包进行实战演练。 首先,我们需要了解SpringBoot与Activiti的基本概念。SpringBoot旨在简化Spring应用...
1、将以下四个文件(见附件Activiti Designer 5.18.1插件补丁)拷贝到自己的eclipse的plugin文件夹下面,重启eclipse ...2、将activiti-designer-5.18.0文件夹copy到eclipse\dropins目录下; 3、重启eclipse即可
【 activiti-explorer-eclipse项目 】是一个基于Activiti工作流引擎的Eclipse插件项目。 Activiti 是一个开源的业务流程管理系统(BPMN 2.0)和工作流引擎,它允许开发者轻松地在应用程序中集成业务流程管理功能。这...
Activiti的Eclipse插件activiti-designer安装资料包,包含activiti-designer-5.18.0.zip、org.eclipse.emf.transaction_1.4.0.201306111400.jar、org.eclipse.emf.validation.ui_1.7.0.201403111711.jar、org....
1. **流程建模**: Activiti Designer 提供了一个图形化用户界面,通过拖放方式可以轻松创建和配置各种流程元素,如开始事件、结束事件、任务、网关和泳道等。这使得非技术背景的业务人员也能参与到流程设计中,提升...
《深入理解Activiti:基于activiti-test-master.zip的实践探索》 Activiti是一个开源的工作流引擎,它提供了强大的业务流程管理(BPM)能力。在我们的示例中,"activiti-test-master.zip"是一个包含与Activiti相关...