修复抄送后连续创建任务bug
This commit is contained in:
parent
4fb37d39cd
commit
54e0e2c667
@ -920,7 +920,14 @@ public class TaskServiceImpl implements TaskService {
|
||||
/*
|
||||
* 可能存在子节点
|
||||
*/
|
||||
nodeModel.nextNode().ifPresent(nextNode -> nextNode.execute(execution.getEngine().getContext(), execution));
|
||||
Optional<NodeModel> nextNodeOptional = nodeModel.nextNode();
|
||||
if (nextNodeOptional.isPresent()) {
|
||||
// 执行下一个节点
|
||||
nextNodeOptional.get().execute(execution.getEngine().getContext(), execution);
|
||||
} else {
|
||||
// 不存在任何子节点结束流程
|
||||
execution.endInstance(nodeModel);
|
||||
}
|
||||
} else if (TaskType.conditionNode.eq(nodeType)) {
|
||||
/*
|
||||
* 3,条件审批
|
||||
|
@ -295,20 +295,7 @@ public class NodeModel implements ModelInstance, Serializable {
|
||||
|| TaskType.trigger.eq(this.type)) {
|
||||
|
||||
// 创建任务
|
||||
if (flowLongContext.createTask(execution, this)) {
|
||||
|
||||
// 抄送任务,需要继续往下执行
|
||||
if (TaskType.cc.eq(this.type)) {
|
||||
Optional<NodeModel> nextNodeOptional = this.nextNode();
|
||||
if (nextNodeOptional.isPresent()) {
|
||||
// 执行下一个节点
|
||||
flowLongContext.createTask(execution, nextNodeOptional.get());
|
||||
} else {
|
||||
// 不存在任何子节点结束流程
|
||||
execution.endInstance(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
flowLongContext.createTask(execution, this);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user