<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
  <attributes>
    <uuid>e5b75cbd-75ec-4f21-92ca-ddbc28d28067</uuid>
    <info>a01209799</info>
    <modeltype>CPEE</modeltype>
    <theme>labels</theme>
  </attributes>
  <state>ready</state>
  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
  <positions/>
  <dataelements>
    <pid>null</pid>
    <rid>null</rid>
    <startingblock>null</startingblock>
    <testruntime>null</testruntime>
    <startingnumber>null</startingnumber>
    <timetonightrun>null</timetonightrun>
    <nightruntime>null</nightruntime>
  </dataelements>
  <endpoints>
    <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
    <processid>http://abgabe.cs.univie.ac.at:9500/processid</processid>
    <runnerid>http://abgabe.cs.univie.ac.at:9500/runnerid</runnerid>
    <startingblock>http://abgabe.cs.univie.ac.at:9500/startingblock</startingblock>
    <trainrunning>http://abgabe.cs.univie.ac.at:9500/trainrunning</trainrunning>
    <runtestrun>http://abgabe.cs.univie.ac.at:9500/runtestrun</runtestrun>
    <savetestrun>http://abgabe.cs.univie.ac.at:9500/savetestrun</savetestrun>
    <startingnumber>http://abgabe.cs.univie.ac.at:9500/startingnumber</startingnumber>
    <estimate>http://abgabe.cs.univie.ac.at:9500/estimate</estimate>
    <saveestimate>http://abgabe.cs.univie.ac.at:9500/saveestimate</saveestimate>
    <hometonightrun>http://abgabe.cs.univie.ac.at:9500/hometonightrun</hometonightrun>
    <worktonightrun>http://abgabe.cs.univie.ac.at:9500/worktonightrun</worktonightrun>
    <startnightrun>http://abgabe.cs.univie.ac.at:9500/startnightrun</startnightrun>
    <run>http://abgabe.cs.univie.ac.at:9500/run</run>
    <drink>http://abgabe.cs.univie.ac.at:9500/drink</drink>
    <calculate>http://abgabe.cs.univie.ac.at:9500/calculate</calculate>
  </endpoints>
  <dsl>call :a16, :processid, parameters: { :label =&gt; "Set up process id", :method =&gt; :get, :arguments =&gt; nil }, finalize: &lt;&lt;-END
  data.pid=result
END
call :a15, :runnerid, parameters: { :label =&gt; "Assign runner id", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }, finalize: &lt;&lt;-END
  data.rid=result
END
call :a12, :startingblock, parameters: { :label =&gt; "Select starting block", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }, finalize: &lt;&lt;-END
  data.startingblock=result
END
loop post_test{23 &gt; 25}  do
  call :a11, :trainrunning, parameters: { :label =&gt; "Train running", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }
  call :a13, :runtestrun, parameters: { :label =&gt; "Run 5km measured run", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }, finalize: &lt;&lt;-END
    data.testruntime=result
  END
  call :a14, :savetestrun, parameters: { :label =&gt; "Save time testrun", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid), ⭐(:name =&gt; :testrun, :value =&gt; data.testruntime)] }
end
call :a3, :startingnumber, parameters: { :label =&gt; "Get starting number", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }, finalize: &lt;&lt;-END
  data.startingnumber=result
END
call :a2, :estimate, parameters: { :label =&gt; "Estimate time to run", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }, finalize: &lt;&lt;-END
  data.timetonightrun=result
END
call :a4, :saveestimate, parameters: { :label =&gt; "Save estimated time", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid), ⭐(:name =&gt; :estimate, :value =&gt; data.timetonightrun)] }
choose :exclusive do
  alternative test{data.timetonightrun&gt;60} do
    call :a6, :hometonightrun, parameters: { :label =&gt; "Leave from home to go to Night Run", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }
  end
  otherwise  do
    call :a5, :worktonightrun, parameters: { :label =&gt; "Leave directly from work to go to Night Run", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }
  end
end
call :a7, :startnightrun, parameters: { :label =&gt; "Start taking the time of Night Run", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }
parallel :wait =&gt; -1 do
  parallel_branch  do ||
    call :a8, :run, parameters: { :label =&gt; "Run", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }
  end
  parallel_branch  do ||
    call :a9, :drink, parameters: { :label =&gt; "Drink", :method =&gt; :get, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }
  end
end
call :a10, :calculate, parameters: { :label =&gt; "Calculate running time", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :pid, :value =&gt; data.pid)] }, finalize: &lt;&lt;-END
  data.nightruntime=result
