- Chapter 1. Introduction 介绍
- Chapter 2. Getting Started
- Chapter 3. Configuration
- Creating a ProcessEngine 创建 ProcessEngine
- ProcessEngineConfiguration bean
- Database configuration 数据库配置
- JNDI Datasource Configuration 数据源配置
- Supported databases 支持的数据库
- Creating the database tables 创建数据库表
- Database table names explained 理解数据库表名字
- Database upgrade 数据库升级
- Job Executor and Async Executor (since version 5.17.0)
- Job executor activation 启用 Job executor
- Async executor activation 启用 Async executor
- Mail server configuration 配置邮件服务器
- History configuration 配置历史
- Exposing configuration beans in expressions and scripts 在表达式和脚本中暴露配置
- Deployment cache configuration 配置部署缓存
- Logging 日志
- Mapped Diagnostic Contexts 映射诊断上下文
- Event handlers 事件处理
- Chapter 4. The Activiti API
- Chapter 5. Spring integration 集成 Spring
- Chapter 6. Deployment
- Chapter 7. BPMN 2.0 Introduction
- Chapter 8. BPMN 2.0 Constructs 关于 BPMN 2.0 架构
- Chapter 9. Forms 表单
- Chapter 10. JPA
- Chapter 11. History 历史
- Chapter 12. Eclipse Designer
- Chapter 13. Activiti Explorer
- Chapter 14. Activiti Modeler
- Chapter 15. REST API
- Chapter 16. CDI integration 集成 CDI
- Chapter 17. LDAP integration 集成 LDAP
- Chapter 18. Advanced 高级
- Hooking into process parsing 监听流程解析
- UUID id generator for high concurrency 高并发的 UUID 生成器
- Multitenancy 多租户
- Execute custom SQL 执行自定义 SQL
- Advanced Process Engine configuration with a ProcessEngineConfigurator 用 ProcessEngineConfigurator 实现高级引擎配置
- Advanced query API seamless switching between runtime and historic task querying 高级查询 API-运行时无缝任务切换和历史任务查询
- Custom identity management by overriding standard SessionFactory 通过重写标准的 SessionFactory 实现自定义身份的管理
- Enable safe BPMN 2.0 xml 启用安全的 BPMN 2.0 xml
- Event logging Experimental 事件日志-实验
- Introduction 介绍
- CrystalBall inside 内部
- History analysis 历史分析
Sequence Flow 顺序流
Description 描述
顺序流是连接两个流程节点的连线。 流程执行完一个节点后,会沿着节点的所有外出顺序流继续执行。 就是说,BPMN 2.0 默认的行为就是并发的: 两个外出顺序流会创造两个单独的,并发流程分支。
Graphical notation 图形标记
顺序流显示为从起点到终点的箭头。 箭头总是指向终点
XML representation 内容
顺序流需要流程范围内唯一的 id, 以及对起点与 终点元素的引用。
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask" />
Conditional sequence flow 条件顺序流
Description 描述
可以为顺序流定义一个条件。离开一个 BPMN 2.0 节点时, 默认会计算外出顺序流的条件。如果条件结果为 true, 就会选择外出顺序流继续执行。当多条顺序流被选中时, 就会创建多条分支, 流程会继续以并行方式继续执行。
注意:上面的讨论仅涉及 BPMN 2.0 节点(和事件), 不包括网关。网关会用特定的方式处理顺序流中的条件, 这与网关类型相关。
Graphical notation 图形标记
条件顺序流显示为一个正常的顺序流,不过在起点有一个菱形。 条件表达式也会显示在顺序流上。
XML representation 内容
条件顺序流定义为一个正常的顺序流, 包含 conditionExpression 子元素。 注意目前只支持 tFormalExpressions, 如果没有设置 xsi:type="" , 就会默认值支持目前支持的表达式类型
<sequenceFlow id="flow" sourceRef="theStart" targetRef="theTask">
<conditionExpression xsi:type="tFormalExpression">
<![CDATA[${order.price > 100 && order.price < 250}]]>
</conditionExpression>
</sequenceFlow>
当前条件表达式 只能使用 UEL , 可以参考表达式章节获取更多信息。 使用的表达式需要返回 boolean 值,否则会在解析表达式时抛出异常。
- 下面的例子引用了流程变量的数据, 通过 getter 调用 JavaBean。
- 这个例子通过调用方法返回一个 boolean 值。
在 activiti 发布包中,包含以下流程实例,使用了值和方法表达式 (参 考 org.activiti.examples.bpmn.expression ) 包):
Default sequence flow 默认顺序流
Description 描述
所有的 BPMN 2.0 任务和网关都可以设置一个默认顺序流。 只有在节点的其他外出顺序流不能被选中是,才会使用它作为外出顺序流继续执行。 默认顺序流的条件设置不会生效。
Graphical notation 图形标记
默认顺序流显示为了普通顺序流,起点有一个“斜线”标记。
XML representation 内容
默认顺序流通过对应节点的 default 属性定义。 下面的 XML 代码演示了排他网关设置了默认顺序流 flow 2 。 只有当 conditionA 和 conditionB 都返回 false 时, 才会选择它作为外出连线继续执行。
<exclusiveGateway id="exclusiveGw" name="Exclusive Gateway" default="flow2" />
<sequenceFlow id="flow1" sourceRef="exclusiveGw" targetRef="task1">
<conditionExpression xsi:type="tFormalExpression">${conditionA}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow2" sourceRef="exclusiveGw" targetRef="task2"/>
<sequenceFlow id="flow3" sourceRef="exclusiveGw" targetRef="task3">
<conditionExpression xsi:type="tFormalExpression">${conditionB}</conditionExpression>
</sequenceFlow>
对应下面的图形显示:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论