CancelProcessActivity
Overview
Cancels a specified Process Activity , handling employee check-outs automatically if configured. The service validates that the Process Activity is in a state that allows cancellation, performs any necessary employee check-outs, terminates the active checklist instance if applicable, and sets the Process Activity state to Canceled.
Action Groups
- Orchestration.IndEqManagementOrchestration.CancelProcessActivity.Pre
- Orchestration.IndEqManagementOrchestration.CancelProcessActivity.Post
| Name | Type | Description |
| ProcessActivity | IndEqProcessActivity | The Process Activity to be canceled |
Output Object
| Name | Type | Description |
| ProcessActivity | IndEqProcessActivity | The updated Process Activity in Canceled state |
Pre Conditions
- The input ProcessActivity must not be null and must exist.
- The ProcessActivity must be in one of the following states before cancellation: Open, In Progress, or Paused.
How it works
- Validates the input is not null and loads the full ProcessActivity entity.
- Checks that the ProcessActivity is in a cancellable state (Open, In Progress, or Paused). If not, it throws an exception.
- Checks if there are any employees currently checked in to the Process Activity .
- If employees are checked in and the Process Activity definition allows:
- Auto check-out on close is enabled: performs automatic check-out for all checked-in employees.
- Otherwise, cancellation proceeds only if no employees remain checked in; if employees remain checked in, the Process Activity cannot be terminated.
- If the Process Activity cannot be terminated due to checked-in employees, it terminates the active checklist instance (if any) to keep dependencies consistent.
- Sets the system state of the Process Activity to Canceled.
- If allowed, terminates the Process Activity only when there is no checklist associated to the Process Activity to finalize cancellation.
- Returns the updated Process Activity in the output.
Assumptions
- Employee check-in and check-out states are managed consistently.
- Process activity termination and checklist termination handle all necessary cleanup.
- Role and permission checks for cancellation are handled externally or before calling this service.
- Application context flag IndEqTerminateDependenciesOnPATermination is used to control side effects during termination.