|
@@ -43,19 +43,6 @@ public class JumpDelegate implements JavaDelegate {
|
|
|
FlowDefine define = flowDefineService.getDefine(entity.getProcessDefinitionId());
|
|
|
JumpNode jumpNode = define.getNode(execution.getCurrentActivityId(), JumpNode.class);
|
|
|
String targetNode = jumpNode.getTargetNode();
|
|
|
- log.info("跳转节点:{}", targetNode);
|
|
|
- List<String> executionIds = managementService.executeCommand(new JumpActivityCmd(
|
|
|
- execution.getProcessInstanceId(),
|
|
|
- targetNode
|
|
|
- ));
|
|
|
- // 删除当前节点的活动记录
|
|
|
- if (CollectionUtils.isNotEmpty(executionIds)) {
|
|
|
- flowActivityService.lambdaUpdate()
|
|
|
- .eq(FlowActivity::getInstanceId, execution.getProcessInstanceId())
|
|
|
- .eq(FlowActivity::getStatus, ProcessStatus.RUNNING)
|
|
|
- .in(FlowActivity::getParentId, executionIds)
|
|
|
- .remove();
|
|
|
- }
|
|
|
// 记录日志
|
|
|
Node target = define.getNode(jumpNode.getTargetNode(), Node.class);
|
|
|
FlowElement flowElement = entity.getCurrentFlowElement();
|
|
@@ -74,5 +61,18 @@ public class JumpDelegate implements JavaDelegate {
|
|
|
comment.setAttachments(Lists.newArrayList());
|
|
|
flowActivity.setComment(Lists.newArrayList(comment));
|
|
|
flowActivityService.save(flowActivity);
|
|
|
+ log.info("跳转节点:{}", targetNode);
|
|
|
+ List<String> executionIds = managementService.executeCommand(new JumpActivityCmd(
|
|
|
+ execution.getProcessInstanceId(),
|
|
|
+ targetNode
|
|
|
+ ));
|
|
|
+ // 删除当前节点的活动记录
|
|
|
+ if (CollectionUtils.isNotEmpty(executionIds)) {
|
|
|
+ flowActivityService.lambdaUpdate()
|
|
|
+ .eq(FlowActivity::getInstanceId, execution.getProcessInstanceId())
|
|
|
+ .eq(FlowActivity::getStatus, ProcessStatus.RUNNING)
|
|
|
+ .in(FlowActivity::getParentId, executionIds)
|
|
|
+ .remove();
|
|
|
+ }
|
|
|
}
|
|
|
}
|