update - 审批人去重后, 调整审批日志处理逻辑

This commit is contained in:
wangli 2024-01-10 14:08:28 +08:00
parent 0056e50a66
commit 8387b00a3b

View File

@ -25,8 +25,8 @@ import java.util.List;
import java.util.Objects;
import static cn.axzo.workflow.common.constant.BpmnConstants.COMMENT_TYPE_OPERATION_DESC;
import static cn.axzo.workflow.common.constant.BpmnConstants.DUMMY_ASSIGNEE_ID;
import static cn.axzo.workflow.common.constant.BpmnConstants.HIDDEN_ASSIGNEE_ID;
import static cn.axzo.workflow.common.constant.BpmnConstants.NO_ASSIGNEE;
import static cn.axzo.workflow.common.constant.BpmnConstants.TASK_ASSIGNEE_SKIP_FLAT;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_ROBOT;
import static cn.axzo.workflow.core.common.code.BpmnTaskRespCode.DUMMY_TASK_CANT_CREATED;
@ -79,7 +79,7 @@ public class CustomCreateDummyTaskCmd implements Command<String>, Serializable {
TaskService taskService = processEngineConfiguration.getTaskService();
List<Task> activeTaskList = taskService.createTaskQuery().processInstanceId(processInstanceId).active().list();
activeTaskList.stream().filter(task -> Objects.equals(task.getAssignee(), DUMMY_ASSIGNEE_ID)).findAny().ifPresent(task -> {
activeTaskList.stream().filter(task -> Objects.equals(task.getAssignee(), NO_ASSIGNEE)).findAny().ifPresent(task -> {
throw new WorkflowEngineException(DUMMY_TASK_CANT_CREATED, processInstanceId);
});
activeTaskList.stream().filter(task -> Objects.equals(task.getTaskDefinitionKey(), NODE_ROBOT.getType())).findAny().ifPresent(task -> {