update - 系统终止添加 operationDesc

This commit is contained in:
wangli 2024-01-09 11:21:40 +08:00
parent 08954b0e5d
commit 6a04af9fac

View File

@ -19,6 +19,7 @@ import java.util.Map;
import java.util.Objects;
import static cn.axzo.workflow.common.constant.BpmnConstants.ABORT_ID;
import static cn.axzo.workflow.common.constant.BpmnConstants.COMMENT_TYPE_OPERATION_DESC;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_DELETE_PROCESS_FLAG;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_END_TENANT_ID;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_END_USER_ID;
@ -31,6 +32,7 @@ import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.CANCEL
import static cn.axzo.workflow.core.common.code.BpmnInstanceRespCode.PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS;
import static cn.axzo.workflow.core.common.code.BpmnInstanceRespCode.PROCESS_INSTANCE_CANT_ABORT;
import static cn.axzo.workflow.core.common.code.BpmnInstanceRespCode.PROCESS_INSTANCE_NOT_EXISTS;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.addComment;
import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.createVirtualTask;
/**
@ -101,6 +103,7 @@ public class CustomAbortProcessInstanceCmd implements Command<Void>, Serializabl
Task task = createVirtualTask(commandContext, extAxHiTaskInstService, processInstanceId,
"系统终止", ABORT_ID, reason, BpmnTaskDelegateAssigner.buildDummyAssigner("system",
TASK_ASSIGNEE_SKIP_FLAT, "系统"), ABORTED.getStatus());
addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, "系统终止");
runtimeService.setVariable(task.getProcessInstanceId(), TASK_COMPLETE_OPERATION_TYPE + task.getId(), ABORTED);
return null;
}