Unable to Access User Task Metadata in Execution Listener Because Listener Blocks Task Creation in Camunda 8

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

Hi @pithvajignesh :wave: Thanks for the great questions. Let me counter them with a question :smiley: Have you had a chance to try out the new user task listeners feature in our latest alpha release 8.8.0-alpha7? It was built exactly to cover the functionality you’re requesting. Hope you give it a try, and let us know how it goes! :rocket:

Hi @korthout Thank you for the reply… Yes as a Camunda 7 experience I first looked at Task listener only, but it is not yet supported in camunda stable version 8.7, I was looking at alternates :slight_smile:

But I found alternate way, that once user task gets created, I use execution listener to get UserTaskKey (job.getElementId()) and process instance id. and to complete it I simply retrieve userTask metadata using above parameters. The reason I need this way because I want to complete user task using BFF not direct UI :slight_smile:

Thank you for the reply.

Thanks & Regards,
Jignesh Pithava

:raised_hands: That sounds like a great workaround for your use case!

If you do happen to give user task listeners a try in the latest 8.8 alpha, we’d be happy to receive your feedback :bowing_man: We’re looking forward to delivering the 8.8 stable release soon!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.