[jboss-user] [JBoss jBPM] - Re: how to define global variables for process in xml

inxaoc do-not-reply at jboss.com
Mon Jan 28 15:00:32 EST 2008


Ok! But I've posted here because you said that those forum is wrong! Did I make something wrong?

I have one more question!
Variables that are created in expression language in xml is accessible from processInstance.getContextInstance().getVariable("globalStatus")?
Like here:

  | <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="test simple">
  | 	<event type="process-start">
  | 		<action name="action1">
  | 			<script>
  | 				<variable name='globalStatus' access='write' mapped-name='globalStatus'/>
  | 			</script>
  | 		</action>
  | 	</event>
  | 
  | 	<start-state name="start">
  | 		<transition name="" to="node1"></transition>
  | 	</start-state>
  | 
  | 	<end-state name="end1"></end-state>
  | 
  | 	<node name="node1">
  | 		<event type="node-enter">
  | 			<script>
  | 				<expression>
  |                                  globalStatus='New';
  | 				System.out.println("this script is entering node"+node+" "+globalStatus);
  |                                 </expression>
  | 			</script>
  | 		</event>
  | 		<transition name="" to="end1"></transition>
  | 	</node>
  | </process-definition>
Or is there other way?

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

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



More information about the jboss-user mailing list