[jboss-user] [JBoss jBPM] - Re: problems creating task instances

sgrassie do-not-reply at jboss.com
Wed Jan 23 04:44:46 EST 2008


Well, I've managed to resolve the problem, but I don't like the solution. What I've had to do is to get the token, and then find all the task instances by that token and get the first element from the list, as below. I really don't like it, there must be a better way to do this? Surely?


  | taskInstance.end();
  | context.save(taskInstance);
  | Token token = taskInstance.getToken();
  | context.close();
  | 			
  | context = JbpmConfiguration.getInstance().createJbpmContext();
  | taskInstance = (TaskInstance)context.getTaskMgmtSession().findTaskInstancesByToken(token.getId()).get(0);
  | 
  | Assert.assertTrue("firstTask".equals(taskInstance.getName()));
  | 

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

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



More information about the jboss-user mailing list