cancel
Showing results for 
Search instead for 
Did you mean: 

Missing getter for activityID on Execution-Interface?

sebastian_s
Champ in-the-making
Champ in-the-making
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
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
That's a pretty complex use case you have there … which is why you have to do the cast probably.

In my opinion, it is better to build your visualisation tool on top of the executions, since you will be able to cover more types that way.
If you feel that casting is an ugly way, why not simply use a custom NativeQuery? Then you can also just fetch exactly what you want.

sebastian_s
Champ in-the-making
Champ in-the-making
Hi Joram,

thanks for your response. I changed my code to base upon the executions which works fine for me now. However I still don't like the cast I have to use. I still see no reason why one should prevent access to the activityID in the Execution-interface. Most (if not all) other interfaces also expose their activityIDs to the API. Since I was not able to find a matching issue in JIRA I created a new JIRA issue for this:

http://jira.codehaus.org/browse/ACT-1616

P.S.: Accidently I hit "Save" without having finished typing my issue description. Please see my comment on the issue and add my description in the comments as the description of the issue. Thanks.

Best regards

Sebastian

jbarrez
Star Contributor
Star Contributor
No problem. And myself, I don't see any issues with exposing it actually.

thanks for creating the issue!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.