This content has been marked as final.
Show 3 replies
-
1. Re: how to define global variables for process in xml
kukeltje Jan 28, 2008 11:30 AM (in response to inxaoc)They are by default.... (and please do not cross-post, even if partly identical.... this forum is the correct one)
-
2. Re: how to define global variables for process in xml
inxaoc Jan 28, 2008 3:00 PM (in response to inxaoc)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? -
3. Re: how to define global variables for process in xml
kukeltje Jan 29, 2008 6:12 AM (in response to inxaoc)ahh... sorry, I thought they were posted at the same time... my bad...
I'll try your example and see what happens... one other option is something like:<action name="action1"> <varname1>value</varname1> </action>
Where action can process these and set them.... see normal action examples for this