Hi there,
Bonita Studio 6.3.3, Java 1.7.0.67, Windows 8.1
I am starting processes in the background with
for(3 iterations){
ProcessInstance processInstance = processAPI.startProcess(processId);
}
which gives me (for example name:processInstanceId pairing) p2:11; p2:12; p2:13 using
processInstance.getName()+“:”+processInstance.getId()
but when I go and do a search and display of the pending tasks of the process I get a different set of IDs for the pending processes. for example:
instead of p2:11; p2:12; p2:13 I get p2:23; p2:24; p2:25
Code is below…
My question is how do I get the same information for the pending task through HumanTaskInstance as that returned to me from the StartProcess
Many thanks in advance,
regards
Seán
SearchResult<HumanTaskInstance> searchHumanTaskInstances = processAPI.searchHumanTaskInstances(searchOptions);
for (HumanTaskInstance pendingTask : searchHumanTaskInstances.getResult()) {
logger.severe(thisTrace+"processProcessId[0]: "+processProcessId[0]);
logger.severe(thisTrace+"processProcessId[1]: "+processProcessId[1]);
logger.severe(thisTrace+"pendingTask.getId(): "+pendingTask.getId());
if (pendingTask.getId().equals(processProcessId[1])){
logger.severe(thisTrace+"A4-pt: "+pendingTask.getName()+" "+pendingTask.getId()+" "+pendingTask.getParentProcessInstanceId());
if (pendingTask.getId()>activityId){
activityId = pendingTask.getId();
logger.severe(thisTrace+"process.split(:): "+processProcessId[0]+" "+processProcessId[1]+" "+activityId);
}
}
}