diff --git a/dsl.md b/dsl.md index 465fdb68..2a45dfb5 100644 --- a/dsl.md +++ b/dsl.md @@ -118,31 +118,37 @@ Runtimes are expected to publish these events upon state changes. While using th ##### Workflow Lifecycle Events -| Type | Data | Description | -|:----:|:----:|:------------| -|
`io.serverlessworkflow.workflow.started.v1`| [`workflowStartedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-started-event) | Notifies about the start of a workflow. | -|
`io.serverlessworkflow.workflow.suspended.v1`| [`workflowSupsendedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-suspended-event) | Notifies about suspending a workflow execution. | -|
`io.serverlessworkflow.workflow.resumed.v1`| [`workflowResumedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-resumed-event) | Notifies about resuming a workflow execution. | -|
`io.serverlessworkflow.workflow.correlation-started.v1`| [`workflowCorrelationStartedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-correlation-started-event) | Notifies about a workflow starting to correlate events. | -|
`io.serverlessworkflow.workflow.correlation-completed.v1`| [`workflowCorrelationCompletedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-correlation-completed-event) | Notifies about a workflow completing an event correlation. | -|
`io.serverlessworkflow.workflow.cancelled.v1`| [`workflowCancelledEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-cancelled-event) | Notifies about the cancellation of a workflow execution. | -|
`io.serverlessworkflow.workflow.faulted.v1`| [`workflowFaultedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-faulted-event) | Notifies about a workflow being faulted. | -|
`io.serverlessworkflow.workflow.completed.v1`| [`workflowCompletedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-completed-event) | Notifies about the completion of a workflow execution. | -|
`io.serverlessworkflow.workflow.status-changed.v1`| [`workflowStatusChangedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-status-changed-event) | Notifies about the change of a workflow's status phase. | +| Type | Data | Required | Description | +|:----:|:----:|:--------:|:------------| +|
`io.serverlessworkflow.workflow.started.v1`| [`workflowStartedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-started-event) | `yes` | Notifies about the start of a workflow. | +|
`io.serverlessworkflow.workflow.suspended.v1`| [`workflowSupsendedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-suspended-event) | `yes` | Notifies about suspending a workflow execution. | +|
`io.serverlessworkflow.workflow.resumed.v1`| [`workflowResumedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-resumed-event) | `yes` | Notifies about resuming a workflow execution. | +|
`io.serverlessworkflow.workflow.correlation-started.v1`| [`workflowCorrelationStartedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-correlation-started-event) | `yes` | Notifies about a workflow starting to correlate events. | +|
`io.serverlessworkflow.workflow.correlation-completed.v1`| [`workflowCorrelationCompletedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-correlation-completed-event) | `yes` | Notifies about a workflow completing an event correlation. | +|
`io.serverlessworkflow.workflow.cancelled.v1`| [`workflowCancelledEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-cancelled-event) | `yes` | Notifies about the cancellation of a workflow execution. | +|
`io.serverlessworkflow.workflow.faulted.v1`| [`workflowFaultedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-faulted-event) | `yes` | Notifies about a workflow being faulted. | +|
`io.serverlessworkflow.workflow.completed.v1`| [`workflowCompletedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-completed-event) | `yes` |Notifies about the completion of a workflow execution. | +|
`io.serverlessworkflow.workflow.status-changed.v1`| [`workflowStatusChangedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#workflow-status-changed-event) | `no` |Notifies about the change of a workflow's status phase. | + +> [!NOTE] +> The `io.serverlessworkflow.workflow.status-changed.v1` event is an optional convenience event that notifies consumers solely about a workflow’s status changes, without carrying extra data. It is typically used by consumers who only need to track or report status updates (and not details like faults or outputs). Its use is optional because it requires runtimes to publish an additional event for each necessary lifecycle change. ##### Task Lifecycle Events -| Type | Data | Description | -|:----:|:----:|:------------| -|
`io.serverlessworkflow.task.created.v1`| [`taskCreatedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-created-event) | Notifies about the creation of a task. | -|
`io.serverlessworkflow.task.started.v1`| [`taskStartedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-started-event) | Notifies about the start of a task. | -|
`io.serverlessworkflow.task.suspended.v1`| [`taskSuspendedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-suspended-event) | Notifies about suspending a task's execution. | -|
`io.serverlessworkflow.task.resumed.v1`| [`taskResumedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-resumed-event) | Notifies about resuming a task's execution. | -|
`io.serverlessworkflow.task.retried.v1`| [`taskRetriedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-retried-event) | Notifies about retrying a task's execution. | -|
`io.serverlessworkflow.task.cancelled.v1`| [`taskCancelledEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-cancelled-event) | Notifies about the cancellation of a task's execution. | -|
`io.serverlessworkflow.task.faulted.v1`| [`taskFaultedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-faulted-event) | Notifies about a task being faulted. | -|
`io.serverlessworkflow.task.completed.v1`| [`taskCompletedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-completed-event) | Notifies about the completion of a task's execution. | -|
`io.serverlessworkflow.task.status-changed.v1`| [`taskStatusChangedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-status-changed-event) | Notifies about the change of a task's status phase. | +| Type | Data | Required | Description | +|:----:|:----:|:--------:|:------------| +|
`io.serverlessworkflow.task.created.v1`| [`taskCreatedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-created-event) | `yes` | Notifies about the creation of a task. | +|
`io.serverlessworkflow.task.started.v1`| [`taskStartedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-started-event) | `yes` | Notifies about the start of a task. | +|
`io.serverlessworkflow.task.suspended.v1`| [`taskSuspendedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-suspended-event) | `yes` | Notifies about suspending a task's execution. | +|
`io.serverlessworkflow.task.resumed.v1`| [`taskResumedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-resumed-event) | `yes` | Notifies about resuming a task's execution. | +|
`io.serverlessworkflow.task.retried.v1`| [`taskRetriedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-retried-event) | `yes` | Notifies about retrying a task's execution. | +|
`io.serverlessworkflow.task.cancelled.v1`| [`taskCancelledEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-cancelled-event) | `yes` | Notifies about the cancellation of a task's execution. | +|
`io.serverlessworkflow.task.faulted.v1`| [`taskFaultedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-faulted-event) | `yes` | Notifies about a task being faulted. | +|
`io.serverlessworkflow.task.completed.v1`| [`taskCompletedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-completed-event) | `yes` | Notifies about the completion of a task's execution. | +|
`io.serverlessworkflow.task.status-changed.v1`| [`taskStatusChangedEvent`](https://github.com/serverlessworkflow/specification/blob/main/dsl-reference.md#task-status-changed-event) | `no` | Notifies about the change of a task's status phase. | + +> [!NOTE] +> The `io.serverlessworkflow.task.status-changed.v1` event is an optional convenience event that notifies consumers solely about a workflow’s status changes, without carrying extra data. It is typically used by consumers who only need to track or report status updates (and not details like faults or outputs). Its use is optional because it requires runtimes to publish an additional event for each necessary lifecycle change. #### Components