[jboss-user] [JBoss jBPM] - Re: Round trip process to task variable mapping

msandoz do-not-reply at jboss.com
Thu May 31 10:30:03 EDT 2007


heres an example of one of the things im trying to do - is there a better way to get the variables into the process context from the xml? also it doesnt seem to be pulling them in the EL further down in the script. 

the action is pretty basic - just jython-executes the code.

<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition 
  |   xmlns="urn:jbpm.org:jpdl-3.2"
  |   name="simple">
  |    <swimlane name="automated"></swimlane>
  |    <event type="process-start">
  | 		<script>token.getProcessInstance().getContextInstance().createVariable("reusableCode", "print 'foo';");</script>
  |    </event>
  |    <start-state name="start">
  |       <transition name="" to="jython"></transition>
  |    </start-state>
  |    <node name="jython">
  |       <action class="com.nexusbpm.services.jython.JythonService">
  |          <jythonCode>#{contextInstance.variable[reusableCode]}</jythonCode>
  |       </action>
  |       <transition name="j2" to="jython2">
  |       </transition>
  |    </node>
  |    <node name="jython2">
  |       <action class="com.nexusbpm.services.jython.JythonService">
  |          <jythonCode>#{contextInstance.variable[reusableCode]}</jythonCode>
  |       </action>
  |       <transition name="toEnd" to="end"></transition>
  |    </node>
  |    <end-state name="end"></end-state>
  | </process-definition>

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

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



More information about the jboss-user mailing list