They are by default.... (and please do not cross-post, even if partly identical.... this forum is the correct one)
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")?
<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?
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