feat: cancel running instances as CANCELLED without initiator checks
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -38,6 +38,11 @@ public interface OrdoEngine {
|
||||
return withdraw(instanceId, actor, null);
|
||||
}
|
||||
ProcessInstance withdraw(String instanceId, String actor, String comment);
|
||||
|
||||
default ProcessInstance cancel(String instanceId, String actor) {
|
||||
return cancel(instanceId, actor, null);
|
||||
}
|
||||
ProcessInstance cancel(String instanceId, String actor, String comment);
|
||||
Optional<ProcessInstance> findInstance(String instanceId);
|
||||
Optional<ApprovalTask> findTask(String taskId);
|
||||
List<ApprovalTask> findTasks(String instanceId);
|
||||
|
||||
@@ -12,6 +12,7 @@ public enum ProcessEventType {
|
||||
INSTANCE_APPROVED,
|
||||
INSTANCE_REJECTED,
|
||||
INSTANCE_WITHDRAWN,
|
||||
INSTANCE_CANCELLED,
|
||||
ACTION_SUCCEEDED,
|
||||
ACTION_FAILED
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package com.jetlumen.ordo.api;
|
||||
|
||||
public enum ProcessStatus {
|
||||
RUNNING, APPROVED, REJECTED, WITHDRAWN
|
||||
RUNNING, APPROVED, REJECTED, WITHDRAWN, CANCELLED
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user