This content has been marked as final.
Show 2 replies
-
1. Re: LazyInitializationException on init ProcessInstance.inst
kukeltje Jul 31, 2008 8:33 AM (in response to ajanz)that is because you get the processinstance object back without all data and not a handle to a processinstance in the engine (like in a hibernate session). You cannot perform actions on them like in the engine. You have to execute additional commands for this.
-
2. Re: LazyInitializationException on init ProcessInstance.inst
ajanz Jul 31, 2008 9:50 AM (in response to ajanz)ah ok...at last....there is some light ;-)))
after writing my own command for what i want everything is ok
code ispublic Object execute(JbpmContext jbpmContext) throws Exception { // TODO Auto-generated method stub List returnObject=null; ProcessInstance pi = jbpmContext.getProcessInstance(processInstanceId); Token t = pi.getRootToken(); if ( t != null ) { returnObject= t.getNode().getLeavingTransitions(); System.out.println("LeavingTransitions= " + returnObject.size()); Iterator it = returnObject.iterator(); while ( it.hasNext()) { Transition ta = (Transition ) it.next(); System.out.println("Transition " + ta.getName()); } } else { System.out.println("noroot token!"); } return returnObject; } }