# SkipProcessActivity ## Overview The service validates that the Process Activity is in a state that allows skipping, performs any necessary employee check-outs, sets the Process Activity state to *Skipped* , and terminates the Process Activity if applicable. ## Action Groups * Orchestration.IndEqManagementOrchestration.SkipProcessActivity.Pre * Orchestration.IndEqManagementOrchestration.SkipProcessActivity.Post ## Input Object | Name | Type | Description | | --------------- | :------------------: | ----------------------------------- | | ProcessActivity | IndEqProcessActivity | The Process Activity to be skipped | ## Output Object | Name | Type | Description | | --------------- | :------------------: | ----------------------------------------------- | | ProcessActivity | IndEqProcessActivity | The updated Process Activity inĀ *Skipped* state | ## Pre Conditions * The input *ProcessActivity* must not be null. * The *ProcessActivity* must be in one of the following states before cancellation: *Open*, Planned(doesn't exist). ## How it works 1. Validates the input is not null and loads the full *ProcessActivity* entity if exits. 2. Checks that the *ProcessActivity* is in a skippable state (*Open* or *Planned*). If not, it throws an exception. 3. Sets the system state of the Process Activity to *Skipped*. - If the Process Activity is in *Open* state, change the system state to *Skipped*. - If the Process Activity is in *Planned* state, create it with SystemState *Skipped*. 4. Checks if there are any employees currently checked in to the Process Activity. 5. 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, if employees remain checked in, the Process Activity would not be terminated. 6. If allowed, terminates the Process Activity only when there is no checklist associated to the Process Activity to finalize the skip. 7. Returns the updated Process Activity in the output. ## Assumptions * Employee check-in and check-out states are managed consistently. * Process activity termination handle all necessary cleanup. * Role and permission checks for skip are handled externally or before calling this service. * Application context flag *ServiceCancelCompleteProcessActivity* is used to control side effects during check-out employees.