diff --git a/docs/components/modeler/bpmn/user-tasks/user-tasks.md b/docs/components/modeler/bpmn/user-tasks/user-tasks.md index b1a4919be5d..b8be2507ad9 100644 --- a/docs/components/modeler/bpmn/user-tasks/user-tasks.md +++ b/docs/components/modeler/bpmn/user-tasks/user-tasks.md @@ -161,6 +161,27 @@ A user task can define an arbitrary number of `taskHeaders`; they are static metadata stored with the user task in Zeebe. The headers can be used as configuration parameters for tasklist applications. +### User task listeners + +User tasks support **user task listeners**, which allow you to react to user task lifecycle events. + +#### Supported events + +Currently, user task listeners can react to the following events: + +- **Assigning**: Triggered while assigning a user task. +- **Completing**: Triggered while completing a user task. + +#### Configuration + +To define a user task listener, include the `zeebe:taskListeners` extension element within the user task in your BPMN model. This element can contain one or more `zeebe:taskListener` elements, each specifying the following attributes: + +- The `eventType` that triggers the listener (`"assigning"` or `"completing"`). +- The `type` of the listener (job type used by the external worker). +- The number of `retries` for the user task listener job (defaults to 3 if omitted). + +For more details, see [user task listeners](components/concepts/user-task-listeners.md). + ## Job worker implementation A user task does not have to be managed by Zeebe. Instead, you can also use @@ -285,9 +306,26 @@ A job-based user task with an embedded Camunda Form: ``` +#### User task listeners + +A user task with user task listeners configured: + +```xml + + + + + + + + + +``` + ### References - [Tasklist](/components/tasklist/introduction-to-tasklist.md) - [Form linking in Modeler](/components/modeler/web-modeler/advanced-modeling/form-linking.md) - [Job handling](/components/concepts/job-workers.md) - [Variable mappings](/components/concepts/variables.md#inputoutput-variable-mappings) +- [User task listeners](/components/concepts/user-task-listeners.md)