server/instances/17/properties.xml in cpee-1.3.174 vs server/instances/17/properties.xml in cpee-1.3.175
- old
+ new
@@ -1,44 +1,146 @@
-<?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://riddl.org/ns/common-patterns/properties/1.0">
- <info/>
+ <info>Enter info here</info>
<properties/>
<state>ready</state>
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
<positions/>
- <dataelements/>
+ <dataelements>
+ <persons>3</persons>
+ <card>Visa_12345</card>
+ <airline>null</airline>
+ <hotels>[]</hotels>
+ <from>Vienna</from>
+ <to>Prague</to>
+ <costs>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/>
+ <dsl>call :a1, :bookAir, { :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
+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"/>
- </dslx>
+ <description xmlns="http://cpee.org/ns/description/1.0">
+ <call id="a1" endpoint="bookAir">
+ <parameters>
+ <method>:post</method>
+ <parameters>
+ <from>data.from</from>
+ <to>data.to</to>
+ <persons>data.persons</persons>
+ </parameters>
+ </parameters>
+ <manipulate output="result"> data.airline = result.value('id')
+ data.costs += result.value('costs').to_f
+ status.update 1, 'Hotel'</manipulate>
+ </call>
+ <parallel>
+ <loop pre_test="data.persons > 0">
+ <parallel_branch pass="data.persons" local="p">
+ <call id="a2" endpoint="bookHotel">
+ <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"> data.persons -= 1</manipulate>
+ </loop>
+ </parallel>
+ <choose>
+ <alternative condition="data.costs > 700">
+ <call id="a4" endpoint="approve">
+ <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"/>
+ <description xmlns="http://cpee.org/ns/description/1.0">
+ <call id="a1" endpoint="bookAir">
+ <parameters>
+ <method>:post</method>
+ <parameters>
+ <from>data.from</from>
+ <to>data.to</to>
+ <persons>data.persons</persons>
+ </parameters>
+ </parameters>
+ <manipulate output="result"> data.airline = result.value('id')
+ data.costs += result.value('costs').to_f
+ status.update 1, 'Hotel'</manipulate>
+ </call>
+ <parallel>
+ <loop pre_test="data.persons > 0">
+ <parallel_branch pass="data.persons" local="p">
+ <call id="a2" endpoint="bookHotel">
+ <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"> data.persons -= 1</manipulate>
+ </loop>
+ </parallel>
+ <choose>
+ <alternative condition="data.costs > 700">
+ <call id="a4" endpoint="approve">
+ <parameters>
+ <method>:post</method>
+ <parameters>
+ <costs>data.costs</costs>
+ </parameters>
+ </parameters>
+ </call>
+ </alternative>
+ </choose>
+ </description>
</description>
<transformation>
- <description type='copy'/>
- <dataelements type='none'/>
- <endpoints type='none'/>
+ <description type="copy"/>
+ <dataelements type="rest"/>
+ <endpoints type="rest"/>
</transformation>
-</properties>
+</properties>
\ No newline at end of file