`
cd826
  • 浏览: 129169 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

Activiti User Guide -- Activit 用户指南 Part08

阅读更多

BPMN 2.0 constructs

BPMN 2.0 构件

Custom extensions

自定义扩展

The BPMN 2.0 standard is a good thing for all parties involved. End-users don't suffer from a vendor lock-in that comes by depending on a proprietary solution. Frameworks, and particularly open-source frameworks such as Activiti, can implement a solution that has the same (and often better implemented) features as those of a big vendor. Due to the BPMN 2.0 standard, the transition from such a big vendor solution towards Activiti is an easy and smooth path.

BPMN2.0标准对于每一个参与方都是一个很好的标准。最终用户也不需要绑定某个厂商的私有解决方案。一个框架,特别是开源框架,如Activiti,可以实现同样(通常会更好)和那些大厂商所提供功能。基于BPMN2.0标准,你可以非常容易而且可以平滑的由大厂商所提供的解决方案迁移到Activiti

 

The downside of a standard however, is the fact that it is always the result of many discussions and compromises between different companies (and often visions). As a developer reading the BPMN 2.0 XML of a process definition, sometimes it feels like certain constructs or way to do things are too cumbersome. Since Activiti puts ease of development as a top-priority, we introduced something called the'Activiti BPMN extensions'. These 'extensions' are new constructs or ways to simplify certain constructs, that are not in the BPMN 2.0 specification.

对于标准来说不利的一面那就是,标准通常是厂商之间协商和折中的一种方案(通常是对标准的愿景)。作为一个开发人员阅读BPMN2.0流程定义XML时,经常发现某些构件或做事的方式是很笨重的。因此,Activit把易于开发作为最高优先级,接下来我们会介绍一些被称之为'Activiti BPMN extensions'的东东。这些扩展构件在BPMN2.0标准中是不存在的,它们有些是新的构件,有些是对既有构件的简化。

 

Although the BPMN 2.0 specification clearly states that it was made for custom extension, we make sure that:

尽管BPMN2.0标准明确的表示可以进行自定义扩展,但是我们还是确保:

  • The prerequisite of such a custom extension is that there always must be a simple transformation to the standard way of doing things. So when you decide to use a custom extension, you don't have to be afraid that there is no way back.
  • 自定义扩展的先决条件就是:自定义扩展必须可以经由简单转换就可以使用标准的方法来实现。所以当你觉得了使用了自定义扩展,也不需要担心没有回头路;
  • When using a custom extension, this is always clearly indicated by giving the new XML element, attribute, etc. the activiti:namespace prefix.
  • 当你使用自定义扩展,通常会使用新的XML元素、属性等来清晰的表示这是一个扩展,通常使用activiti:前缀来表示。
  • The goal of these extensions is to eventually push them back into a next version of the BPMN specification, or at least trigger a discussion that can lead to a revision of that specific BPMN construct.
  • 扩展构件的目标是最终是将这些扩展加入下一版本的BPMN标准中,或者至少可以引发关于BPMN下一个版本修订的讨论。

So whether you want to use a custom extension or not, is completely up to you. Several factors will influence this decision (graphical editor usage, company policy, etc.). We only provide them since we believe that some points in the standard can be done simpler or more efficient. Feel free to give us (positive and/or negative) feedback on our extensions, or to post new ideas for custom extensions. Who knows, some day your idea might pop up in the specification!.

使用或者不使用自定义扩展,都完全取决于你。许多因素都会影响你的决定(图形编辑器的用法,公司策略等)。我们只是提供这些自定义扩展,因为我们相信标准在某些方面可以做的更简单一点,更有效率一点。你可以将你使用我们自定义的扩展感受(好的方面/不好的方面)告诉我们,也可以将你的在自定义扩展方面的好的点子告诉我们。谁知道,或许某一天你的点子就会加入到标准中。

Events

事件(Event)

Events are used to model something that happens during the lifetime process. Events are always visualized as a circle. In BPMN 2.0, there exist two main event categories: catching or throwing event.

事件(Event)用来为发生在流程生命周期某些东东进行建模。事件(Event)常常使用圆来表示。在BPMN2.0中存在两类主要事件:catching事件和throwing事件。

  • Catching: when process execution arrives in the event, it will wait for a trigger to happen. The type of trigger is defined by the inner icon or the type declaration in the XML. Catching events are visually differentiated from a throwing event by the inner icon that is not filled (i.e. it is white).
  • Catching: 流程执行到该类事件时,流程将等待一个触发的发生。触发器的类型通常使用内部图标来表示,或者在XML中声明。Catching事件与throwing事件内部图标是不同的,内部是没有被填充的(也就是说是空白的)。
  • Throwing: when process execution arrives in the event, a trigger is fired. The type of trigger is defined by the inner icon or the type declaration in the XML. Throwing events are visually differentiated from a catching event by the inner icon that is filled with black.
  • Throwing: 当流程执行到该类事件时,就会触发一个触发器。触发器的类型通常使用内部图标来表示,或者在XML中声明。Throwing事件与catching事件内部图标是不同的,内部使用黑色进行填充。

Start events

启动事件

A start event indicates where a process starts. The type of start event (process starts on arrival of message, on specific time intervals, etc.), defining how the process is started is shown as a small icon in the visual representation of the event. In the XML representation, the type is given by the declaration of a sub-element.

一个启动事件表示一个流程的起始点。启动事件的类型(当一个消息到达后启动、在特定时间间隔启动等)定义了流程如何启动,在可视化表示中使用小图标进行区分,在XML表示中使用子元素进行区分。

 

Start events are always catching: conceptually the event is (at any time) waiting until a certain trigger happens.

启动事件就是catching事件:因为事件(总是)等待一个特定的触发器发生。

 

In a start event, following activiti-specific properties can be specified:

对于启动事件,下面列出了可以被赋值的activiti属性:

  • form: references to a form template that users have to fill out to supply the information to start a new process instance. More information can be found in Chapter 8, Task Forms. Example:
  • form:表示一个表单模板,该表单模板在流程启动时可以让用户填写相应的信息。更多的信息可以参考Chapter 8, Task Forms。例如:

 

<startEvent id="request" activiti:form="org/activiti/examples/taskforms/request.form" />
 
  • initiator: identifies the variable name in which the authenticated user id will be stored when the process is started. Example:
  • initiator: 设置一个变量名称,用来存储流程启动者的id。例如:

<startEvent id="request" activiti:initiator="initiator" />
     The authenticated user must be set with the method IdentityService.setAuthenticatedUserId(String) in a try-finally block like this:

使用IdentityService.setAuthenticatedUserId(String)来设置验证用户信息时,必须使用try-finally包围,像下面一样:

try {
  identityService.setAuthenticatedUserId("bono");
  runtimeService.startProcessInstanceByKey("someProcessKey");
} finally {
  identityService.setAuthenticatedUserId(null);
}
 

This code is baked into the Activiti Explorer application. So it works in combination with Chapter 8, Task Forms

这段代码已经整合到Activiti Explorer应用中了。因此它可以和Chapter 8, Task Forms整合使用。

 

None start event

None start event

Description

描述

A 'none' start event technically means that the trigger for starting the process instance is unspecified. This means that the engine cannot anticipate when the process instance must be started. The none start event is used when the process instance is started through the API by calling one of the startProcessInstanceByXXX methods.

None start event 从技术的角度上来讲就是表示触发流程启动的触发器没有被指定。也就是说流程引擎不能够预测到流程实例何时被启动。None start event一般是通过调用startProcessInstanceByXXX  API函数来启动一个流程实例。

ProcessInstance processInstance = runtimeService.startProcessInstanceByXXX();
Note: a subprocess (currently not yet implemented) always has a none start event.

注意:子流程(现在还没有支持)通常是含有一个none start event

Graphical notation

图形符号

A none start event is visualized as a circle with no inner icon (i.e. no trigger type).

None start event使用一个没有内部图标的圆来表示(也就是说没有指定触发器类型)

 

XML representation

XML 表示

The XML representation of a none start event is the normal start event declaration, without any sub-element (other start event types all have a sub-element declaring the type).

None start evnetXML表示就是普通的start event表示,没有子元素(其他start event都有一个子元素用来表示类型)。

<startEvent id="start" name="my start event" />

 

End events

结束事件

An end event signifies the end (of a path) of a (sub)process. An end event is always throwing. This means that when process execution arrives in the end event, a result is thrown. The type of result is depicted by the inner black icon of the event. In the XML representation, the type is given by the declaration of a sub-element.

一个结束事件通常意味着一个(子)流程结束,或者(子)流程的一个路径结束。结束事件就是一个throwing事件。也就是说当流程执行到一个结束事件时,一个result就会被抛出。result 的类型使用内部黑图标进行表示。在XML中则是通过子元素进行表示。

None end event

None end event

Description

描述

A 'none' end event means that the result thrown when the event is reached is unspecified. As such, the engine will not do anything extra besides ending the current path of execution.

None end event意味着在流程结束时,抛出的result是没有被指定的。也就是说,流程引擎除了把当前执行流程结束掉之外不做任何其它事情。

Graphical notation

图形符号

A none end event is visualized as a circle with a thick border with no inner icon (no result type).

None end event 使用一个厚边框的圆表示,圆内部没有图标(也就是说没有指定result类型)。

 

XML representation

XML 表示

The XML representation of a none end event is the normal end event declaration, without any sub-element (other end event types all have a sub-element declaring the type).

None end eventXML表示就是普通的end eventXML表示,没有子元素(其它end event则包含一个用来指示类型的子元素)。

<!--EndFragment--> family�a;�Z��n�font-family:Arial;color:black; mso-font-kerning:0pt'>的类型使用内部黑图标进行表示。在XML中则是通过子元素进行表示。

 

None end event

None end event

Description

描述

A 'none' end event means that the result thrown when the event is reached is unspecified. As such, the engine will not do anything extra besides ending the current path of execution.

None end event意味着在流程结束时,抛出的result是没有被指定的。也就是说,流程引擎除了把当前执行流程结束掉之外不做任何其它事情。

Graphical notation

图形符号

A none end event is visualized as a circle with a thick border with no inner icon (no result type).

None end event 使用一个厚边框的圆表示,圆内部没有图标(也就是说没有指定result类型)。

<endEvent id="end" name="my end event" />
 
  • 大小: 8.1 KB
  • 大小: 8.1 KB
1
0
分享到:
评论

相关推荐

    activiti-json-converter-5.21.0-API文档-中英对照版.zip

    赠送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-userguide-5-16”压缩包文件包含了 Activiti 5.16 版本的用户指南,帮助我们深入理解并有效使用这个流程管理工具。 1. **BPMN 2.0 规范**:Business Process Model and Notation 2.0(业务流程模型...

    activiti-engine-5.21.0-API文档-中文版.zip

    赠送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; 包含...

    activiti-json-converter-5.21.0-API文档-中文版.zip

    赠送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-image-generator-5.21.0-API文档-中文版.zip

    赠送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-common-rest-5.21.0-API文档-中英对照版.zip

    赠送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-...

    activiti-bpmn-model-5.21.0-API文档-中文版.zip

    赠送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-...

    activiti-spring-boot-starter-7.1.0.M1.jar

    activiti-spring-boot-starter-7.1.0.M1

    activiti-image-generator-5.21.0-API文档-中英对照版.zip

    赠送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-basic-6.0.0适配springboot2.1.2

    activiti-spring-boot-starter-basic-6.0.0适配springboot2.1.2

    activiti-bpmn-converter-5.18.0-sources.jar

    activiti-bpmn-converter-5.18.0-sources.jar

    activiti-process-validation-5.21.0-API文档-中文版.zip

    赠送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依赖信息文件:...

    activiti-bpmn-converter-5.21.0-API文档-中英对照版.zip

    赠送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

    activiti-bpmn-converter-5.16.4.jar

    springboot-activiti-test-master.zip

    本文将详细介绍如何在SpringBoot项目中整合Activiti,并通过提供的"springboot-activiti-test-master.zip"压缩包进行实战演练。 首先,我们需要了解SpringBoot与Activiti的基本概念。SpringBoot旨在简化Spring应用...

    activiti-designer-5.18.0

    1、将以下四个文件(见附件Activiti Designer 5.18.1插件补丁)拷贝到自己的eclipse的plugin文件夹下面,重启eclipse ...2、将activiti-designer-5.18.0文件夹copy到eclipse\dropins目录下; 3、重启eclipse即可

    亲测可用 eclipse 安装activiti activiti-designer-5.18.0.zip

    eclipse 安装activiti activiti-designer-5.18.0.zip 附带eclipse 以及activiti-designer-5.18.0.zip 安装包 eclipse下载链接https://www.eclipse.org/downloads/packages/release/luna/sr2

    activiti-explorer-eclipse项目

    【 activiti-explorer-eclipse项目 】是一个基于Activiti工作流引擎的Eclipse插件项目。 Activiti 是一个开源的业务流程管理系统(BPMN 2.0)和工作流引擎,它允许开发者轻松地在应用程序中集成业务流程管理功能。这...

    Activiti的Eclipse插件activiti-designer-5.18.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....

    activiti-designer-5.18.0.zip 官方

    1. **流程建模**: Activiti Designer 提供了一个图形化用户界面,通过拖放方式可以轻松创建和配置各种流程元素,如开始事件、结束事件、任务、网关和泳道等。这使得非技术背景的业务人员也能参与到流程设计中,提升...

Global site tag (gtag.js) - Google Analytics