server/instances/7/properties.xml in cpee-1.3.175 vs server/instances/7/properties.xml in cpee-1.3.176

- old
+ new

@@ -1,83 +1,149 @@ <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0"> - <info>Enter info here</info> - <state>finished</state> + <info>sdff</info> + <state>stopped</state> <handlerwrapper>DefaultHandlerWrapper</handlerwrapper> - <positions/> + <positions> + <a1>after</a1> + </positions> <dataelements> - <json>{"lv":"Workflow Technologies","id":{"lvnr":"050311","gruppe":1}}</json> - <json_lv>Workflow Technologies</json_lv> - <json_lvnr/> - <xml_lv>Workflow Technologies</xml_lv> - <xml_lvnr>050311</xml_lvnr> + <persons>0</persons> + <card>Visa_12345</card> + <airline>Lufthansa</airline> + <hotels>["Mariott","Ibis","Ibis"]</hotels> + <from>Vienna</from> + <to>Prague</to> + <costs>1936.0</costs> </dataelements> <endpoints> - <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout> - <json>http://cpee.org/services/json.php</json> - <xml>http://cpee.org/services/xml.php</xml> + <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, :json, { :label =&gt; "Get JSON", :method =&gt; "get", :parameters =&gt; nil }, &lt;&lt;-end -data.json = result -data.json_lv = result['lv'] -data.json_lvnr = result['lv']['lvnr'] + <dsl>call :a1, :bookAir, { :label =&gt; "blaa", :method =&gt; :post, :parameters =&gt; {:from =&gt; data.from, :to =&gt; data.to, :persons =&gt; data.persons} }, &lt;&lt;-end +data.airline = result.value('id') + data.costs += result.value('costs').to_f + status.update 1, 'Hotel' end -call :a2, :xml, { :label =&gt; "Get XML", :method =&gt; "get", :parameters =&gt; nil }, &lt;&lt;-end -data.xml_lv = result.find('string(/data/lv)') -data.xml_lvnr = result.find('string(/data/lv/@id)') +parallel do + loop pre_test{data.persons &gt; 0} do + parallel_branch data.persons do |p| + call :a2, :bookHotel, { :method =&gt; :post, :parameters =&gt; {:to =&gt; data.to} }, &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, { :method =&gt; :post, :parameters =&gt; {:costs =&gt; data.costs} } + end +end </dsl> <dslx> <description xmlns="http://cpee.org/ns/description/1.0"> - <call id="a1" endpoint="json" svg-label="Get JSON"> + <call id="a1" endpoint="bookAir"> <parameters> - <label>Get JSON</label> - <method>get</method> - <parameters/> + <label>"blaa"</label> + <method>:post</method> + <parameters> + <from>data.from</from> + <to>data.to</to> + <persons>data.persons</persons> + </parameters> </parameters> - <manipulate>data.json = result -data.json_lv = result['lv'] -data.json_lvnr = result['lv']['lvnr']</manipulate> + <manipulate>data.airline = result.value('id') + data.costs += result.value('costs').to_f + status.update 1, 'Hotel'</manipulate> </call> - <call id="a2" endpoint="xml"> - <parameters> - <label>Get XML</label> - <method>get</method> - <parameters/> - </parameters> - <manipulate>data.xml_lv = result.find('string(/data/lv)') -data.xml_lvnr = result.find('string(/data/lv/@id)')</manipulate> - </call> + <parallel svg-label=""> + <loop pre_test="data.persons &gt; 0" svg-label=""> + <parallel_branch pass="data.persons" local="p" svg-label=""> + <call id="a2" endpoint="bookHotel" svg-label=""> + <parameters> + <method>:post</method> + <parameters> + <to>data.to</to> + </parameters> + </parameters> + <manipulate output="result"> data.hotels &lt;&lt; result.value('id') + data.costs += result.value('costs').to_f</manipulate> + </call> + </parallel_branch> + <manipulate id="a3" svg-label=""> data.persons -= 1</manipulate> + </loop> + </parallel> + <choose svg-label=""> + <alternative condition="data.costs &gt; 700" svg-label=""> + <call id="a4" endpoint="approve" svg-label=""> + <parameters> + <method>:post</method> + <parameters> + <costs>data.costs</costs> + </parameters> + </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="json" svg-label="Get JSON"> + <call id="a1" endpoint="bookAir"> <parameters> - <label>Get JSON</label> - <method>get</method> - <parameters/> + <label>"blaa"</label> + <method>:post</method> + <parameters> + <from>data.from</from> + <to>data.to</to> + <persons>data.persons</persons> + </parameters> </parameters> - <manipulate>data.json = result -data.json_lv = result['lv'] -data.json_lvnr = result['lv']['lvnr']</manipulate> + <manipulate>data.airline = result.value('id') + data.costs += result.value('costs').to_f + status.update 1, 'Hotel'</manipulate> </call> - <call id="a2" endpoint="xml"> - <parameters> - <label>Get XML</label> - <method>get</method> - <parameters/> - </parameters> - <manipulate>data.xml_lv = result.find('string(/data/lv)') -data.xml_lvnr = result.find('string(/data/lv/@id)')</manipulate> - </call> + <parallel svg-label=""> + <loop pre_test="data.persons &gt; 0" svg-label=""> + <parallel_branch pass="data.persons" local="p" svg-label=""> + <call id="a2" endpoint="bookHotel" svg-label=""> + <parameters> + <method>:post</method> + <parameters> + <to>data.to</to> + </parameters> + </parameters> + <manipulate output="result"> data.hotels &lt;&lt; result.value('id') + data.costs += result.value('costs').to_f</manipulate> + </call> + </parallel_branch> + <manipulate id="a3" svg-label=""> data.persons -= 1</manipulate> + </loop> + </parallel> + <choose svg-label=""> + <alternative condition="data.costs &gt; 700" svg-label=""> + <call id="a4" endpoint="approve" svg-label=""> + <parameters> + <method>:post</method> + <parameters> + <costs>data.costs</costs> + </parameters> + </parameters> + </call> + </alternative> + </choose> </description> </description> <transformation> <description type="copy"/> - <dataelements type="xslt"/> - <endpoints type="xslt"/> + <dataelements type="rest"/> + <endpoints type="rest"/> </transformation> </properties> \ No newline at end of file