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 => "Get JSON", :method => "get", :parameters => nil }, <<-end
-data.json = result
-data.json_lv = result['lv']
-data.json_lvnr = result['lv']['lvnr']
+ <dsl>call :a1, :bookAir, { :label => "blaa", :method => :post, :parameters => {:from => data.from, :to => data.to, :persons => data.persons} }, <<-end
+data.airline = result.value('id')
+ data.costs += result.value('costs').to_f
+ status.update 1, 'Hotel'
end
-call :a2, :xml, { :label => "Get XML", :method => "get", :parameters => nil }, <<-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 > 0} do
+ parallel_branch data.persons do |p|
+ call :a2, :bookHotel, { :method => :post, :parameters => {:to => data.to} }, <<-end
+ data.hotels << result.value('id')
+ data.costs += result.value('costs').to_f
+ end
+ end
+ manipulate :a3, <<-end
+ data.persons -= 1
+ end
+ end
end
+choose :inclusive do
+ alternative "data.costs > 700" do
+ call :a4, :approve, { :method => :post, :parameters => {:costs => 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 > 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 << 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 > 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 > 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 << 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 > 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