AnsweredAssumed Answered

use a passed variable from a parent process in a  subprocess javascript

Question asked by malekobaid on Jun 5, 2014
Latest reply on Jun 5, 2014 by malekobaid
Hallo There,

I hava a process_parent that calls a sub_process, passing variables under the callActivity node as:
<blockcode>
      <extensionElements>
        <activiti:in source="_inLong" target="_inLong"></activiti:in>
        <activiti:in source="_inString" target="_inString"></activiti:in>
        <activiti:out source="_counter" target="_counter"></activiti:out>
      </extensionElements>
    </callActivity>
</blockcode>

I have a scriptTask in the sub_process that should does the following:
<blockcode>
<scriptTask id="scripttask31" name="Increment inLong Script 1" scriptFormat="javascript">
      <script><![CDATA[_inLong++;
      java.lang.System.out.println("_inLong " + _inLong);]]></script>
         </scriptTask>
</blockcode>
But this does not increment the _inLong variable at all, it stays 0, as specified in the parent process.
Appreciate any help.

p.s. I am using the latest engine, under tomcat 7, and java 7.

Outcomes