<?xml version="1.0"?>
<!--
  This file is part of CPEE.

  CPEE is free software: you can redistribute it and/or modify it under the
  terms of the GNU General Public License as published by the Free Software
  Foundation, either version 3 of the License, or (at your option) any later
  version.

  CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  PARTICULAR PURPOSE.  See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with
  CPEE (file COPYING in the main directory). If not, see
  <http://www.gnu.org/licenses/>.
-->
<properties xmlns="http://cpee.org/ns/properties/2.0">
  <state changed="2026-03-16T22:16:24.388366+01:00">abandoned</state>
  <status>
    <id>0</id>
    <message>undefined</message>
  </status>
  <executionhandler>eval</executionhandler>
  <positions>
    <a1>at</a1>
  </positions>
  <dataelements>
    <persons>3</persons>
    <card>Visa_12345</card>
    <airline/>
    <hotels>[]</hotels>
    <from>Vienna</from>
    <to>Prague</to>
    <costs>0</costs>
  </dataelements>
  <endpoints>
    <bookAir>https://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
    <user>https-post://cpee.org/services/timeout-user.php</user>
    <auto>https-post://cpee.org/services/timeout-auto.php</auto>
    <timeout>https://cpee.org/services/timeout.php</timeout>
    <bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
    <subprocess>https://cpee.org/flow/start/url/</subprocess>
    <approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
    <send>https-post://cpee.org/ing/correlators/message/send/</send>
    <receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
  </endpoints>
  <attributes>
    <uuid>aabfb07c-2839-4e9c-91ca-4b640b71b634</uuid>
    <executionhandler>eval</executionhandler>
    <guarded>none</guarded>
    <modeltype>CPEE</modeltype>
    <theme>extended</theme>
    <guarded_id/>
    <info>Coopis 2010</info>
    <creator>Christine Ashcreek</creator>
    <author>Christine Ashcreek</author>
    <design_stage>development</design_stage>
    <design_dir>Templates.dir</design_dir>
    <model_uuid>a1cbb855-90e3-4d8c-b44b-d3ba7bff9f4e</model_uuid>
    <model_version/>
  </attributes>
  <dsl>control flow do
  call :a1, :bookAir, parameters: { :label =&gt; "Book Airline 1", :method =&gt; :post, :arguments =&gt; [&#x2B50;(:name =&gt; :from, :value =&gt; &#x1F80A;("data.from") ), &#x2B50;(:name =&gt; :to, :value =&gt; &#x1F80A;("data.to") ), &#x2B50;(:name =&gt; :persons, :value =&gt; &#x1F80A;("data.persons") )], :annotations =&gt; { :_timing =&gt; {:_timing_weight =&gt; nil, :_timing_avg =&gt; nil, :explanations =&gt; nil}, :_shifting =&gt; {:_shifting_type =&gt; "Duration"}, :_context_data_analysis =&gt; {:probes =&gt; nil, :ips =&gt; nil}, :report =&gt; {:url =&gt; nil}, :_notes =&gt; {:_notes_general =&gt; nil} } }, finalize: &lt;&lt;-END
    data.airline = result.value('id')
    data.costs += result.value('costs').to_f
    status.update 1, 'Hotel'
  END
  parallel :e_1_2, :wait =&gt; -1, :cancel =&gt; :last do
    loop :e_1_2_1, pre_test("data.persons &gt; 0") do
      parallel_branch :e_1_2_1_1 do |local|
        call :a2, :bookHotel, parameters: { :label =&gt; "Book Hotel", :method =&gt; :post, :arguments =&gt; [&#x2B50;(:name =&gt; :to, :value =&gt; &#x1F80A;("data.to") )], :annotations =&gt; { :_timing =&gt; {:_timing_weight =&gt; nil, :_timing_avg =&gt; nil, :explanations =&gt; nil}, :_shifting =&gt; {:_shifting_type =&gt; "Duration"}, :_context_data_analysis =&gt; {:probes =&gt; nil, :ips =&gt; nil}, :report =&gt; {:url =&gt; nil}, :_notes =&gt; {:_notes_general =&gt; nil} } }, finalize: &lt;&lt;-END
          data.hotels &lt;&lt; result.value('id')
          data.costs += result.value('costs').to_f
        END
      end
      manipulate :a3, &lt;&lt;-END
        data.persons -= 1
      END
    end
  end
  choose :e_1_3, :exclusive do
    alternative :e_1_3_1, test("data.costs &gt; 700") do
      call :a4, :approve, parameters: { :label =&gt; "Approve Hotel", :method =&gt; :post, :arguments =&gt; [&#x2B50;(:name =&gt; :costs, :value =&gt; &#x1F80A;("data.costs") )], :annotations =&gt; { :_timing =&gt; {:_timing_weight =&gt; nil, :_timing_avg =&gt; nil, :explanations =&gt; nil}, :_shifting =&gt; {:_shifting_type =&gt; "Duration"}, :_context_data_analysis =&gt; {:probes =&gt; nil, :ips =&gt; nil}, :report =&gt; {:url =&gt; nil}, :_notes =&gt; {:_notes_general =&gt; nil} } }
    end
  end
end</dsl>
  <dslx>
    <description xmlns="http://cpee.org/ns/description/1.0">
      <call id="a1" endpoint="bookAir">
        <parameters>
          <label>Book Airline 1</label>
          <method>:post</method>
          <arguments>
            <from>!data.from</from>
            <to>!data.to</to>
            <persons>!data.persons</persons>
          </arguments>
        </parameters>
        <code>
          <prepare/>
          <finalize output="result">data.airline = result.value('id')
data.costs += result.value('costs').to_f
status.update 1, 'Hotel'</finalize>
          <update output="result"/>
          <rescue output="result"/>
        </code>
        <annotations>
          <_timing>
            <_timing_weight/>
            <_timing_avg/>
            <explanations/>
          </_timing>
          <_shifting>
            <_shifting_type>Duration</_shifting_type>
          </_shifting>
          <_context_data_analysis>
            <probes/>
            <ips/>
          </_context_data_analysis>
          <report>
            <url/>
          </report>
          <_notes>
            <_notes_general/>
          </_notes>
        </annotations>
        <documentation>
          <input/>
          <output/>
          <implementation>
            <description/>
          </implementation>
          <code>
            <description/>
          </code>
        </documentation>
      </call>
      <parallel wait="-1" cancel="last">
        <loop mode="pre_test" condition="data.persons &gt; 0">
          <parallel_branch>
            <call id="a2" endpoint="bookHotel">
              <parameters>
                <label>Book Hotel</label>
                <method>:post</method>
                <arguments>
                  <to>!data.to</to>
                </arguments>
              </parameters>
              <code>
                <prepare/>
                <finalize output="result">data.hotels &lt;&lt; result.value('id')
data.costs += result.value('costs').to_f</finalize>
                <update output="result"/>
                <rescue output="result"/>
              </code>
              <annotations>
                <_timing>
                  <_timing_weight/>
                  <_timing_avg/>
                  <explanations/>
                </_timing>
                <_shifting>
                  <_shifting_type>Duration</_shifting_type>
                </_shifting>
                <_context_data_analysis>
                  <probes/>
                  <ips/>
                </_context_data_analysis>
                <report>
                  <url/>
                </report>
                <_notes>
                  <_notes_general/>
                </_notes>
              </annotations>
              <documentation>
                <input/>
                <output/>
                <implementation>
                  <description/>
                </implementation>
                <code>
                  <description/>
                </code>
              </documentation>
            </call>
          </parallel_branch>
          <manipulate id="a3">data.persons -= 1<code>data.persons -= 1</code></manipulate>
        </loop>
      </parallel>
      <choose mode="exclusive">
        <alternative condition="data.costs &gt; 700">
          <_probability>
            <_probability_min/>
            <_probability_max/>
            <_probability_avg/>
          </_probability>
          <call id="a4" endpoint="approve">
            <parameters>
              <label>Approve Hotel</label>
              <method>:post</method>
              <arguments>
                <costs>!data.costs</costs>
              </arguments>
            </parameters>
            <annotations>
              <_timing>
                <_timing_weight/>
                <_timing_avg/>
                <explanations/>
              </_timing>
              <_shifting>
                <_shifting_type>Duration</_shifting_type>
              </_shifting>
              <_context_data_analysis>
                <probes/>
                <ips/>
              </_context_data_analysis>
              <report>
                <url/>
              </report>
              <_notes>
                <_notes_general/>
              </_notes>
            </annotations>
            <documentation>
              <input/>
              <output/>
              <implementation>
                <description/>
              </implementation>
            </documentation>
          </call>
        </alternative>
        <otherwise/>
      </choose>
    </description>
  </dslx>
  <description>
    <description xmlns="http://cpee.org/ns/description/1.0">
      <call id="a1" endpoint="bookAir">
        <parameters>
          <label>Book Airline 1</label>
          <method>:post</method>
          <arguments>
            <from>!data.from</from>
            <to>!data.to</to>
            <persons>!data.persons</persons>
          </arguments>
        </parameters>
        <code>
          <prepare/>
          <finalize output="result">data.airline = result.value('id')
data.costs += result.value('costs').to_f
status.update 1, 'Hotel'</finalize>
          <update output="result"/>
          <rescue output="result"/>
        </code>
        <annotations>
          <_timing>
            <_timing_weight/>
            <_timing_avg/>
            <explanations/>
          </_timing>
          <_shifting>
            <_shifting_type>Duration</_shifting_type>
          </_shifting>
          <_context_data_analysis>
            <probes/>
            <ips/>
          </_context_data_analysis>
          <report>
            <url/>
          </report>
          <_notes>
            <_notes_general/>
          </_notes>
        </annotations>
        <documentation>
          <input/>
          <output/>
          <implementation>
            <description/>
          </implementation>
          <code>
            <description/>
          </code>
        </documentation>
      </call>
      <parallel wait="-1" cancel="last">
        <loop mode="pre_test" condition="data.persons &gt; 0">
          <parallel_branch>
            <call id="a2" endpoint="bookHotel">
              <parameters>
                <label>Book Hotel</label>
                <method>:post</method>
                <arguments>
                  <to>!data.to</to>
                </arguments>
              </parameters>
              <code>
                <prepare/>
                <finalize output="result">data.hotels &lt;&lt; result.value('id')
data.costs += result.value('costs').to_f</finalize>
                <update output="result"/>
                <rescue output="result"/>
              </code>
              <annotations>
                <_timing>
                  <_timing_weight/>
                  <_timing_avg/>
                  <explanations/>
                </_timing>
                <_shifting>
                  <_shifting_type>Duration</_shifting_type>
                </_shifting>
                <_context_data_analysis>
                  <probes/>
                  <ips/>
                </_context_data_analysis>
                <report>
                  <url/>
                </report>
                <_notes>
                  <_notes_general/>
                </_notes>
              </annotations>
              <documentation>
                <input/>
                <output/>
                <implementation>
                  <description/>
                </implementation>
                <code>
                  <description/>
                </code>
              </documentation>
            </call>
          </parallel_branch>
          <manipulate id="a3">data.persons -= 1<code>data.persons -= 1</code></manipulate>
        </loop>
      </parallel>
      <choose mode="exclusive">
        <alternative condition="data.costs &gt; 700">
          <_probability>
            <_probability_min/>
            <_probability_max/>
            <_probability_avg/>
          </_probability>
          <call id="a4" endpoint="approve">
            <parameters>
              <label>Approve Hotel</label>
              <method>:post</method>
              <arguments>
                <costs>!data.costs</costs>
              </arguments>
            </parameters>
            <annotations>
              <_timing>
                <_timing_weight/>
                <_timing_avg/>
                <explanations/>
              </_timing>
              <_shifting>
                <_shifting_type>Duration</_shifting_type>
              </_shifting>
              <_context_data_analysis>
                <probes/>
                <ips/>
              </_context_data_analysis>
              <report>
                <url/>
              </report>
              <_notes>
                <_notes_general/>
              </_notes>
            </annotations>
            <documentation>
              <input/>
              <output/>
              <implementation>
                <description/>
              </implementation>
            </documentation>
          </call>
        </alternative>
        <otherwise/>
      </choose>
    </description>
  </description>
  <transformation>
    <description type="copy"/>
    <dataelements type="none"/>
    <endpoints type="none"/>
  </transformation>
</properties>
