2 Replies Latest reply on Apr 18, 2009 2:38 PM by Tom Baeyens

    variable and sub-process syntax

    Tom Baeyens Master

      starting on sub-process i realized that i better think out variable declarations as a whole. i know of 4 places where we want to declare variables:

      * process variables declarations
      * activity variable declarations (state, task, super-state,...)
      * task out variable declarations
      * sub-process out variables


      <process name="...">
       <variable name="processVariableName" type="..." init="#{expression}">
       <init><string value="fixed string"/></init>
       <variable>
      
      
       <activity name="...">
       <variable name="activityScopedVariableName" type="..." init="#{expression}">
       <init><string value="fixed string"/></init>
       <variable>
      
      
       <sub-process name='...'>
       <in-swimlane name="superProcessSwimlaneName" sub-name="subProcessSwimlaneName" />
       <variable name="subProcessVariableName" init="#{expression}">
       <init><string value="fixed string"/></init>
       <variable>
       <out-variable name="processVariableName" init="#{expressionResolvedInSubProcessContext}">
       <transition>
       <outcome activity="subprocessactivity" />
       <outcome variable="subprocessvariable"><string value="..." /></outcome>
      
      
       <task name="...">
       <variable name="taskVariableName" type="..." init="#{expression}">
       <init><string value="fixed string"/></init>
       <variable>
       <out-variable name="processVariableName" init="#{expressionResolvedInTaskContext}">
       <transition name="...">
      


        • 1. Re: variable and sub-process syntax
          Tom Baeyens Master

          changing

          <in-swimlane name="superProcessSwimlaneName" sub-name="subProcessSwimlaneName" />


          to

          <swimlane-mapping swimlane="superProcessSwimlaneName" sub-swimlane="subProcessSwimlaneName" />
          


          • 2. Re: variable and sub-process syntax
            Tom Baeyens Master

            sub-process with swimlane mapping

            <sub-process name='...'>
             <swimlane-mapping swimlane="superProcessSwimlaneName" sub-swimlane="subProcessSwimlaneName" />
            


            sub process variable initialization based on expression

            <sub-process name='...'>
             <variable name="subProcessVariableName" init="#{expression}" />
            


            sub process variable fixed value initialization

            <sub-process name='...'>
             <variable name="subProcessVariableName">
             <integer value="5" />
             </variable>
            


            extract information from sub-process when it finishes

            <sub-process name='...'>
             <out-variable name="processVariableName" init="#{expressionResolvedInSubProcessContext}">
            


            specify outgoing transition based on sub process variable value

            <sub-process name='...' outcome="#{subProcessExpression}">
             <transition name="...">
             <outcome-value><string value="..." /></outcome-value>
             </transition>
            


            specify outgoing transition based on sub process end activity

            <sub-process name='...'>
             <transition name="...">
             <outcome activity="subProcessEndActivityName" />
             </transition>