AnsweredAssumed Answered

uniquely identifying user task form process instances

Question asked by rhiremat on May 29, 2014
Latest reply on May 29, 2014 by martin.grofcik
Hello fellow activitiers,

I have following questions, appreciate your help on these..

Question 1 : Is the Business Key unique among all process instances running/completed/suspended, etc?

Question 2 : I am making a following query :
Execution execution = processEngine.getRuntimeService().createExecutionQuery().processInstanceBusinessKey(
                myObject.getBusinessKey(), true).activityId(myObject.getActivityId ()).singleResult();

Here, myObject is a custom class with methods getBusinessKey and getActivityId returning the respective Business Key and user task id.

activityId that is returned by getActivityId is that of a “current” “active” “user task” form the process whose “business key” is returned form the getBusinessKey. If the “user task” represented by this ActivityId is not the current active task in the process, this should return NULL. Is this valid understanding?

Question 3 : Among all running process instances a given user tasks’s ID returned by tasks.getId() would always be the same, is this the current understanding? Does this mean, this is actually a task design db id?

Question 4 : If #3 understanding is correct, the only way by which we can uniquely identify a process is by making a query to the process and then querying the user task id, is this the current understanding? Are there any other means to do it?


-Raj

Outcomes