REQ-2924-修复回退可达路径校验错误问题

This commit is contained in:
yangqicheng 2024-09-12 15:57:54 +08:00
parent d05c42b606
commit c565a8c4e2
3 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ public class CustomBackTaskAsyncCmd extends AbstractCommand<String> implements S
} }
FlowElement sourceFlowElement = process.getFlowElement(taskEntity.getTaskDefinitionKey(), true); FlowElement sourceFlowElement = process.getFlowElement(taskEntity.getTaskDefinitionKey(), true);
// 退回节点到当前节点不可达到不允许退回 // 退回节点到当前节点不可达到不允许退回
if (!BpmnModelUtils.isReachable(process, (FlowNode) sourceFlowElement, (FlowNode) targetFlowElement)) { if (!BpmnModelUtils.isReachable(process, (FlowNode) targetFlowElement, (FlowNode) sourceFlowElement)) {
throw new WorkflowEngineException(BACK_NODE_CANNOT_REACHABLE, dto.getToActivityId()); throw new WorkflowEngineException(BACK_NODE_CANNOT_REACHABLE, dto.getToActivityId());
} }

View File

@ -82,7 +82,7 @@ public class CustomBackTaskCmd extends AbstractCommand<Void> implements Serializ
} }
FlowElement sourceFlowElement = process.getFlowElement(task.getTaskDefinitionKey(), true); FlowElement sourceFlowElement = process.getFlowElement(task.getTaskDefinitionKey(), true);
// 退回节点到当前节点不可达到不允许退回 // 退回节点到当前节点不可达到不允许退回
if (!BpmnModelUtils.isReachable(process, (FlowNode) sourceFlowElement, (FlowNode) targetFlowElement)) { if (!BpmnModelUtils.isReachable(process, (FlowNode) targetFlowElement, (FlowNode) sourceFlowElement)) {
throw new WorkflowEngineException(BACK_NODE_CANNOT_REACHABLE, dto.getToActivityId()); throw new WorkflowEngineException(BACK_NODE_CANNOT_REACHABLE, dto.getToActivityId());
} }
batchAddAttachment(commandContext, task.getProcessInstanceId(), dto.getTaskId(), dto.getAttachmentList(), dto.getApprover()); batchAddAttachment(commandContext, task.getProcessInstanceId(), dto.getTaskId(), dto.getAttachmentList(), dto.getApprover());

View File

@ -15,7 +15,7 @@ import org.slf4j.LoggerFactory;
* @since 2024/5/21 09:46 * @since 2024/5/21 09:46
*/ */
public class CustomCommandContext extends CommandContext { public class CustomCommandContext extends CommandContext {
private static final Logger LOGGER = LoggerFactory.getLogger(CommandContext.class); private static final Logger LOGGER = LoggerFactory.getLogger(CustomCommandContext.class);
public CustomCommandContext(Command<?> command) { public CustomCommandContext(Command<?> command) {
super(command); super(command);