Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
2e67a74c
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,发现更多精彩内容 >>
提交
2e67a74c
编写于
10月 02, 2017
作者:
M
Michael Lippens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
issue #587 submit test case for non terminating end event that removes event subs
上级
f535508e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
102 addition
and
0 deletion
+102
-0
modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/gateway/ParallelGatewayTest.java
...lowable/engine/test/bpmn/gateway/ParallelGatewayTest.java
+74
-0
modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/gateway/ParallelGatewayTest.testNonTerminatingEndEventShouldNotRemoveSubscriptions.bpmn20.xml
...erminatingEndEventShouldNotRemoveSubscriptions.bpmn20.xml
+28
-0
未找到文件。
modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/gateway/ParallelGatewayTest.java
浏览文件 @
2e67a74c
...
...
@@ -16,11 +16,18 @@ package org.flowable.engine.test.bpmn.gateway;
import
java.util.List
;
import
org.flowable.engine.common.impl.history.HistoryLevel
;
import
org.flowable.engine.common.impl.interceptor.Command
;
import
org.flowable.engine.common.impl.interceptor.CommandContext
;
import
org.flowable.engine.history.HistoricActivityInstance
;
import
org.flowable.engine.impl.EventSubscriptionQueryImpl
;
import
org.flowable.engine.impl.test.HistoryTestHelper
;
import
org.flowable.engine.impl.test.PluggableFlowableTestCase
;
import
org.flowable.engine.impl.util.CommandContextUtil
;
import
org.flowable.engine.repository.ProcessDefinition
;
import
org.flowable.engine.runtime.EventSubscription
;
import
org.flowable.engine.runtime.ProcessInstance
;
import
org.flowable.engine.test.Deployment
;
import
org.flowable.task.service.Task
;
import
org.flowable.task.service.TaskQuery
;
import
org.junit.Assert
;
...
...
@@ -178,4 +185,71 @@ public class ParallelGatewayTest extends PluggableFlowableTestCase {
}
}
@Deployment
public
void
testNonTerminatingEndEventShouldNotRemoveSubscriptions
()
{
ProcessDefinition
processDefinition
=
repositoryService
.
createProcessDefinitionQuery
()
.
processDefinitionKey
(
"ec7ca606-a4f2-11e7-abc4-cec278b6b50a"
)
.
singleResult
();
final
ProcessInstance
processInstance
=
runtimeService
.
createProcessInstanceBuilder
()
.
processDefinitionId
(
processDefinition
.
getId
())
.
start
();
List
<
Task
>
tasks
=
taskService
.
createTaskQuery
()
.
processInstanceId
(
processInstance
.
getProcessInstanceId
())
.
list
();
assertEquals
(
1
,
tasks
.
size
());
String
executionId
=
processEngine
.
getManagementService
().
executeCommand
(
new
Command
<
String
>()
{
@Override
public
String
execute
(
CommandContext
commandContext
)
{
EventSubscriptionQueryImpl
q
=
new
EventSubscriptionQueryImpl
(
commandContext
);
q
.
processInstanceId
(
processInstance
.
getProcessInstanceId
());
List
<
EventSubscription
>
subs
=
CommandContextUtil
.
getEventSubscriptionEntityManager
()
.
findEventSubscriptionsByQueryCriteria
(
q
);
assertEquals
(
1
,
subs
.
size
());
EventSubscription
sub
=
subs
.
get
(
0
);
assertEquals
(
sub
.
getEventName
(),
"testmessage"
);
return
sub
.
getExecutionId
();
}
});
taskService
.
complete
(
tasks
.
get
(
0
).
getId
());
tasks
=
taskService
.
createTaskQuery
()
.
processInstanceId
(
processInstance
.
getProcessInstanceId
())
.
taskName
(
"task 2"
)
.
list
();
assertEquals
(
1
,
tasks
.
size
());
taskService
.
complete
(
tasks
.
get
(
0
).
getId
());
tasks
=
taskService
.
createTaskQuery
().
processInstanceId
(
processInstance
.
getProcessInstanceId
()).
list
();
assertEquals
(
1
,
tasks
.
size
());
executionId
=
processEngine
.
getManagementService
().
executeCommand
(
new
Command
<
String
>()
{
@Override
public
String
execute
(
CommandContext
commandContext
)
{
EventSubscriptionQueryImpl
q
=
new
EventSubscriptionQueryImpl
(
commandContext
);
q
.
processInstanceId
(
processInstance
.
getProcessInstanceId
());
List
<
EventSubscription
>
subs
=
CommandContextUtil
.
getEventSubscriptionEntityManager
()
.
findEventSubscriptionsByQueryCriteria
(
q
);
assertEquals
(
1
,
subs
.
size
());
EventSubscription
sub
=
subs
.
get
(
0
);
assertEquals
(
sub
.
getEventName
(),
"testmessage"
);
return
sub
.
getExecutionId
();
}
});
}
}
modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/gateway/ParallelGatewayTest.testNonTerminatingEndEventShouldNotRemoveSubscriptions.bpmn20.xml
0 → 100644
浏览文件 @
2e67a74c
<?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:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:flowable=
"http://flowable.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=
"http://www.activiti.org/processdef"
>
<message
id=
"testmessage"
name=
"testmessage"
/>
<process
id=
"ec7ca606-a4f2-11e7-abc4-cec278b6b50a"
name=
"bug-end-event-terminates-subscriptions"
isExecutable=
"true"
>
<startEvent
id=
"sid-68AB1FA5-A6A3-4FC3-BAF9-287F523D28FD"
/>
<userTask
id=
"sid-AEC348F2-DC13-4EF0-AD2F-0D2A4263986C"
name=
"task 1"
/>
<sequenceFlow
id=
"sid-5AF1E880-8880-4EC2-BD54-299BA0081D4A"
sourceRef=
"sid-68AB1FA5-A6A3-4FC3-BAF9-287F523D28FD"
targetRef=
"sid-AEC348F2-DC13-4EF0-AD2F-0D2A4263986C"
/>
<sequenceFlow
id=
"sid-947D5427-0C07-4CDB-BE72-7B50CE67C738"
sourceRef=
"sid-AEC348F2-DC13-4EF0-AD2F-0D2A4263986C"
targetRef=
"sid-87211CCC-626E-4202-AF21-7130C2EC46A0"
/>
<parallelGateway
id=
"sid-87211CCC-626E-4202-AF21-7130C2EC46A0"
/>
<userTask
id=
"sid-83B9B6F6-ADA5-416B-805D-70BA473A09CD"
name=
"task 3"
/>
<sequenceFlow
id=
"sid-6EF184F9-4C7D-466D-8CB1-4CEAACA9E89D"
sourceRef=
"sid-87211CCC-626E-4202-AF21-7130C2EC46A0"
targetRef=
"sid-83B9B6F6-ADA5-416B-805D-70BA473A09CD"
/>
<endEvent
id=
"sid-2CD0FEBA-D553-4D75-A8A8-84E66653017B"
/>
<sequenceFlow
id=
"sid-A0733B46-86EF-4BB1-8570-F1C2F4AB0836"
sourceRef=
"sid-83B9B6F6-ADA5-416B-805D-70BA473A09CD"
targetRef=
"sid-2CD0FEBA-D553-4D75-A8A8-84E66653017B"
/>
<userTask
id=
"sid-23B4AE4A-0FA7-4352-920F-E0ADFAF5CD45"
name=
"task 2"
/>
<sequenceFlow
id=
"sid-BEF95839-A52E-4197-B216-247E7E286787"
sourceRef=
"sid-87211CCC-626E-4202-AF21-7130C2EC46A0"
targetRef=
"sid-23B4AE4A-0FA7-4352-920F-E0ADFAF5CD45"
/>
<endEvent
id=
"sid-F11C7072-ED46-471F-8AC6-3D58CCB219C4"
/>
<sequenceFlow
id=
"sid-8F5069BB-361C-4D0B-9DEF-A2C3B129E5E8"
sourceRef=
"sid-23B4AE4A-0FA7-4352-920F-E0ADFAF5CD45"
targetRef=
"sid-F11C7072-ED46-471F-8AC6-3D58CCB219C4"
/>
<subProcess
id=
"sid-7A1F2BCA-0901-4C42-B07B-058F274E1AB7"
name=
"subProcess"
triggeredByEvent=
"true"
>
<startEvent
id=
"sid-3424CB22-151B-45F6-980D-74544EEFAEF7"
isInterrupting=
"false"
>
<messageEventDefinition
messageRef=
"testmessage"
/>
</startEvent>
<userTask
id=
"sid-18E43470-81FF-4DA8-9F0C-348B02A0CA3C"
name=
"message task"
/>
<endEvent
id=
"sid-44386EE8-23A4-4171-80A6-763C4C1EE2DB"
/>
<sequenceFlow
id=
"sid-89F6ECA4-CD1E-40A2-B24F-4B8DD8612863"
sourceRef=
"sid-3424CB22-151B-45F6-980D-74544EEFAEF7"
targetRef=
"sid-18E43470-81FF-4DA8-9F0C-348B02A0CA3C"
/>
<sequenceFlow
id=
"sid-977747BD-F95E-4F50-9A0C-3BCD72C3D759"
sourceRef=
"sid-18E43470-81FF-4DA8-9F0C-348B02A0CA3C"
targetRef=
"sid-44386EE8-23A4-4171-80A6-763C4C1EE2DB"
/>
</subProcess>
</process>
</definitions>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录