|
|
|
|
@ -587,13 +587,15 @@ public class FlwTaskServiceImpl implements IFlwTaskService {
|
|
|
|
|
Instance instance = insService.getById(task.getInstanceId());
|
|
|
|
|
Definition definition = defService.getById(task.getDefinitionId());
|
|
|
|
|
Map<String, Object> mergeVariable = MapUtil.mergeAll(instance.getVariableMap(), variables);
|
|
|
|
|
//获取下一节点列表
|
|
|
|
|
// 获取下一节点列表
|
|
|
|
|
List<Node> nextNodeList = nodeService.getNextNodeList(task.getDefinitionId(), task.getNodeCode(), null, SkipType.PASS.getKey(), mergeVariable);
|
|
|
|
|
List<FlowNode> nextFlowNodes = BeanUtil.copyToList(nextNodeList, FlowNode.class);
|
|
|
|
|
// 只获取中间节点
|
|
|
|
|
nextFlowNodes = StreamUtils.filter(nextFlowNodes, node -> NodeType.BETWEEN.getKey().equals(node.getNodeType()));
|
|
|
|
|
if (CollUtil.isNotEmpty(nextNodeList)) {
|
|
|
|
|
//构建以下节点数据
|
|
|
|
|
// 构建以下节点数据
|
|
|
|
|
List<Task> buildNextTaskList = StreamUtils.toList(nextNodeList, node -> taskService.addTask(node, instance, definition, null));
|
|
|
|
|
//办理人变量替换
|
|
|
|
|
// 办理人变量替换
|
|
|
|
|
ExpressionUtil.evalVariable(buildNextTaskList, mergeVariable);
|
|
|
|
|
for (FlowNode flowNode : nextFlowNodes) {
|
|
|
|
|
buildNextTaskList.stream().filter(t -> t.getNodeCode().equals(flowNode.getNodeCode())).findFirst().ifPresent(t -> {
|
|
|
|
|
|