---
alias: user-guide-automation-task-core-driver-event
tags:
- automation tasks
description: "This documentation details a task that monitors driver lifecycle events and triggers workflow actions"
---
# Driver Event OnInitialize
:iot-driver-event-lg:{style="font-size: 100px"}
The **Driver Event** task subscribes to driver lifecycle events and triggers workflow actions when specific driver states occur.
It replaces the event-handling functionality that was previously included in the **Equipment Setup** and **Equipment Setup Result** tasks.

!!! note
This task results from a split of the Equipment Setup and Equipment Setup Result tasks. It should be used along with: [[user-guide-automation-task-core-equipmentconfig]] and [[user-guide-automation-task-core-driver-command]].
## Workflows
| Data Flow | Control Flow |
| :--------: | :---------: |
| :material-check:{ style="color: #4DB6AC" } | :material-check:{ style="color: #4DB6AC" } |
## Inputs
| Name | Data Type | Description |
| -------------- | --------- | ------------------ |
| Enable/Disable | `Boolean` | Activates or deactivates the event subscription. |
## Outputs
| Name | Data Type | Description |
| ------- | --------- | ------------------------------------------------------ |
| CommunicationState | `String` | Only for the `OnCommunicationChange` event: the communication state the driver moved to, one of `Unknown`, `Ready`, `Connecting`, `ConnectingFailed`, `Setup`, `Communicating`, `Disconnecting`, or `Disconnected`. The task emits it before `Success`. |
| Success | `Boolean` | Returns `true` when the task successfully subscribes to or processes the driver event. |
| Error | `Error` | Provides details if an error occurs while handling the event. |
## Settings

| Name | Data Type | Default | Description |
| ---- | --------- | ------- | ----------- |
| Auto Enable | `Boolean` | true | Automatically activates the event subscription when the workflow starts. If set to `false`, the task subscribes only when manually enabled. |
| Event | `Enum` | `OnInitialize` | Driver lifecycle event to subscribe to. Supported events are:
`OnInitialize`
`OnSetup`
`OnHeartbeat`
`OnCommunicationChange` |
| Automatic Setup | `Boolean` | true | Valid only for the `OnInitialize` event. When enabled, the task sends the `SetupSuccess` command to the driver as soon as the setup phase starts, so no Driver Command task is needed to complete it. Disable it when the workflow must initialize the equipment on the `OnSetup` event first. |
## Behavior
The Driver Event task allows the user to surface the lifecycle of the driver.
The **Driver Event OnInitialize** task listens for key driver lifecycle events and triggers workflow actions when those events occur.
It initiates the configuration and connection sequence for a driver.
A typical workflow using this task includes the following steps:
1. **Driver Event OnInitialize** listens for the selected lifecycle event (for example, `OnInitialize` or `OnSetup`).
2. When the event occurs, it triggers the **Equipment Configuration** task to define driver parameters.
3. After configuration, the **Driver Command** task issues the `Connect` command to establish communication with the equipment.