Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
c707cd2b
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,发现更多精彩内容 >>
提交
c707cd2b
编写于
10月 03, 2013
作者:
S
Saeid Mirzaei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ACT-1755
上级
d4f36c54
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
133 addition
and
1 deletion
+133
-1
modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ParallelGatewayActivityBehavior.java
...e/impl/bpmn/behavior/ParallelGatewayActivityBehavior.java
+3
-1
modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/gateway/ParallelGatewayTest.java
...ctiviti/engine/test/bpmn/gateway/ParallelGatewayTest.java
+21
-0
modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/gateway/ParallelGatewayTest.testHistoryTables.bpmn20.xml
.../gateway/ParallelGatewayTest.testHistoryTables.bpmn20.xml
+109
-0
未找到文件。
modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ParallelGatewayActivityBehavior.java
浏览文件 @
c707cd2b
...
...
@@ -20,6 +20,8 @@ import org.activiti.engine.impl.pvm.PvmTransition;
import
org.activiti.engine.impl.pvm.delegate.ActivityExecution
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.activiti.engine.impl.context.Context
;
import
org.activiti.engine.impl.persistence.entity.ExecutionEntity
;
/**
* Implementation of the Parallel Gateway/AND gateway as definined in the BPMN
...
...
@@ -65,7 +67,7 @@ public class ParallelGatewayActivityBehavior extends GatewayActivityBehavior {
List
<
ActivityExecution
>
joinedExecutions
=
execution
.
findInactiveConcurrentExecutions
(
activity
);
int
nbrOfExecutionsToJoin
=
execution
.
getActivity
().
getIncomingTransitions
().
size
();
int
nbrOfExecutionsJoined
=
joinedExecutions
.
size
();
Context
.
getCommandContext
().
getHistoryManager
().
recordActivityEnd
((
ExecutionEntity
)
execution
);
if
(
nbrOfExecutionsJoined
==
nbrOfExecutionsToJoin
)
{
// Fork
...
...
modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/gateway/ParallelGatewayTest.java
浏览文件 @
c707cd2b
...
...
@@ -13,8 +13,11 @@
package
org.activiti.engine.test.bpmn.gateway
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.activiti.engine.history.HistoricActivityInstance
;
import
org.activiti.engine.impl.test.PluggableActivitiTestCase
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.task.Task
;
...
...
@@ -133,4 +136,22 @@ public class ParallelGatewayTest extends PluggableActivitiTestCase {
//assertEquals(1, historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).finished().count());
}
// Test to verify ACT-1755
@Deployment
public
void
testHistoryTables
()
{
ProcessInstance
pi
=
runtimeService
.
startProcessInstanceByKey
(
"testHistoryRecords"
);
List
<
HistoricActivityInstance
>
history
=
historyService
.
createHistoricActivityInstanceQuery
()
.
processInstanceId
(
pi
.
getId
()).
list
();
for
(
HistoricActivityInstance
h:
history
)
{
if
(
h
.
getActivityId
().
equals
(
"parallelgateway2"
)
||
h
.
getActivityId
().
equals
(
"parallelgateway2"
))
assertNotNull
(
h
.
getEndTime
());
}
}
}
modules/activiti-engine/src/test/resources/org/activiti/engine/test/bpmn/gateway/ParallelGatewayTest.testHistoryTables.bpmn20.xml
0 → 100644
浏览文件 @
c707cd2b
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns=
"http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti=
"http://activiti.org/bpmn"
xmlns:bpmndi=
"http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc=
"http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi=
"http://www.omg.org/spec/DD/20100524/DI"
typeLanguage=
"http://www.w3.org/2001/XMLSchema"
expressionLanguage=
"http://www.w3.org/1999/XPath"
targetNamespace=
"RCS-PRUEBA9"
>
<process
id=
"testHistoryRecords"
name=
"Mi proceso con subprocesos FINAL"
isExecutable=
"true"
>
<documentation>
Test if end of parallell gateways are properly marked in hostory tables
</documentation>
<startEvent
id=
"comienzo"
name=
"Registrar proceso"
></startEvent>
<parallelGateway
id=
"parallelgateway1"
name=
"Parallel Gateway"
></parallelGateway>
<serviceTask
id=
"servicetask1"
name=
"Service Task 1"
activiti:expression=
"${1}"
></serviceTask>
<sequenceFlow
id=
"flow4"
sourceRef=
"comienzo"
targetRef=
"servicetask1"
></sequenceFlow>
<sequenceFlow
id=
"flow5"
sourceRef=
"servicetask1"
targetRef=
"parallelgateway1"
></sequenceFlow>
<serviceTask
id=
"servicetask2"
name=
"Service Task 2"
activiti:expression=
"${1}"
></serviceTask>
<sequenceFlow
id=
"flow6"
sourceRef=
"parallelgateway1"
targetRef=
"servicetask2"
></sequenceFlow>
<parallelGateway
id=
"parallelgateway2"
name=
"Parallel Gateway"
></parallelGateway>
<sequenceFlow
id=
"flow7"
sourceRef=
"servicetask2"
targetRef=
"parallelgateway2"
></sequenceFlow>
<endEvent
id=
"endevent2"
name=
"End"
></endEvent>
<serviceTask
id=
"servicetask3"
name=
"Service Task 3"
activiti:expression=
"${1}"
></serviceTask>
<userTask
id=
"usertask2"
name=
"Example 2 of User Task"
activiti:assignee=
"D10367:002001"
></userTask>
<sequenceFlow
id=
"flow14"
sourceRef=
"usertask2"
targetRef=
"endevent2"
></sequenceFlow>
<serviceTask
id=
"servicetask4"
name=
"Service Task 4"
activiti:expression=
"${1}"
></serviceTask>
<sequenceFlow
id=
"flow15"
sourceRef=
"parallelgateway1"
targetRef=
"servicetask4"
></sequenceFlow>
<sequenceFlow
id=
"flow16"
sourceRef=
"servicetask4"
targetRef=
"parallelgateway2"
></sequenceFlow>
<sequenceFlow
id=
"flow17"
sourceRef=
"parallelgateway1"
targetRef=
"servicetask3"
></sequenceFlow>
<sequenceFlow
id=
"flow18"
sourceRef=
"servicetask3"
targetRef=
"parallelgateway2"
></sequenceFlow>
<serviceTask
id=
"servicetask5"
name=
"Service Task 4"
activiti:expression=
"${1}"
></serviceTask>
<sequenceFlow
id=
"flow19"
sourceRef=
"parallelgateway2"
targetRef=
"servicetask5"
></sequenceFlow>
<sequenceFlow
id=
"flow20"
sourceRef=
"servicetask5"
targetRef=
"usertask2"
></sequenceFlow>
</process>
<bpmndi:BPMNDiagram
id=
"BPMNDiagram_RCS-PRUEBA9"
>
<bpmndi:BPMNPlane
bpmnElement=
"RCS-PRUEBA9"
id=
"BPMNPlane_RCS-PRUEBA9"
>
<bpmndi:BPMNShape
bpmnElement=
"comienzo"
id=
"BPMNShape_comienzo"
>
<omgdc:Bounds
height=
"35.0"
width=
"35.0"
x=
"40.0"
y=
"220.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"parallelgateway1"
id=
"BPMNShape_parallelgateway1"
>
<omgdc:Bounds
height=
"40.0"
width=
"40.0"
x=
"390.0"
y=
"217.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"servicetask1"
id=
"BPMNShape_servicetask1"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"200.0"
y=
"210.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"servicetask2"
id=
"BPMNShape_servicetask2"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"550.0"
y=
"350.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"parallelgateway2"
id=
"BPMNShape_parallelgateway2"
>
<omgdc:Bounds
height=
"40.0"
width=
"40.0"
x=
"775.0"
y=
"217.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"endevent2"
id=
"BPMNShape_endevent2"
>
<omgdc:Bounds
height=
"35.0"
width=
"35.0"
x=
"1175.0"
y=
"440.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"servicetask3"
id=
"BPMNShape_servicetask3"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"550.0"
y=
"80.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"usertask2"
id=
"BPMNShape_usertask2"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"1140.0"
y=
"210.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"servicetask4"
id=
"BPMNShape_servicetask4"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"550.0"
y=
"210.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape
bpmnElement=
"servicetask5"
id=
"BPMNShape_servicetask5"
>
<omgdc:Bounds
height=
"55.0"
width=
"105.0"
x=
"940.0"
y=
"210.0"
></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge
bpmnElement=
"flow4"
id=
"BPMNEdge_flow4"
>
<omgdi:waypoint
x=
"75.0"
y=
"237.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"200.0"
y=
"237.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow5"
id=
"BPMNEdge_flow5"
>
<omgdi:waypoint
x=
"305.0"
y=
"237.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"390.0"
y=
"237.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow6"
id=
"BPMNEdge_flow6"
>
<omgdi:waypoint
x=
"410.0"
y=
"257.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"410.0"
y=
"377.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"550.0"
y=
"377.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow7"
id=
"BPMNEdge_flow7"
>
<omgdi:waypoint
x=
"655.0"
y=
"377.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"790.0"
y=
"377.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"795.0"
y=
"257.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow14"
id=
"BPMNEdge_flow14"
>
<omgdi:waypoint
x=
"1192.0"
y=
"265.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"1192.0"
y=
"440.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow15"
id=
"BPMNEdge_flow15"
>
<omgdi:waypoint
x=
"430.0"
y=
"237.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"550.0"
y=
"237.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow16"
id=
"BPMNEdge_flow16"
>
<omgdi:waypoint
x=
"655.0"
y=
"237.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"775.0"
y=
"237.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow17"
id=
"BPMNEdge_flow17"
>
<omgdi:waypoint
x=
"410.0"
y=
"217.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"410.0"
y=
"107.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"550.0"
y=
"107.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow18"
id=
"BPMNEdge_flow18"
>
<omgdi:waypoint
x=
"655.0"
y=
"107.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"795.0"
y=
"107.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"795.0"
y=
"217.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow19"
id=
"BPMNEdge_flow19"
>
<omgdi:waypoint
x=
"815.0"
y=
"237.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"940.0"
y=
"237.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge
bpmnElement=
"flow20"
id=
"BPMNEdge_flow20"
>
<omgdi:waypoint
x=
"1045.0"
y=
"237.0"
></omgdi:waypoint>
<omgdi:waypoint
x=
"1140.0"
y=
"237.0"
></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录