Retrieve List of skipped Activities in Camunda 7

Hi everyone,

I need to retrieve a list of activities for a given processInstanceId in the Camunda7 Java API, while excluding any activities that have been skipped by a Gateway. This is for a UI navigation which displays the activity names (previous, current and next), but should not show activities which have been skipped by user decisions at a Gateway.

If the explanation provided is unclear, or if additional information is required, please let me know. I am looking forward to your replies.

Hi @cod3c,

on a high level, you have to parse the BPMN diagram with the BPMN Model API (Read a Model | docs.camunda.org) and compare it with the activity history of the process instance (HistoryService (Camunda Platform Javadocs 7.18.4-ee)) to get the skipped activities.

They are not saved in the database.

Hope this helps, Ingo