Hi Camunda Community,
I am working with Camunda 8 and facing a challenge with capturing user task metadata precisely when the user task is created.
Context:
- Camunda 8 does not support BPMN Task Listeners like Camunda 7, so I configured an Execution Listener on the user task’s start event to simulate similar behavior.
- My goal is to obtain user task metadata such as
userTaskKey,elementId, and assignee right when the task is created.
Issue:
The Execution Listener executes before the actual user task entity is created in the Tasklist. More importantly:
- The process does not create the user task until the Execution Listener completes successfully.
- This means in the listener or in any immediately triggered worker, querying the Tasklist API to retrieve user task metadata returns nothing because the task does not exist yet.
- If the listener blocks or fails, the user task is not created at all.
Consequences:
- I cannot reliably access user task metadata synchronously at creation time via listeners or immediate API queries.
- This is a critical gap compared to Camunda 7 where Task Listeners gave direct access to task metadata right at task lifecycle events.
What I have attempted:
- Using Execution Listener on user task start event to trigger async job that queries Tasklist API later (task exists by then).
- But since listeners block task creation, async jobs triggered in Execution Listener run before the user task exists or the listener must succeed first.
Question:
- Is there a recommended pattern or best practice in Camunda 8 to capture user task metadata exactly when the task is created, given the lack of Task Listeners?
- Are there new features or workarounds to enable this without the listener blocking problem?
- Would it be possible to add Task Listener support similar to Camunda 7 in future releases?
Thanks for any guidance or suggestions!
Jignesh