--- alias: user-guide-automation-task-fa-onabort tags: - automation tasks description: "This task handles abort events from the Worker Manager, triggering custom logic and reporting success or failure" --- # On Abort The **onAbort** task receives an `onAbort` event from the Worker Manager and emits outputs that allow custom logic to be executed for aborting the current Job. Based on the result of that custom logic, the task receives either a `Success` or `Failure` input and sends the corresponding result back to the Worker Manager. ![task_on_abort][task_on_abort] ## Details | Fields | Details | | ----------------- | ---------------------------------------------------------------------------------- | | Scope | Factory Automation
Enterprise Integration
Data Platform | | Workflow | Data flow
Control flow | | `IsProtocol` flag | :material-close:{ style="color: #EF5350" } | ## Inputs | Name | Data Type | Description | | -------- | --------- | -------------------------------------------------------- | | Success | `any` | Triggering this input will result in the `Abort` success | | Failure | `any` | Triggering this input will result in the `Abort` failure | Table: On Abort inputs ## Outputs | Name | Data Type | Description | | -------- | --------- | ------------------------------------------------------------------- | | job id | `any` | Emits the current Job ID after receiving an `onAbort` event | | Raw | `any` | Emits the raw data received in the `onAbort` event | | Activate | `any` | Activates the task execution | Table: On Abort outputs ## Settings In the **General** Tab, you can configure standard settings as well as the following option: | Name | Data Type | Default | Description | | ------- | --------- | ------- | ------------------- | | Timeout | `Integer` | 300000 | Timeout for the Abort process. The default is 5 minutes (300000 ms) and 0 means there's no timeout. | Table: On Abort settings Additional outputs can be defined in the **Outputs** tab. ![on_abort_settings][on_abort_settings] ## Behavior The **On Abort** task must be used with the Worker Manager, which initiates it through the `onAbort` event. After the event is received, custom logic can be inserted in the workflow, and then connected to the `Success` or `Failure` inputs to determine the outcome. [on_abort_settings]: ./images/on_abort_settings.png [task_on_abort]: ./images/task_on_abort.png