[jboss-user] [JBoss jBPM] - Re: How to get the ProcessInstance for a Task in jBpm 4.0 CR

kukeltje do-not-reply at jboss.com
Wed Jun 17 04:16:19 EDT 2009


the new jBPM console does this:


  | 
  |       TaskService taskService = processEngine.getTaskService();
  |       Task task = taskService.getTask(taskId);
  | 
  |       // access the processdefition
  |       TaskImpl cast = ((TaskImpl) task);
  |       ExecutionImpl processInstance = cast.getProcessInstance();
  |       String processInstanceId =  processInstance.getId();
  |       String processId =  processInstance.getProcessDefinition().getId();
  | 
  | 

The difference being the 'getId()' instead of 'getDbId()'


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238122#4238122

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238122



More information about the jboss-user mailing list