decision history with historic task

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2012 03:17 AM
I am looking for a best approach to display a list of finished tasks for a given process instance with a decisions results. It is clear for me how to get a list of finished tasks:
But when one of the tasks sets a process variable - next used in a gateway - I cannot see 'compact' way to display the decision history apart to historic task list.
The workarround I used today are different two ( or more ) tasks next to gateway - even if they are not needed - just to name one as "approved" and second "not approved". Then I have a 'decision' in finished task list got in above query. This workarround doesn't satisfy me and I am looking for something better.
The second approach that seems to be promising is to take historic activities like that:
Unfortunately activity id <> task id, so it is difficult to get task details having activity id.
Questions:
1. What is the recommended approach to get decisions apart to finished taks of a process instance in the form of task list?
2. How to get task id from activity id ( just in case second approach is the best ) ?
3. How to get details for activity type 'xxxxGateway' - result of the decision ( = process variable )
historyService.createHistoricTaskInstanceQuery() .processInstanceId( getTask().getProcessInstanceId() ) .finished() .orderByHistoricTaskInstanceEndTime() .desc() .list();
But when one of the tasks sets a process variable - next used in a gateway - I cannot see 'compact' way to display the decision history apart to historic task list.
The workarround I used today are different two ( or more ) tasks next to gateway - even if they are not needed - just to name one as "approved" and second "not approved". Then I have a 'decision' in finished task list got in above query. This workarround doesn't satisfy me and I am looking for something better.
The second approach that seems to be promising is to take historic activities like that:
historyService.createHistoricActivityInstanceQuery() .processInstanceId( getTask().getProcessInstanceId() ) .finished() .orderByHistoricActivityInstanceStartTime() .desc() .list();
Unfortunately activity id <> task id, so it is difficult to get task details having activity id.
Questions:
1. What is the recommended approach to get decisions apart to finished taks of a process instance in the form of task list?
2. How to get task id from activity id ( just in case second approach is the best ) ?
3. How to get details for activity type 'xxxxGateway' - result of the decision ( = process variable )
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2013 04:26 AM
1. What is the recommended approach to get decisions apart to finished taks of a process instance in the form of task list?
I would use the historic variables for that. The variable then contains the value at the time of the decision
2. How to get task id from activity id ( just in case second approach is the best ) ?
That won't be possible a task is something else then an activity. You'd need to know the name of the activity when querying, which is not a good thing
3. How to get details for activity type 'xxxxGateway' - result of the decision ( = process variable )
HistoricDetailQuery createHistoricDetailQuery(); on the historyService is what I would try first.
