1
0

修复COMPLETE事件发生时机不对

This commit is contained in:
2025-01-07 14:21:32 +08:00
parent 2054f5802b
commit 935793d5b6

View File

@@ -145,8 +145,9 @@ public abstract class FlowableManager {
} }
private void action(FlowableInstance instance, FlowableNode node, FlowableAction action, String comment) { private void action(FlowableInstance instance, FlowableNode node, FlowableAction action, String comment) {
if (FlowableInstance.Status.COMPLETED.equals(instance.getStatus()) || FlowableInstance.Status.ERROR.equals(instance.getStatus())) {
callListeners(node.getListeners(), listener -> listener.onActionStart(instance, node)); callListeners(node.getListeners(), listener -> listener.onActionStart(instance, node));
if (FlowableInstance.Status.COMPLETED.equals(instance.getStatus()) || FlowableInstance.Status.TERMINAL.equals(instance.getStatus())) {
throw new IllegalArgumentException("ID为" + instance.getInstanceId() + "的流程已结束,无法操作"); throw new IllegalArgumentException("ID为" + instance.getInstanceId() + "的流程已结束,无法操作");
} }