Hello folks,
we use our own custom-built visualization component to render BPMN 2.0 process diagrams and to visualize process state during process execution. To achieve the latter I query for all active tasks belonging to the process instance in question and retrieve their IDs. This is done using a TaskQuery. I then pass this list of IDs into my visualization component which then highlights the tasks in question in the process diagram. In addition I am using a HistoricProcessInstanceQuery to retrieve the IDs of those end events which haven been reached already. Thus I am also able to highlight them. This works like a charm.
Now to my problem:
I started using event-based gateways in my process definitions and I am wondering if there is a straight-forward way to query for "active" event-based gateways (= those still in wait state). I took a closer look at it and right now I cannot think about a way.
I noted down the ID of my event-based gateway in the process definition and I was able to locate the matching entry in the ACT_RU_EXECUTION-table since the ID is stored in the column ACT_ID_. Now my idea was to not query the tasks anymore but the executions since these also seem to include the event-based gateways. But there is no way to retrieve the ID stored in ACT_ID_ since I am missing a getter to retrieve the ActivityID or the activity itself.
It seems I found a workaround to this which I don't like very much: I am casting the Execution returned by the ExecutionQuery to ExecutionEntity which then allows me to retrieve the ActivityID by calling getActivityId().
Do I miss something or is there really no way to retrieve this information?
Cheers
Sebastian