server/instances/25/properties.xml in cpee-1.4.7 vs server/instances/25/properties.xml in cpee-1.4.8

- old
+ new

@@ -1,72 +1,156 @@ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0"> <attributes> - <uuid>868b7c09-0bc7-433a-9f30-2e6d05d67ff6</uuid> + <uuid>f8179149-f621-4dd3-be43-8ba3f34acc4e</uuid> <info>Enter info here</info> <modeltype>CPEE</modeltype> <theme>default</theme> </attributes> - <state>ready</state> + <state>finished</state> <handlerwrapper>DefaultHandlerWrapper</handlerwrapper> <positions/> - <dataelements/> + <dataelements> + <persons>0</persons> + <card>Visa_12345</card> + <airline>Lufthansa</airline> + <hotels>["Rathaus","Rathaus","Ibis"]</hotels> + <from>Vienna</from> + <to>Prague</to> + <costs>1199.0</costs> + </dataelements> <endpoints> - <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout> + <bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir> + <bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel> + <approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve> </endpoints> - <dsl>call :a1, nil, parameters: { :label =&gt; "", :method =&gt; :post, :arguments =&gt; nil } + <dsl>call :a1, :bookAir, parameters: { :label =&gt; "Book Airline", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :from, :value =&gt; data.from), ⭐(:name =&gt; :to, :value =&gt; data.to), ⭐(:name =&gt; :persons, :value =&gt; data.persons)] }, finalize: &lt;&lt;-END + data.airline = result.value('id') + data.costs += result.value('costs').to_f + status.update 1, 'Hotel' +END +parallel do + loop pre_test{data.persons &gt; 0} do + parallel_branch data.persons do |p| + call :a2, :bookHotel, parameters: { :label =&gt; "Book Hotel", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :to, :value =&gt; data.to)] }, 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 :inclusive do + alternative "data.costs &gt; 700" do + call :a4, :approve, parameters: { :label =&gt; "Approve Hotel", :method =&gt; :post, :arguments =&gt; [⭐(:name =&gt; :costs, :value =&gt; data.costs)] } + end +end </dsl> <dslx> <description xmlns="http://cpee.org/ns/description/1.0"> - <call id="a1" endpoint=""> + <call id="a1" endpoint="bookAir"> <parameters> - <label/> + <label>Book Airline</label> <method>:post</method> - <arguments/> + <arguments> + <from>data.from</from> + <to>data.to</to> + <persons>data.persons</persons> + </arguments> </parameters> - <finalize output="result"/> - <update output="result"/> - <_timing> - <_timing_min/> - <_timing_max/> - <_timing_avg/> - </_timing> - <_notes> - <_notes_general/> - <_notes_output/> - <_attachments/> - </_notes> + <finalize output="result">data.airline = result.value('id') +data.costs += result.value('costs').to_f +status.update 1, 'Hotel'</finalize> </call> + <parallel> + <loop mode="pre_test" condition="data.persons &gt; 0"> + <parallel_branch pass="data.persons" local="p"> + <call id="a2" endpoint="bookHotel"> + <parameters> + <label>Book Hotel</label> + <method>:post</method> + <arguments> + <to>data.to</to> + </arguments> + </parameters> + <finalize output="result">data.hotels &lt;&lt; result.value('id') +data.costs += result.value('costs').to_f</finalize> + </call> + </parallel_branch> + <manipulate id="a3">data.persons -= 1</manipulate> + </loop> + </parallel> + <choose mode="inclusive"> + <alternative condition="data.costs &gt; 700"> + <call id="a4" endpoint="approve"> + <parameters> + <label>Approve Hotel</label> + <method>:post</method> + <arguments> + <costs>data.costs</costs> + </arguments> + </parameters> + </call> + </alternative> + </choose> </description> </dslx> <status> <id>0</id> <message>undefined</message> </status> <description> <description xmlns="http://cpee.org/ns/description/1.0"> - <call id="a1" endpoint=""> + <call id="a1" endpoint="bookAir"> <parameters> - <label/> + <label>Book Airline</label> <method>:post</method> - <arguments/> + <arguments> + <from>data.from</from> + <to>data.to</to> + <persons>data.persons</persons> + </arguments> </parameters> - <finalize output="result"/> - <update output="result"/> - <_timing> - <_timing_min/> - <_timing_max/> - <_timing_avg/> - </_timing> - <_notes> - <_notes_general/> - <_notes_output/> - <_attachments/> - </_notes> + <finalize output="result">data.airline = result.value('id') +data.costs += result.value('costs').to_f +status.update 1, 'Hotel'</finalize> </call> + <parallel> + <loop mode="pre_test" condition="data.persons &gt; 0"> + <parallel_branch pass="data.persons" local="p"> + <call id="a2" endpoint="bookHotel"> + <parameters> + <label>Book Hotel</label> + <method>:post</method> + <arguments> + <to>data.to</to> + </arguments> + </parameters> + <finalize output="result">data.hotels &lt;&lt; result.value('id') +data.costs += result.value('costs').to_f</finalize> + </call> + </parallel_branch> + <manipulate id="a3">data.persons -= 1</manipulate> + </loop> + </parallel> + <choose mode="inclusive"> + <alternative condition="data.costs &gt; 700"> + <call id="a4" endpoint="approve"> + <parameters> + <label>Approve Hotel</label> + <method>:post</method> + <arguments> + <costs>data.costs</costs> + </arguments> + </parameters> + </call> + </alternative> + </choose> </description> </description> <transformation> <description type="copy"/> - <dataelements type="none"/> - <endpoints type="none"/> + <dataelements type="rest"/> + <endpoints type="rest"/> </transformation> </properties> \ No newline at end of file