---
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 | `any` | Activates or deactivates the event subscription. |
## Outputs
| Name | Data Type | Description |
| ------- | --------- | ------------------------------------------------------ |
| 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 | AAutomatically activates the event subscription when the workflow starts. If set to `false`, the task subscribes only when manually enabled. |
| Event | `String` | `OnInitialize` | Driver lifecycle event to subscribe to. Supported events are:
`OnInitialize`
`OnSetup`
`OnHeartbeat`
`OnCommunicationChange` |
| Automatic Setup | `Boolean` | false | Valid only for the `OnInitialize` event. When enabled, automatically triggers a setup command for the driver to complete its initialization sequence. |
## Behavior
The Driver Command 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 `AutoSetup`).
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.