[jboss-user] [JBoss jBPM] - problem evaluating transition condition

FabianW do-not-reply at jboss.com
Tue Nov 13 07:03:11 EST 2007


Hi there

I'm having a little problem with my process. I invoke a ESB service and depending on the returned value the right transition should be taken.
This works fine as long as I use a seperate action-node and decision-node. But that means that I need two nodes for every branching.
I've read that this should be possible using one decision-node with a node-enter event, but this doesn't seem to work for me.
I have the following code:

<decision name="decision2">
  | 	<event type="node-enter">
  | 	<action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
  | 		<esbCategoryName>RechnungBearbeiten</esbCategoryName>
  | 		<esbServiceName>WurdeRechnungBestellt</esbServiceName>
  | 		<millisToWaitForResponse>5000</millisToWaitForResponse>
  | 		<jbpmToEsbVars>
  | 			<mapping jbpm="lieferantenNr" esb="rechnung_kontrolle_lieferantenNr"></mapping>
  | 			<mapping jbpm="auftragsNr" esb="rechnung_kontrolle_auftragsNr"></mapping>
  | 		</jbpmToEsbVars>
  | 		<returnVars>
  | 			<mapping jbpm="istBestellt" esb="rechnung_kontrolle_istBestellt"></mapping>
  | 		</returnVars>
  | 	</action>
  | 	</event>
  | 	<transition to="skonto" name="to skonto"><condition expression="#{istBestellt==false}"></condition></transition>
  | 	<transition to="end-state1" name="to end-state1"><condition expression="#{istBestellt==true}"></condition></transition>
  | </decision>

When I run this process, I get the following error at the decision-node:
anonymous wrote : ERROR [GraphElement] action threw exception: transition condition #{istBestellt==false} evaluated to 'false'
  | org.jbpm.JbpmException: transition condition #{istBestellt==false} evaluated to 'false'

The ESB service returns true, and of course #{istBestellt==false} evaluates to 'false'. This is ok in my eyes, but the execution stops after the JbpmException and doesn't test the next condition.
What am I doing wrong? I have the feeling that jbpm evaluates the transition conditions before the return value is really saved as a process variable.


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

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



More information about the jboss-user mailing list