AnsweredAssumed Answered

add access to jobname?

Question asked by ronald.van.kuijk on May 1, 2012
Latest reply on May 2, 2012 by trademak
For a management ui, I'd like to have access to job name. The free format text can be very interesting to show in job overviews.

How I currently do this is:

ProcessInstance pi = (ProcessInstance) rus.createProcessInstanceQuery().processInstanceId(job.getProcessInstanceId()).singleResult();
ExecutionEntity e = (ExecutionEntity) rus.createExecutionQuery().executionId(job.getExecutionId()).singleResult();
ProcessDefinitionEntity pd = (ProcessDefinitionEntity) rs.createProcessDefinitionQuery().processDefinitionId(e.getProcessDefinitionId()).singleResult();
Node node = XMLUtils.inputStreamToNode(rs.getResourceAsStream(pd.getDeploymentId(), pd.getResourceName()));
String name = XMLUtils.getString(node, "//*[@id=\""+e.getActivityId()+"\"]/@name");

Which is rather inefficient if done for to many jobs.

Does anybody have a better idea?