2 Replies Latest reply on Feb 11, 2010 2:01 PM by kukeltje

    java activity inside subprocess

      Hi Friends,

       

      I was trying to use subprocess with java activity within it.This subprocess is being called from a main process.

      Currently I am not sure how to pass value from within the main process to sub process and get the return value back.I am using it in the following way(code inside main process).

       

      <sub-process name="userdevice"
                     sub-process-key="getuserdevice">
                    
          <parameter-in var="stateMain" subvar="state" />
          <parameter-out var="deviceNameMain" subvar="deviceName" />
          <transition to="wait" />
       
        </sub-process>

       

      Although the java activity is executed and the control goes within the specified class.But I am not able to provide input variable and am not getting back the result variable from the subprocess.

      can anyone throw light on this.Or any pointers to some articles.I have already gone through user and developers guide.

       

      TIA,

      Apurv

        • 1. Re: java activity inside subprocess

          I am able to get this in variable but I am not able to set this var as an arg/field to java activity.Any pointers how can the existing task var be set as arg/field for java activity.

           

          <start>
              <transition to="getXXX"/>
            </start>

            <task name="getXXX
                  assignee="YYY"
                 var = "statetask">//this var is available from main process

              <transition to="getZZZ"/>
            </task>

            <java name="getZZZ"
                  class="xx.xxx.Test"
                  method="getUserXXX"
                  var="return"
             >
            
             <field name="state"><string value="somevalue"/></field>// need to set the stateTask var value to state field here
              <arg><string value="Test"/></arg>// need to do the similar thing here
             
             <transition to="end" />
            </java>

            <end name="end" />

          • 2. Re: java activity inside subprocess
            kukeltje
            Use EL... (Expression Language)