[jboss-user] [JBoss jBPM] - Re: Does AssignmentHandler work within the start node??

ardavan do-not-reply at jboss.com
Wed Nov 26 10:18:51 EST 2008


Thank you for your reply Martin.

I checked the javadoc - I believed that at the creation of my TaskInstance object,  the actorID parameter would be null 
but that because this assertion is true:

  | TaskInstance taskInstance = createNewProcessInstance();
  | 		assertEquals("taskSubmission", taskInstance.getName()); 
  | 
which shows that I am in the "taskSubmission" node

  | <task name="taskSubmission">
  |        <assignment     class="jbpm.taskmgmt.EmiliAssignmentHandler"></assignment>
  | </task>
  | 
my jbpm.taskmgmt.EmiliAssignmentHandler would set the null actorId to "emili".

Nevertheless now this is the way that I am doing it:

  | public void testSubmissionTask3(){
  | 		GraphSession graphSession = jbpmContext.getGraphSession();
  | 		ProcessDefinition processDefinition = 
  | 			graphSession.findLatestProcessDefinition("test");
  | 		processInstance = 
  | 			new ProcessInstance(processDefinition);
  | 		contextInstance = processInstance.getContextInstance();
  | 		Task t = processInstance.getTaskMgmtInstance().getTaskMgmtDefinition().getTask("taskSubmission");
  | 		TaskInstance ti = processInstance.getTaskMgmtInstance().createTaskInstance(t,processInstance.getRootToken());
  | 		assertEquals("emili", ti.getActorId());
  | 	}
  | 
I hope it is correct

Danke schoen
Ardavan

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

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



More information about the jboss-user mailing list