[jboss-user] [JBoss jBPM] - A question to the DecisionNode

hamtho2 do-not-reply at jboss.com
Fri Jun 6 11:42:17 EDT 2008


Hi,

I´ve got a question concerning the DecisionNode. As far as I can read from the documentation the first transition, that resolves to true within a DecisionNode will be used.

Unfortunately I experienced a different behaviour for my test-process.

This is part of what I have defined:


  |         <start-state name="start">
  | 		<transition to="isExceedingOrdered" />
  | 	</start-state>
  | 	
  | 	<decision name="isExceedingOrdered">
  | 		<event type="node-enter">
  | <script><expression>System.out.println(executionContext.getNode().getName() + " entered");</expression></script>
  | 		</event>
  |       	<transition name="yes" to="isExceedingBuilt">
  |       		<condition expression="#{contextInstance.variables.orderingState >= 160}" />
  |       	</transition>
  |       	<transition name="no" to="ordered">
  |       		<!-- <condition expression="#{contextInstance.variables.orderingState.ivsCode lt 160}" /> -->
  |       	</transition>
  |    </decision>
  | 	
  | 	<state name="ordered">
  | 		<transition to="isExceedingOrdered" name="state change"></transition>
  | 	</state>
  | 	
  | 	<decision name="isExceedingBuilt">
  | 		<transition to="built" name="no">
  | 			<condition expression="#{orderingState >= 182}"></condition>
  | 		</transition>
  | 		<transition to="fork" name="yes"></transition>
  | 	</decision>
  | 
  | 	<state name="built">
  |       <transition to="isExceedingBuilt" name="state change"></transition>
  |    	</state>
  | 

In my first state a set the variable through a java test-class using


  | pi.getContextInstance().setVariable(orderingstate, 1);
  | 

So as I would say, in the first decision-node  (named "isExceedingOrdered") after the starte-node, the first transition should result in false and then use the second transition (named "no"), because it does not have condition, therefor should result in true and then wait in the state "ordered". Unfortunately this works only if I put a condition in the second transition as well (as seen commented in my code above) otherwise it goes directly in the state-node "built". But this is only the case, when I define my transition "no" in "isExceedingBuilt" at first, no matter of what the result of the condition is.

So this seems a bit strange to me, but possiblly I misunderstood something. So maybe someone can point me to the right direction.

Thanks
Thomas 

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

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




More information about the jboss-user mailing list