[jboss-user] [jBPM Users] - Incorrect Incoming Transition evaluation on Join Node

pradeep.gulla do-not-reply at jboss.com
Sat Nov 21 07:41:53 EST 2009


I'm Using JBPM4.1 with SQLServer 2000.

My process xml contains a FORK node for assigning 2 parallel tasks.
I've created on extra Task Node which is not part of Fork but contains outgoing transition to JOIN.

When I'm trying to complete the 2 created tasks, execution is not forwarding.
JOIN node waits for the completion of extra task (which is not created).

Process definition:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <process name="join_test" version="1" xmlns="http://jbpm.org/4.0/jpdl">
  | 	<start><transition to="Assign Parallel Tasks"/></start>	
  | 	<fork name="Assign Parallel Tasks">
  | 		<transition to="Task 1"/><transition to="Task 2"/>
  | 	</fork>	
  | 	<task assignee="#{approver1}"  name="Task 1">
  | 		<transition to="wait"/>
  | 	</task>
  | 	<task assignee="#{approver2}" name="Task 2">
  | 		<transition g="-104,-54" to="wait"/>
  | 	</task>	
  | 	<!-- This won't particpate in workflow but still comes in the list of incoming transitions -->
  | 	<task assignee="#{approver3}"  name="Task 3">
  | 		<transition g="-104,-54" to="wait"/>
  | 	</task>
  | 	
  | 	<join  name="wait">
  |       <transition to="Final task"/>
  | 	</join>	
  | 	<task assignee="#{approver4}" name="Final task">
  | 		<transition to="Finish"/>
  | 	</task>	
  | 	<end  name="Finish" state="Completed"/>
  | </process>
  | 

Test case:

  | public void testOptionalParallelAssignment() {
  | 	  HashMap variables = new HashMap();
  | 	  variables.put("approver1", "approver1");
  | 	  variables.put("approver2", "approver2");
  | 	  variables.put("approver3", "approver3");
  | 	  variables.put("approver4", "approver4");
  | 	  
  | 	  executionService.startProcessInstanceByKey("join_test", variables);
  | 	  
  | 	  //First Task Approval
  | 	  List<Task> taskList = taskService.findPersonalTasks("approver1");	  
  | 	  taskService.completeTask(taskList.get(0).getId());	  
  | 	  //Second Task Approval
  | 	  taskList = taskService.findPersonalTasks("approver2");
  | 	  taskService.completeTask(taskList.get(0).getId());
  | 	  assertTrue("Atleast One Task should be Active", taskService.findPersonalTasks("approver4").size() == 1);
  | 	  assertTrue("Final Task should present", taskService.findPersonalTasks("approver4").get(0).getName().equals("Final task"));
  |   }
  | 

How to remove this unwanted transition ??

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

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



More information about the jboss-user mailing list