--- alias: user-guide-automation-task-fa-jobstate tags: - automation tasks description: "This task retrieves and updates job state information, triggering relevant outputs based on the received data" --- # Job State This task receives the `Activate` input and sends a request to get the current Job state to the Worker Manager, and updates its outputs accordingly. Depending on the Job state received, the `IsAborting` or `IsExecuting` output will be emitted. Additionally, there's a specific output for the current State object. ![jobstate_parameters][jobstate_parameters] ## 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 | | -------- | --------- | ------------------ | | Activate | `any` | Activates the task | Table: Job State inputs ## Outputs | Name | Data Type | Values | Description | | ----------- | --------- | ------ | ------------------------------------------------------ | | job id | `any` | | Current Job Id | | State | `any` | | Current Job State | | IsExecuting | `Boolean` | | Whether the job is executing | | IsAborting | `Boolean` | | Whether the job is aborting | | Raw | `any` | | Received event payload | | Success | `Boolean` | | If there was no problem emits a true | | Error | `Error` | | Error that occurred during the processing of this task | Table: Job State outputs ## Settings On the `General` tab, you have the usual settings. Additional outputs can be defined in the `Outputs` tab. ![jobstate_settings][jobstate_settings] ## Behavior This Task needs to be provided with the `Activate` input so that the current Job state can be fetched from the Worker Manager and the outputs updated accordingly. [jobstate_parameters]: ./images/jobstate_parameters.png [jobstate_settings]: ./images/jobstate_settings.png