Retrieve outgoing sequence flows from task

I’m working on a web app that acts as a task list for Camunda-backed processes.
I need to retrieve outgoing sequence flow names for each task, so I can display buttons in UI accordingly.
I.e. if a task has two outgoing sequence flows (“approve”, “reject”) there would be two buttons in that task screen

Hello @jcrivera ,

out of the box, this will not work. Anyway, I have an idea on how this can be done:

  1. Create an ExecutionListener that holds information on what the outgoing sequence flows are named as and set their names as process variables on invocation.
  2. Use a parse-listener to build the ExecutionListeners to the right places.

Now, on deployment, each task (according to your parse-listener) has this information as process variables.

This feature can be bundled as Process Engine Plugin and registered to the engine.

I hope this helps


1 Like

Hi @jcrivera,

have a look at the Model API to get the relevant information from the BPMN diagram: Read a Model | (esp. the bootom of the page)

And wrap this code in a listener as Jonathan suggested.

Hope this helps, Ingo