Global user task listeners
Global user task listeners are user task listeners defined once for all processes in a cluster, instead of individually per user task.
About global user task listeners
Use global listeners to react to user task lifecycle events across all processes without modifying BPMN models.
Global listeners are configured at the cluster level and behave like model-level user task listeners, using the same lifecycle events, blocking behavior, deny/correction semantics, payload structure, and incident handling.
They are particularly useful for:
- Replicating user task changes and context to external systems, such as audit, analytics, or custom Tasklist apps.
- Centralizing Service Level Agreements and notifications across all processes.
- Enforcing governance rules and validations. For example, pre-completion checks.
- Consistently applying due date and priority policies.
Configure global user task listeners
Set global user task listeners at the cluster level using the zeebe.broker.experimental.listeners.task path in the broker configuration.
Each listener entry can be configured with the following properties:
| Property | Required | Description |
|---|---|---|
event-types | Yes | List of user task event types that trigger the listener. Supported values: The shorthand |
type | Yes | The name of the job type. Used as a reference to specify which job workers request the respective task listener job. For example, |
retries | No | Number of retries for the user task listener job. Defaults to 3 if not set. |
after-local | No | Boolean indicating whether the listener should run after model-level listeners. Defaults to false (runs before model-level listeners). |
How the configuration is validated
On startup, the configuration is validated according to the following rules. The system attempts to correct issues where possible instead of failing the startup:
- Invalid event types are removed and ignored.
- Listeners missing information about event types or job type are removed and ignored.
- This also includes listeners for which only invalid event types are defined.
- If a listener defines both the special
allvalue and a normal event type forevent-types, the configuration is corrected to include onlyall. - Listeners with invalid retry values, i.e., non-numeric or negative, are removed and ignored.
In all cases, a suitable warning is reported in the orchestration cluster startup log, identifying the problem and its location in the configuration.
Example configuration
The following is an example YAML configuration and environment variables:
zeebe:
broker:
experimental:
engine:
listeners:
task:
- type: "validate-task"
event-types:
- creating
- type: "audit-generic"
event-types: all
retries: 5
- type: "notify-assignee"
event-types:
- assigning
- updating
- canceling
after-local: true
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_0_TYPE=validate-task
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_0_EVENT_TYPES_0=creating
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_1_TYPE=audit-generic
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_1_EVENT_TYPES_0=all
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_1_RETRIES=5
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_2_TYPE=notify-assignee
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_2_EVENT_TYPES_0=assigning
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_2_EVENT_TYPES_1=updating
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_2_EVENT_TYPES_2=canceling
ZEEBE_BROKER_EXPERIMENTAL_ENGINE_LISTENERS_TASK_2_AFTER_LOCAL=true
Apply changes
Configuration changes take effect after you restart the cluster. Use rolling restarts to avoid downtime.
After the restart, the new configuration applies to new lifecycle events for both running and new instances, without requiring you to redeploy models.
Execution order
For a given event on a task instance:
- Global listeners run in the order defined in the configuration.
- Model-level listeners run next, in the order defined in the BPMN model.
- Global listeners marked with
after-local: truerun after model-level listeners.
Supported features
Global listeners support the same features as model-level user task listeners:
- Blocking behavior.
- Triggering on a specific lifecycle event.
- Accessing user task data in job workers, in particular:
- Task-specific data, such as, assignee, due date, or priority.
- Attributes changed by the event, either through an
updatingevent or because of corrections done by previous listeners. - Headers defined in the user task model.
- Correcting user task data.
- Denying lifecycle transitions.
- Incident recovery.
Additionally, you can configure a single global listener to be triggered by multiple lifecycle events, possibly all of them.
Limitations
The same limitations as model-level user task listeners apply.
In addition to the above:
- No tenant-specific configuration: Configuration is cluster-wide, not per tenant. Payloads include
tenantIdfor downstream handling. - Restart required: Configuration changes take effect only after a cluster restart.