cpee 1.4.7 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/cpee.gemspec +1 -1
- data/lib/cpee/controller.rb +41 -7
- data/lib/cpee/handler_properties.rb +9 -9
- data/lib/cpee/instantiation.rb +12 -6
- data/lib/instantiation.xml +1 -0
- data/log/elasticsearch.rb +120 -0
- data/log/logs/1/test +1 -0
- data/log/xes_yaml.rb +3 -20
- data/server/handlerwrappers/default.rb +10 -10
- data/server/instances/1/properties.xml +34 -122
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/consumer-secret +1 -0
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/producer-secret +1 -0
- data/server/instances/{76/notifications/a59df784fab648f5327915fc6cf012ab → 10/notifications/182434032285ca1d06a8b6554b8889c8}/subscription.xml +6 -21
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/consumer-secret +1 -0
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/producer-secret +1 -0
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/subscription.xml +6 -0
- data/server/instances/10/properties.xml +141 -127
- data/server/instances/11/properties.xml +162 -179
- data/server/instances/12/properties.xml +163 -87
- data/server/instances/13/properties.xml +131 -2002
- data/server/instances/14/properties.xml +9 -2044
- data/server/instances/15/properties.xml +8 -2039
- data/server/instances/16/properties.xml +8 -2069
- data/server/instances/17/properties.xml +11 -2065
- data/server/instances/18/properties.xml +10 -2109
- data/server/instances/19/properties.xml +5 -90
- data/server/instances/2/properties.xml +10 -135
- data/server/instances/20/properties.xml +169 -9
- data/server/instances/21/properties.xml +122 -82
- data/server/instances/22/properties.xml +53 -2042
- data/server/instances/23/properties.xml +75 -68
- data/server/instances/24/properties.xml +82 -2033
- data/server/instances/25/properties.xml +121 -37
- data/server/instances/26/properties.xml +9 -9
- data/server/instances/27/properties.xml +48 -2044
- data/server/instances/28/properties.xml +83 -2058
- data/server/instances/29/properties.xml +83 -2072
- data/server/instances/3/properties.xml +76 -211
- data/server/instances/30/properties.xml +293 -112
- data/server/instances/31/properties.xml +332 -9
- data/server/instances/313/notifications/crisp/consumer-secret +1 -0
- data/server/instances/313/notifications/crisp/producer-secret +1 -0
- data/server/instances/313/notifications/crisp/subscription.xml +7 -0
- data/server/instances/313/notifications/logging/consumer-secret +1 -0
- data/server/instances/313/notifications/logging/producer-secret +1 -0
- data/server/instances/313/notifications/logging/subscription.xml +7 -0
- data/server/instances/313/notifications/logging_yaml/consumer-secret +1 -0
- data/server/instances/313/notifications/logging_yaml/producer-secret +1 -0
- data/server/instances/313/notifications/logging_yaml/subscription.xml +7 -0
- data/server/instances/313/properties.xml +524 -0
- data/server/instances/32/properties.xml +582 -65
- data/server/instances/33/properties.xml +113 -99
- data/server/instances/4/properties.xml +92 -9
- data/server/instances/5/properties.xml +49 -1505
- data/server/instances/6/properties.xml +186 -11
- data/server/instances/662/notifications/crisp/consumer-secret +1 -0
- data/server/instances/662/notifications/crisp/producer-secret +1 -0
- data/server/instances/662/notifications/crisp/subscription.xml +7 -0
- data/server/instances/662/notifications/logging/consumer-secret +1 -0
- data/server/instances/662/notifications/logging/producer-secret +1 -0
- data/server/instances/662/notifications/logging/subscription.xml +7 -0
- data/server/instances/662/notifications/logging_yaml/consumer-secret +1 -0
- data/server/instances/662/notifications/logging_yaml/producer-secret +1 -0
- data/server/instances/662/notifications/logging_yaml/subscription.xml +7 -0
- data/server/instances/662/properties.xml +427 -0
- data/server/instances/{46 → 663}/properties.xml +1 -1
- data/server/instances/664/properties.xml +425 -0
- data/server/instances/665/properties.xml +425 -0
- data/server/instances/666/properties.xml +427 -0
- data/server/instances/667/properties.xml +427 -0
- data/server/instances/668/properties.xml +425 -0
- data/server/instances/669/properties.xml +425 -0
- data/server/instances/670/properties.xml +31 -0
- data/server/instances/{75 → 671}/properties.xml +12 -12
- data/server/instances/672/properties.xml +199 -0
- data/server/instances/673/properties.xml +52 -0
- data/server/instances/7/properties.xml +82 -1691
- data/server/instances/8/properties.xml +53 -1738
- data/server/instances/9/properties.xml +95 -680
- metadata +42 -52
- data/server/instances/34/properties.xml +0 -183
- data/server/instances/35/properties.xml +0 -183
- data/server/instances/36/properties.xml +0 -185
- data/server/instances/37/properties.xml +0 -183
- data/server/instances/38/properties.xml +0 -183
- data/server/instances/39/properties.xml +0 -183
- data/server/instances/40/properties.xml +0 -183
- data/server/instances/41/properties.xml +0 -183
- data/server/instances/42/properties.xml +0 -183
- data/server/instances/43/properties.xml +0 -183
- data/server/instances/44/properties.xml +0 -183
- data/server/instances/45/properties.xml +0 -185
- data/server/instances/47/properties.xml +0 -185
- data/server/instances/48/properties.xml +0 -185
- data/server/instances/49/properties.xml +0 -185
- data/server/instances/50/properties.xml +0 -183
- data/server/instances/51/properties.xml +0 -183
- data/server/instances/52/properties.xml +0 -2129
- data/server/instances/53/properties.xml +0 -2129
- data/server/instances/54/properties.xml +0 -319
- data/server/instances/55/properties.xml +0 -2114
- data/server/instances/56/properties.xml +0 -2114
- data/server/instances/57/properties.xml +0 -2119
- data/server/instances/58/properties.xml +0 -2119
- data/server/instances/59/properties.xml +0 -2119
- data/server/instances/60/properties.xml +0 -2119
- data/server/instances/61/properties.xml +0 -2114
- data/server/instances/62/properties.xml +0 -2116
- data/server/instances/63/properties.xml +0 -2116
- data/server/instances/64/properties.xml +0 -2116
- data/server/instances/65/properties.xml +0 -76
- data/server/instances/66/properties.xml +0 -97
- data/server/instances/67/properties.xml +0 -184
- data/server/instances/68/properties.xml +0 -158
- data/server/instances/69/properties.xml +0 -156
- data/server/instances/70/properties.xml +0 -156
- data/server/instances/71/properties.xml +0 -156
- data/server/instances/72/properties.xml +0 -156
- data/server/instances/73/properties.xml +0 -156
- data/server/instances/74/properties.xml +0 -156
- data/server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/consumer-secret +0 -1
- data/server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/producer-secret +0 -1
- data/server/instances/76/properties.xml +0 -156
- data/server/resources/base.xml +0 -78
- data/server/resources/test.rb +0 -19
- data/server/resources/test.xml +0 -33
@@ -1,156 +0,0 @@
|
|
1
|
-
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
-
<attributes>
|
3
|
-
<uuid>0df4196c-1713-4259-b70e-45dd5bbe0f09</uuid>
|
4
|
-
<info>Plain Instance</info>
|
5
|
-
<modeltype>CPEE</modeltype>
|
6
|
-
<theme>default</theme>
|
7
|
-
</attributes>
|
8
|
-
<state>finished</state>
|
9
|
-
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
10
|
-
<positions/>
|
11
|
-
<dataelements>
|
12
|
-
<persons>0</persons>
|
13
|
-
<card>Visa_12345</card>
|
14
|
-
<airline>FlyNiki</airline>
|
15
|
-
<hotels>["Rathaus","Mariott","Mariott"]</hotels>
|
16
|
-
<from>Vienna</from>
|
17
|
-
<to>Prague</to>
|
18
|
-
<costs>871.0</costs>
|
19
|
-
</dataelements>
|
20
|
-
<endpoints>
|
21
|
-
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
22
|
-
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
23
|
-
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
24
|
-
</endpoints>
|
25
|
-
<dsl>call :a1, :bookAir, parameters: { :label => "Book Airline", :method => :post, :arguments => [⭐(:name => :from, :value => "data.from"), ⭐(:name => :to, :value => "data.to"), ⭐(:name => :persons, :value => "data.persons")] }, finalize: <<-END
|
26
|
-
data.airline = result.value('id')
|
27
|
-
data.costs += result.value('costs').to_f
|
28
|
-
status.update 1, 'Hotel'
|
29
|
-
END
|
30
|
-
parallel do
|
31
|
-
loop pre_test{data.persons > 0} do
|
32
|
-
parallel_branch data.persons do |p|
|
33
|
-
call :a2, :bookHotel, parameters: { :label => "Book Hotel", :method => :post, :arguments => [⭐(:name => :to, :value => "data.to")] }, finalize: <<-END
|
34
|
-
data.hotels << result.value('id')
|
35
|
-
data.costs += result.value('costs').to_f
|
36
|
-
END
|
37
|
-
end
|
38
|
-
manipulate :a3, <<-END
|
39
|
-
data.persons -= 1
|
40
|
-
END
|
41
|
-
end
|
42
|
-
end
|
43
|
-
choose :inclusive do
|
44
|
-
alternative test{data.costs > 700} do
|
45
|
-
call :a4, :approve, parameters: { :label => "Approve Hotel", :method => :post, :arguments => [⭐(:name => :costs, :value => "data.costs")] }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
</dsl>
|
49
|
-
<dslx>
|
50
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
51
|
-
<call id="a1" endpoint="bookAir">
|
52
|
-
<parameters>
|
53
|
-
<label>Book Airline</label>
|
54
|
-
<method>:post</method>
|
55
|
-
<arguments>
|
56
|
-
<from>data.from</from>
|
57
|
-
<to>data.to</to>
|
58
|
-
<persons>data.persons</persons>
|
59
|
-
</arguments>
|
60
|
-
</parameters>
|
61
|
-
<finalize output="result">data.airline = result.value('id')
|
62
|
-
data.costs += result.value('costs').to_f
|
63
|
-
status.update 1, 'Hotel'</finalize>
|
64
|
-
</call>
|
65
|
-
<parallel>
|
66
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
67
|
-
<parallel_branch pass="data.persons" local="p">
|
68
|
-
<call id="a2" endpoint="bookHotel">
|
69
|
-
<parameters>
|
70
|
-
<label>Book Hotel</label>
|
71
|
-
<method>:post</method>
|
72
|
-
<arguments>
|
73
|
-
<to>data.to</to>
|
74
|
-
</arguments>
|
75
|
-
</parameters>
|
76
|
-
<finalize output="result">data.hotels << result.value('id')
|
77
|
-
data.costs += result.value('costs').to_f</finalize>
|
78
|
-
</call>
|
79
|
-
</parallel_branch>
|
80
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
81
|
-
</loop>
|
82
|
-
</parallel>
|
83
|
-
<choose mode="inclusive">
|
84
|
-
<alternative condition="data.costs > 700">
|
85
|
-
<call id="a4" endpoint="approve">
|
86
|
-
<parameters>
|
87
|
-
<label>Approve Hotel</label>
|
88
|
-
<method>:post</method>
|
89
|
-
<arguments>
|
90
|
-
<costs>data.costs</costs>
|
91
|
-
</arguments>
|
92
|
-
</parameters>
|
93
|
-
</call>
|
94
|
-
</alternative>
|
95
|
-
</choose>
|
96
|
-
</description>
|
97
|
-
</dslx>
|
98
|
-
<status>
|
99
|
-
<id>1</id>
|
100
|
-
<message>Hotel</message>
|
101
|
-
</status>
|
102
|
-
<description>
|
103
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
104
|
-
<call id="a1" endpoint="bookAir">
|
105
|
-
<parameters>
|
106
|
-
<label>Book Airline</label>
|
107
|
-
<method>:post</method>
|
108
|
-
<arguments>
|
109
|
-
<from>data.from</from>
|
110
|
-
<to>data.to</to>
|
111
|
-
<persons>data.persons</persons>
|
112
|
-
</arguments>
|
113
|
-
</parameters>
|
114
|
-
<finalize output="result">data.airline = result.value('id')
|
115
|
-
data.costs += result.value('costs').to_f
|
116
|
-
status.update 1, 'Hotel'</finalize>
|
117
|
-
</call>
|
118
|
-
<parallel>
|
119
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
120
|
-
<parallel_branch pass="data.persons" local="p">
|
121
|
-
<call id="a2" endpoint="bookHotel">
|
122
|
-
<parameters>
|
123
|
-
<label>Book Hotel</label>
|
124
|
-
<method>:post</method>
|
125
|
-
<arguments>
|
126
|
-
<to>data.to</to>
|
127
|
-
</arguments>
|
128
|
-
</parameters>
|
129
|
-
<finalize output="result">data.hotels << result.value('id')
|
130
|
-
data.costs += result.value('costs').to_f</finalize>
|
131
|
-
</call>
|
132
|
-
</parallel_branch>
|
133
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
134
|
-
</loop>
|
135
|
-
</parallel>
|
136
|
-
<choose mode="inclusive">
|
137
|
-
<alternative condition="data.costs > 700">
|
138
|
-
<call id="a4" endpoint="approve">
|
139
|
-
<parameters>
|
140
|
-
<label>Approve Hotel</label>
|
141
|
-
<method>:post</method>
|
142
|
-
<arguments>
|
143
|
-
<costs>data.costs</costs>
|
144
|
-
</arguments>
|
145
|
-
</parameters>
|
146
|
-
</call>
|
147
|
-
</alternative>
|
148
|
-
</choose>
|
149
|
-
</description>
|
150
|
-
</description>
|
151
|
-
<transformation>
|
152
|
-
<description type="copy"/>
|
153
|
-
<dataelements type="rest"/>
|
154
|
-
<endpoints type="rest"/>
|
155
|
-
</transformation>
|
156
|
-
</properties>
|
@@ -1,156 +0,0 @@
|
|
1
|
-
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
-
<attributes>
|
3
|
-
<uuid>b5469607-e27a-4abd-b760-837384c1f35d</uuid>
|
4
|
-
<info>Plain Instance</info>
|
5
|
-
<modeltype>CPEE</modeltype>
|
6
|
-
<theme>default</theme>
|
7
|
-
</attributes>
|
8
|
-
<state>finished</state>
|
9
|
-
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
10
|
-
<positions/>
|
11
|
-
<dataelements>
|
12
|
-
<persons>0</persons>
|
13
|
-
<card>Visa_12345</card>
|
14
|
-
<airline>Aeroflot</airline>
|
15
|
-
<hotels>["Rathaus","Ibis","Ibis"]</hotels>
|
16
|
-
<from>Vienna</from>
|
17
|
-
<to>Prague</to>
|
18
|
-
<costs>765.0</costs>
|
19
|
-
</dataelements>
|
20
|
-
<endpoints>
|
21
|
-
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
22
|
-
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
23
|
-
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
24
|
-
</endpoints>
|
25
|
-
<dsl>call :a1, :bookAir, parameters: { :label => "Book Airline", :method => :post, :arguments => [⭐(:name => :from, :value => "data.from"), ⭐(:name => :to, :value => "data.to"), ⭐(:name => :persons, :value => "data.persons")] }, finalize: <<-END
|
26
|
-
data.airline = result.value('id')
|
27
|
-
data.costs += result.value('costs').to_f
|
28
|
-
status.update 1, 'Hotel'
|
29
|
-
END
|
30
|
-
parallel do
|
31
|
-
loop pre_test{data.persons > 0} do
|
32
|
-
parallel_branch data.persons do |p|
|
33
|
-
call :a2, :bookHotel, parameters: { :label => "Book Hotel", :method => :post, :arguments => [⭐(:name => :to, :value => "data.to")] }, finalize: <<-END
|
34
|
-
data.hotels << result.value('id')
|
35
|
-
data.costs += result.value('costs').to_f
|
36
|
-
END
|
37
|
-
end
|
38
|
-
manipulate :a3, <<-END
|
39
|
-
data.persons -= 1
|
40
|
-
END
|
41
|
-
end
|
42
|
-
end
|
43
|
-
choose :inclusive do
|
44
|
-
alternative test{data.costs > 700} do
|
45
|
-
call :a4, :approve, parameters: { :label => "Approve Hotel", :method => :post, :arguments => [⭐(:name => :costs, :value => "data.costs")] }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
</dsl>
|
49
|
-
<dslx>
|
50
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
51
|
-
<call id="a1" endpoint="bookAir">
|
52
|
-
<parameters>
|
53
|
-
<label>Book Airline</label>
|
54
|
-
<method>:post</method>
|
55
|
-
<arguments>
|
56
|
-
<from>data.from</from>
|
57
|
-
<to>data.to</to>
|
58
|
-
<persons>data.persons</persons>
|
59
|
-
</arguments>
|
60
|
-
</parameters>
|
61
|
-
<finalize output="result">data.airline = result.value('id')
|
62
|
-
data.costs += result.value('costs').to_f
|
63
|
-
status.update 1, 'Hotel'</finalize>
|
64
|
-
</call>
|
65
|
-
<parallel>
|
66
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
67
|
-
<parallel_branch pass="data.persons" local="p">
|
68
|
-
<call id="a2" endpoint="bookHotel">
|
69
|
-
<parameters>
|
70
|
-
<label>Book Hotel</label>
|
71
|
-
<method>:post</method>
|
72
|
-
<arguments>
|
73
|
-
<to>data.to</to>
|
74
|
-
</arguments>
|
75
|
-
</parameters>
|
76
|
-
<finalize output="result">data.hotels << result.value('id')
|
77
|
-
data.costs += result.value('costs').to_f</finalize>
|
78
|
-
</call>
|
79
|
-
</parallel_branch>
|
80
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
81
|
-
</loop>
|
82
|
-
</parallel>
|
83
|
-
<choose mode="inclusive">
|
84
|
-
<alternative condition="data.costs > 700">
|
85
|
-
<call id="a4" endpoint="approve">
|
86
|
-
<parameters>
|
87
|
-
<label>Approve Hotel</label>
|
88
|
-
<method>:post</method>
|
89
|
-
<arguments>
|
90
|
-
<costs>data.costs</costs>
|
91
|
-
</arguments>
|
92
|
-
</parameters>
|
93
|
-
</call>
|
94
|
-
</alternative>
|
95
|
-
</choose>
|
96
|
-
</description>
|
97
|
-
</dslx>
|
98
|
-
<status>
|
99
|
-
<id>1</id>
|
100
|
-
<message>Hotel</message>
|
101
|
-
</status>
|
102
|
-
<description>
|
103
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
104
|
-
<call id="a1" endpoint="bookAir">
|
105
|
-
<parameters>
|
106
|
-
<label>Book Airline</label>
|
107
|
-
<method>:post</method>
|
108
|
-
<arguments>
|
109
|
-
<from>data.from</from>
|
110
|
-
<to>data.to</to>
|
111
|
-
<persons>data.persons</persons>
|
112
|
-
</arguments>
|
113
|
-
</parameters>
|
114
|
-
<finalize output="result">data.airline = result.value('id')
|
115
|
-
data.costs += result.value('costs').to_f
|
116
|
-
status.update 1, 'Hotel'</finalize>
|
117
|
-
</call>
|
118
|
-
<parallel>
|
119
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
120
|
-
<parallel_branch pass="data.persons" local="p">
|
121
|
-
<call id="a2" endpoint="bookHotel">
|
122
|
-
<parameters>
|
123
|
-
<label>Book Hotel</label>
|
124
|
-
<method>:post</method>
|
125
|
-
<arguments>
|
126
|
-
<to>data.to</to>
|
127
|
-
</arguments>
|
128
|
-
</parameters>
|
129
|
-
<finalize output="result">data.hotels << result.value('id')
|
130
|
-
data.costs += result.value('costs').to_f</finalize>
|
131
|
-
</call>
|
132
|
-
</parallel_branch>
|
133
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
134
|
-
</loop>
|
135
|
-
</parallel>
|
136
|
-
<choose mode="inclusive">
|
137
|
-
<alternative condition="data.costs > 700">
|
138
|
-
<call id="a4" endpoint="approve">
|
139
|
-
<parameters>
|
140
|
-
<label>Approve Hotel</label>
|
141
|
-
<method>:post</method>
|
142
|
-
<arguments>
|
143
|
-
<costs>data.costs</costs>
|
144
|
-
</arguments>
|
145
|
-
</parameters>
|
146
|
-
</call>
|
147
|
-
</alternative>
|
148
|
-
</choose>
|
149
|
-
</description>
|
150
|
-
</description>
|
151
|
-
<transformation>
|
152
|
-
<description type="copy"/>
|
153
|
-
<dataelements type="rest"/>
|
154
|
-
<endpoints type="rest"/>
|
155
|
-
</transformation>
|
156
|
-
</properties>
|
@@ -1,156 +0,0 @@
|
|
1
|
-
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
-
<attributes>
|
3
|
-
<uuid>af103b85-97cb-4aeb-b1ed-00da3b5958ab</uuid>
|
4
|
-
<info>Plain Instance</info>
|
5
|
-
<modeltype>CPEE</modeltype>
|
6
|
-
<theme>default</theme>
|
7
|
-
</attributes>
|
8
|
-
<state>finished</state>
|
9
|
-
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
10
|
-
<positions/>
|
11
|
-
<dataelements>
|
12
|
-
<persons>0</persons>
|
13
|
-
<card>Visa_12345</card>
|
14
|
-
<airline>Lufthansa</airline>
|
15
|
-
<hotels>["Mariott","Mariott","Ibis"]</hotels>
|
16
|
-
<from>Vienna</from>
|
17
|
-
<to>Prague</to>
|
18
|
-
<costs>1021.0</costs>
|
19
|
-
</dataelements>
|
20
|
-
<endpoints>
|
21
|
-
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
22
|
-
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
23
|
-
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
24
|
-
</endpoints>
|
25
|
-
<dsl>call :a1, :bookAir, parameters: { :label => "Book Airline", :method => :post, :arguments => [⭐(:name => :from, :value => "data.from"), ⭐(:name => :to, :value => "data.to"), ⭐(:name => :persons, :value => "data.persons")] }, finalize: <<-END
|
26
|
-
data.airline = result.value('id')
|
27
|
-
data.costs += result.value('costs').to_f
|
28
|
-
status.update 1, 'Hotel'
|
29
|
-
END
|
30
|
-
parallel do
|
31
|
-
loop pre_test{data.persons > 0} do
|
32
|
-
parallel_branch data.persons do |p|
|
33
|
-
call :a2, :bookHotel, parameters: { :label => "Book Hotel", :method => :post, :arguments => [⭐(:name => :to, :value => "data.to")] }, finalize: <<-END
|
34
|
-
data.hotels << result.value('id')
|
35
|
-
data.costs += result.value('costs').to_f
|
36
|
-
END
|
37
|
-
end
|
38
|
-
manipulate :a3, <<-END
|
39
|
-
data.persons -= 1
|
40
|
-
END
|
41
|
-
end
|
42
|
-
end
|
43
|
-
choose :inclusive do
|
44
|
-
alternative test{data.costs > 700} do
|
45
|
-
call :a4, :approve, parameters: { :label => "Approve Hotel", :method => :post, :arguments => [⭐(:name => :costs, :value => "data.costs")] }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
</dsl>
|
49
|
-
<dslx>
|
50
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
51
|
-
<call id="a1" endpoint="bookAir">
|
52
|
-
<parameters>
|
53
|
-
<label>Book Airline</label>
|
54
|
-
<method>:post</method>
|
55
|
-
<arguments>
|
56
|
-
<from>data.from</from>
|
57
|
-
<to>data.to</to>
|
58
|
-
<persons>data.persons</persons>
|
59
|
-
</arguments>
|
60
|
-
</parameters>
|
61
|
-
<finalize output="result">data.airline = result.value('id')
|
62
|
-
data.costs += result.value('costs').to_f
|
63
|
-
status.update 1, 'Hotel'</finalize>
|
64
|
-
</call>
|
65
|
-
<parallel>
|
66
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
67
|
-
<parallel_branch pass="data.persons" local="p">
|
68
|
-
<call id="a2" endpoint="bookHotel">
|
69
|
-
<parameters>
|
70
|
-
<label>Book Hotel</label>
|
71
|
-
<method>:post</method>
|
72
|
-
<arguments>
|
73
|
-
<to>data.to</to>
|
74
|
-
</arguments>
|
75
|
-
</parameters>
|
76
|
-
<finalize output="result">data.hotels << result.value('id')
|
77
|
-
data.costs += result.value('costs').to_f</finalize>
|
78
|
-
</call>
|
79
|
-
</parallel_branch>
|
80
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
81
|
-
</loop>
|
82
|
-
</parallel>
|
83
|
-
<choose mode="inclusive">
|
84
|
-
<alternative condition="data.costs > 700">
|
85
|
-
<call id="a4" endpoint="approve">
|
86
|
-
<parameters>
|
87
|
-
<label>Approve Hotel</label>
|
88
|
-
<method>:post</method>
|
89
|
-
<arguments>
|
90
|
-
<costs>data.costs</costs>
|
91
|
-
</arguments>
|
92
|
-
</parameters>
|
93
|
-
</call>
|
94
|
-
</alternative>
|
95
|
-
</choose>
|
96
|
-
</description>
|
97
|
-
</dslx>
|
98
|
-
<status>
|
99
|
-
<id>1</id>
|
100
|
-
<message>Hotel</message>
|
101
|
-
</status>
|
102
|
-
<description>
|
103
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
104
|
-
<call id="a1" endpoint="bookAir">
|
105
|
-
<parameters>
|
106
|
-
<label>Book Airline</label>
|
107
|
-
<method>:post</method>
|
108
|
-
<arguments>
|
109
|
-
<from>data.from</from>
|
110
|
-
<to>data.to</to>
|
111
|
-
<persons>data.persons</persons>
|
112
|
-
</arguments>
|
113
|
-
</parameters>
|
114
|
-
<finalize output="result">data.airline = result.value('id')
|
115
|
-
data.costs += result.value('costs').to_f
|
116
|
-
status.update 1, 'Hotel'</finalize>
|
117
|
-
</call>
|
118
|
-
<parallel>
|
119
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
120
|
-
<parallel_branch pass="data.persons" local="p">
|
121
|
-
<call id="a2" endpoint="bookHotel">
|
122
|
-
<parameters>
|
123
|
-
<label>Book Hotel</label>
|
124
|
-
<method>:post</method>
|
125
|
-
<arguments>
|
126
|
-
<to>data.to</to>
|
127
|
-
</arguments>
|
128
|
-
</parameters>
|
129
|
-
<finalize output="result">data.hotels << result.value('id')
|
130
|
-
data.costs += result.value('costs').to_f</finalize>
|
131
|
-
</call>
|
132
|
-
</parallel_branch>
|
133
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
134
|
-
</loop>
|
135
|
-
</parallel>
|
136
|
-
<choose mode="inclusive">
|
137
|
-
<alternative condition="data.costs > 700">
|
138
|
-
<call id="a4" endpoint="approve">
|
139
|
-
<parameters>
|
140
|
-
<label>Approve Hotel</label>
|
141
|
-
<method>:post</method>
|
142
|
-
<arguments>
|
143
|
-
<costs>data.costs</costs>
|
144
|
-
</arguments>
|
145
|
-
</parameters>
|
146
|
-
</call>
|
147
|
-
</alternative>
|
148
|
-
</choose>
|
149
|
-
</description>
|
150
|
-
</description>
|
151
|
-
<transformation>
|
152
|
-
<description type="copy"/>
|
153
|
-
<dataelements type="rest"/>
|
154
|
-
<endpoints type="rest"/>
|
155
|
-
</transformation>
|
156
|
-
</properties>
|