feat(REQ-5965) - 添加前加签代码逻辑,自测流程引擎内部是否正常

This commit is contained in:
wangli 2025-10-11 18:06:12 +08:00
parent f461d17d2c
commit 0a1be99b3e

View File

@ -38,6 +38,7 @@ import java.util.stream.Collectors;
import static cn.axzo.workflow.common.code.OtherRespCode.ASSIGNEE_NODE_ID_NOT_EXISTS;
import static cn.axzo.workflow.common.constant.BpmnConstants.COUNTERSIGN_ASSIGNER_SHOW_NUMBER;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_ACTIVITY_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_TASK_RELATION_ASSIGNEE_INFO;
import static cn.axzo.workflow.common.enums.BpmnCountersignTypeEnum.FORWARD_COUNTERSIGN;
import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.COUNTERSIGN;
import static cn.axzo.workflow.core.common.utils.BpmnMetaParserHelper.getCategoryVersion;
@ -170,7 +171,6 @@ public class CustomCountersignUserTaskCmd extends AbstractCommand<Void> implemen
taskService.saveTask(taskEntity);
valuTargetAssigneeList.forEach(e -> {
// TODO 创建新的任务
TaskEntityImpl subTask = (TaskEntityImpl) taskService.newTask(idGenerator.getNextId());
subTask.setName(task.getName());
subTask.setDescription(task.getDescription());
@ -183,8 +183,11 @@ public class CustomCountersignUserTaskCmd extends AbstractCommand<Void> implemen
subTask.setPriority(task.getPriority());
subTask.setCreateTime(new Date());
subTask.setTenantId(task.getTenantId());
subTask.setAssignee(e.buildAssigneeId());
// subTask.setAssignee(e.buildAssigneeId());
taskService.saveTask(subTask);
// 设置快照信息
subTask.setVariable(INTERNAL_TASK_RELATION_ASSIGNEE_INFO + subTask.getId(), e.toJson());
taskService.setAssignee(subTask.getParentTaskId(), e.buildAssigneeId());
});
}
}