[jboss-user] [JBoss jBPM] - Re: variable scope from a script

tbeernot do-not-reply at jboss.com
Sun Nov 23 09:42:32 EST 2008


  | <process-definition>
  |    <start-state name='start'> 
  | 		<transition to='fork1'></transition> 
  | 	</start-state> 
  |    <fork name='fork1'> 
  | 		<event type='node-enter'> 
  | 			<script> 
  | 				<expression>
  | 					token.getProcessInstance().getContextInstance().setVariable("var","valueOfFork", token);"
  | 				</expression> 
  | 			</script> 
  | 		</event>		 
  | 		<transition to='state1' name='1'></transition> // the name is mandatory, otherwise there will be only one child.
  | 		<transition to='state2' name='2'></transition> // the name is mandatory, otherwise there will be only one child.
  | 	</fork> 
  | 	<state name='state1'> 
  | 		<event type='node-enter'> 
  | 			<script> 
  | 				<expression>
  | 					token.getProcessInstance().getContextInstance().setVariable("var","valueOfState1", token);"
  | 				</expression> 
  | 			</script> 
  | 		</event>		 
  | 		<transition to='join1'></transition> 
  | 	</state> 
  | 	<state name='state2'> 
  | 		<event type='node-enter'> 
  | 			<script> 
  | 				<expression>
  | 					token.getProcessInstance().getContextInstance().setVariable("var","valueOfState2", token);"
  | 				</expression> 
  | 			</script> 
  | 		</event>		 
  | 		<transition to='join1'></transition> 
  | 	</state> 
  | 	<join name='join1'> 
  | 		<transition to='end'></transition> 
  | 	</join> 
  |    <end-state name='end'></end-state>
  | </process-definition>"
  | 

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

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



More information about the jboss-user mailing list