[jboss-user] [JBoss jBPM] - Re: Ending tasks manually

wurzelbutz do-not-reply at jboss.com
Wed May 6 09:36:56 EDT 2009


i know that the Taskinstance has leaving transitions (hasLeavingTransition(ext_transition) returns true). 
Transition tr=ti.getTask().getTaskNode().getLeavingTransition(ext_transition);
finds the correct transition.

It just seems as jbpm has troubles following it.

As i said ending a taskinstance which has only 1 leaving transitions works well.

here is the process definition, maby that helps:


<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition  xmlns=""  name="test">
  | 	<start-state name="start-state1">
  | 		<transition to="entscheidung"></transition>
  | 	</start-state>
  | 	<task-node name="links">
  | 		<task name="links">
  | 		<assignment class="at.test.session.UserAssignmentActor"></assignment>
  | 		</task>
  | 		<transition to="end-state1"></transition>
  | 	</task-node>
  | 
  | 	<task-node name="rechts">
  | 		<task name="rechts">
  | 		<assignment class="at.test.session.UserAssignmentActor"></assignment>
  | 		</task>
  | 		<transition to="end-state1"></transition>
  | 	</task-node>
  | 
  | 	<task-node name="entscheidung">
  | 		<task name="links oder rechts?">
  | 		<assignment class="at.test.session.UserAssignmentActor"></assignment>
  | 		</task>
  | 		<transition to="rechts" name="rechts"></transition>
  | 		<transition to="links" name="links"></transition>
  | 	</task-node>
  | 
  | 	<end-state name="end-state1"></end-state>
  | </process-definition>

of course i could just catch the exception but the problem is that the taskinstance doesn't get ended.

i find interesting that jbpm tries to persist a taskinstance (the target of the transition i assume) which supposedly exists:
anonymous wrote : Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: org.jbpm.taskmgmt.exe.TaskInstance (from the stacktrace)

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

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



More information about the jboss-user mailing list