update - 修复自动通过会影响后续节点的问题

This commit is contained in:
wangli 2023-12-08 15:04:11 +08:00
parent e7551e11af
commit b805349f10

View File

@ -67,11 +67,13 @@ public class EngineExecutionStartListener implements ExecutionListener {
execution.setVariable("assigneeUserId", assigneeIdList.get(0));
}
// 审批人为空并且当前节点设置了自动跳过条件
} else if (StringUtils.hasLength(userTask.getSkipExpression())) {
}
if (StringUtils.hasLength(userTask.getSkipExpression())) {
// 自动通过的默认引擎参数必须设置为 true
execution.setTransientVariable(BpmConstants.FLOWABLE_SKIP_EXPRESSION_ENABLE, true);
// 设置当前 UserTask 使用的 skip 表达式
execution.setTransientVariable(BPM_ALLOW_SKIP_USER_TASK + userTask.getId(), true);
execution.setTransientVariable(BPM_ALLOW_SKIP_USER_TASK + userTask.getId(),
CollectionUtils.isEmpty(assigners));
}
execution.setVariable(variable, assigneeIdList);
});