END
</dsl>
  <dslx>
    <description xmlns="http://cpee.org/ns/description/1.0">
      <call id="a16" endpoint="processid">
        <parameters>
          <label>Set up process id</label>
          <method>:get</method>
          <arguments/>
        </parameters>
        <finalize output="result">data.pid=result</finalize>
        <update output="result"/>
      </call>
      <call id="a15" endpoint="runnerid">
        <parameters>
          <label>Assign runner id</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.rid=result</finalize>
        <update output="result"/>
      </call>
      <call id="a12" endpoint="startingblock">
        <parameters>
          <label>Select starting block</label>
          <method>:get</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.startingblock=result</finalize>
        <update output="result"/>
      </call>
      <loop mode="post_test" condition="23 &gt; 25">
        <call id="a11" endpoint="trainrunning">
          <parameters>
            <label>Train running</label>
            <method>:get</method>
            <arguments>
              <pid>data.pid</pid>
            </arguments>
          </parameters>
        </call>
        <call id="a13" endpoint="runtestrun">
          <parameters>
            <label>Run 5km measured run</label>
            <method>:get</method>
            <arguments>
              <pid>data.pid</pid>
            </arguments>
          </parameters>
          <finalize output="result">data.testruntime=result</finalize>
          <update output="result"/>
        </call>
        <call id="a14" endpoint="savetestrun">
          <parameters>
            <label>Save time testrun</label>
            <method>:post</method>
            <arguments>
              <pid>data.pid</pid>
              <testrun>data.testruntime</testrun>
            </arguments>
          </parameters>
        </call>
      </loop>
      <call id="a3" endpoint="startingnumber">
        <parameters>
          <label>Get starting number</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.startingnumber=result</finalize>
        <update output="result"/>
      </call>
      <call id="a2" endpoint="estimate">
        <parameters>
          <label>Estimate time to run</label>
          <method>:get</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.timetonightrun=result</finalize>
        <update output="result"/>
      </call>
      <call id="a4" endpoint="saveestimate">
        <parameters>
          <label>Save estimated time</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
            <estimate>data.timetonightrun</estimate>
          </arguments>
        </parameters>
      </call>
      <choose mode="exclusive">
        <alternative condition="data.timetonightrun&gt;60">
          <call id="a6" endpoint="hometonightrun">
            <parameters>
              <label>Leave from home to go to Night Run</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </alternative>
        <otherwise>
          <call id="a5" endpoint="worktonightrun">
            <parameters>
              <label>Leave directly from work to go to Night Run</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </otherwise>
      </choose>
      <call id="a7" endpoint="startnightrun">
        <parameters>
          <label>Start taking the time of Night Run</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
      </call>
      <parallel wait="-1">
        <parallel_branch pass="" local="">
          <call id="a8" endpoint="run">
            <parameters>
              <label>Run</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </parallel_branch>
        <parallel_branch pass="" local="">
          <call id="a9" endpoint="drink">
            <parameters>
              <label>Drink</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </parallel_branch>
      </parallel>
      <call id="a10" endpoint="calculate">
        <parameters>
          <label>Calculate running time</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.nightruntime=result</finalize>
        <update output="result"/>
      </call>
    </description>
  </dslx>
  <status>
    <id>0</id>
    <message>undefined</message>
  </status>
  <description>
    <description xmlns="http://cpee.org/ns/description/1.0">
      <call id="a16" endpoint="processid">
        <parameters>
          <label>Set up process id</label>
          <method>:get</method>
          <arguments/>
        </parameters>
        <finalize output="result">data.pid=result</finalize>
        <update output="result"/>
      </call>
      <call id="a15" endpoint="runnerid">
        <parameters>
          <label>Assign runner id</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.rid=result</finalize>
        <update output="result"/>
      </call>
      <call id="a12" endpoint="startingblock">
        <parameters>
          <label>Select starting block</label>
          <method>:get</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.startingblock=result</finalize>
        <update output="result"/>
      </call>
      <loop mode="post_test" condition="23 &gt; 25">
        <call id="a11" endpoint="trainrunning">
          <parameters>
            <label>Train running</label>
            <method>:get</method>
            <arguments>
              <pid>data.pid</pid>
            </arguments>
          </parameters>
        </call>
        <call id="a13" endpoint="runtestrun">
          <parameters>
            <label>Run 5km measured run</label>
            <method>:get</method>
            <arguments>
              <pid>data.pid</pid>
            </arguments>
          </parameters>
          <finalize output="result">data.testruntime=result</finalize>
          <update output="result"/>
        </call>
        <call id="a14" endpoint="savetestrun">
          <parameters>
            <label>Save time testrun</label>
            <method>:post</method>
            <arguments>
              <pid>data.pid</pid>
              <testrun>data.testruntime</testrun>
            </arguments>
          </parameters>
        </call>
      </loop>
      <call id="a3" endpoint="startingnumber">
        <parameters>
          <label>Get starting number</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.startingnumber=result</finalize>
        <update output="result"/>
      </call>
      <call id="a2" endpoint="estimate">
        <parameters>
          <label>Estimate time to run</label>
          <method>:get</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.timetonightrun=result</finalize>
        <update output="result"/>
      </call>
      <call id="a4" endpoint="saveestimate">
        <parameters>
          <label>Save estimated time</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
            <estimate>data.timetonightrun</estimate>
          </arguments>
        </parameters>
      </call>
      <choose mode="exclusive">
        <alternative condition="data.timetonightrun&gt;60">
          <call id="a6" endpoint="hometonightrun">
            <parameters>
              <label>Leave from home to go to Night Run</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </alternative>
        <otherwise>
          <call id="a5" endpoint="worktonightrun">
            <parameters>
              <label>Leave directly from work to go to Night Run</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </otherwise>
      </choose>
      <call id="a7" endpoint="startnightrun">
        <parameters>
          <label>Start taking the time of Night Run</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
      </call>
      <parallel wait="-1">
        <parallel_branch pass="" local="">
          <call id="a8" endpoint="run">
            <parameters>
              <label>Run</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </parallel_branch>
        <parallel_branch pass="" local="">
          <call id="a9" endpoint="drink">
            <parameters>
              <label>Drink</label>
              <method>:get</method>
              <arguments>
                <pid>data.pid</pid>
              </arguments>
            </parameters>
          </call>
        </parallel_branch>
      </parallel>
      <call id="a10" endpoint="calculate">
        <parameters>
          <label>Calculate running time</label>
          <method>:post</method>
          <arguments>
            <pid>data.pid</pid>
          </arguments>
        </parameters>
        <finalize output="result">data.nightruntime=result</finalize>
        <update output="result"/>
      </call>
    </description>
  </description>
  <transformation>
    <description type="copy"/>
    <dataelements type="none"/>
    <endpoints type="none"/>
  </transformation>
</properties>