update - 转交功能移除删除本 Task 的逻辑

This commit is contained in:
wangli 2024-01-13 01:06:15 +08:00
parent f432c76905
commit be5ef4c960

View File

@ -21,12 +21,10 @@ import java.util.List;
import static cn.axzo.workflow.common.constant.BpmnConstants.COMMENT_TYPE_OPERATION_DESC;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_ACTIVITY_RELATION_ASSIGNEE_LIST_INFO_SNAPSHOT;
import static cn.axzo.workflow.common.constant.BpmnConstants.TASK_COMPLETE_OPERATION_TYPE;
import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.COUNTERSIGN;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.addComment;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.batchAddAttachment;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.createVirtualTask;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.deleteMultiTask;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.validTask;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.validTaskAssignerDuplicated;
@ -92,8 +90,6 @@ public class CustomCountersignUserTaskCmd implements Command<Void>, Serializable
break;
}
((TaskEntity) task).setTransientVariable(TASK_COMPLETE_OPERATION_TYPE + task.getId(), COUNTERSIGN.getStatus());
deleteMultiTask(commandContext, (TaskEntity) task);
return null;
}
@ -116,8 +112,6 @@ public class CustomCountersignUserTaskCmd implements Command<Void>, Serializable
runtimeService.setVariable(taskEntity.getProcessInstanceId(), activityListSnapshot, taskDelegateAssigners);
log.info("正在进行加签任务:{},待加签人合并列表:{}", taskEntity.getId(), JSONUtil.toJsonStr(taskDelegateAssigners));
// 因为当前的审批人会帮他结束任务,以便生成加签日志, 所以在这里重新加入审批人
// targetTaskAssigneeList.add(originTaskAssignee);
targetTaskAssigneeList.forEach(assigner -> {
CustomTaskHelper.addMultiTask(commandContext, taskEntity, assigner);
});