Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
Flowable Engine
提交
0aef5c1c
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,发现更多精彩内容 >>
提交
0aef5c1c
编写于
4月 21, 2015
作者:
J
Joram Barrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix nested subprocesses tests
上级
2bc90b79
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
23 deletion
+6
-23
modules/activiti-engine/src/main/java/org/activiti/engine/impl/agenda/EndExecutionOperation.java
...rg/activiti/engine/impl/agenda/EndExecutionOperation.java
+0
-14
modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/subprocess/SubProcessTest.java
.../activiti/engine/test/bpmn/subprocess/SubProcessTest.java
+6
-9
未找到文件。
modules/activiti-engine/src/main/java/org/activiti/engine/impl/agenda/EndExecutionOperation.java
浏览文件 @
0aef5c1c
...
...
@@ -56,20 +56,6 @@ public class EndExecutionOperation extends AbstractOperation {
if
(
executionEntity
.
getCurrentFlowElement
()
instanceof
EndEvent
)
{
EndEvent
endEvent
=
(
EndEvent
)
executionEntity
.
getCurrentFlowElement
();
subProcess
=
endEvent
.
getSubProcess
();
// TODO: discuss why this is needed. Is it needed in each case?
if
(
parentExecution
.
getParentId
()
!=
null
&&
!
parentExecution
.
getParentId
().
equals
(
parentExecution
.
getProcessInstanceId
()))
{
deleteExecution
(
commandContext
,
parentExecution
);
parentExecution
=
executionEntityManager
.
get
(
parentExecution
.
getParentId
());
if
(
subProcess
!=
null
&&
subProcess
.
getLoopCharacteristics
()
!=
null
&&
subProcess
.
getBehavior
()
instanceof
MultiInstanceActivityBehavior
)
{
MultiInstanceActivityBehavior
multiInstanceBehavior
=
(
MultiInstanceActivityBehavior
)
subProcess
.
getBehavior
();
parentExecution
.
setCurrentFlowElement
(
subProcess
);
multiInstanceBehavior
.
leave
(
parentExecution
);
return
;
}
}
}
if
(
subProcess
!=
null
)
{
...
...
modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/subprocess/SubProcessTest.java
浏览文件 @
0aef5c1c
...
...
@@ -62,19 +62,17 @@ public class SubProcessTest extends PluggableActivitiTestCase {
Date
startTime
=
new
Date
();
// After staring the process, the task in the subprocess should be
// active
// After staring the process, the task in the subprocess should be active
ProcessInstance
pi
=
runtimeService
.
startProcessInstanceByKey
(
"simpleSubProcess"
);
Task
subProcessTask
=
taskService
.
createTaskQuery
().
processInstanceId
(
pi
.
getId
()).
singleResult
();
assertEquals
(
"Task in subprocess"
,
subProcessTask
.
getName
());
// Setting the clock forward 2 hours 1 second (timer fires in 2 hours)
// and fire up the job executor
// Setting the clock forward 2 hours 1 second (timer fires in 2 hours) and fire up the job executor
processEngineConfiguration
.
getClock
().
setCurrentTime
(
new
Date
(
startTime
.
getTime
()
+
(
2
*
60
*
60
*
1000
)
+
1000
));
waitForJobExecutorToProcessAllJobs
(
5000L
,
50L
);
assertEquals
(
1
,
managementService
.
createJobQuery
().
executable
().
count
());
waitForJobExecutorToProcessAllJobs
(
5000L
,
500L
);
// The subprocess should be left, and the escalated task should be
// active
// The subprocess should be left, and the escalated task should be active
Task
escalationTask
=
taskService
.
createTaskQuery
().
processInstanceId
(
pi
.
getId
()).
singleResult
();
assertEquals
(
"Fix escalated problem"
,
escalationTask
.
getName
());
}
...
...
@@ -282,8 +280,7 @@ public class SubProcessTest extends PluggableActivitiTestCase {
assertEquals
(
"Task in subprocess A"
,
taskA
.
getName
());
assertEquals
(
"Task in subprocess B"
,
taskB
.
getName
());
// Completing both tasks should active the tasks outside the
// subprocesses
// Completing both tasks should active the tasks outside the subprocesses
taskService
.
complete
(
taskA
.
getId
());
taskService
.
complete
(
taskB
.
getId
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录