cpee 1.4.10 → 1.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/js/instance.js +21 -1
- data/cockpit/testsets/Async.xml +42 -0
- data/cockpit/testsets/testsets.xml +1 -0
- data/cockpit/themes/compact/theme.js +4 -0
- data/cockpit/themes/default/theme.js +4 -0
- data/cpee.gemspec +1 -1
- data/lib/cpee.xml +1 -1
- data/lib/cpee/implementation.rb +2 -0
- data/log/logs/1/test +1 -0
- data/server/instances/1/properties.xml +31 -158
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/consumer-secret +1 -0
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/producer-secret +1 -0
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/subscription.xml +23 -0
- 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 +187 -0
- data/server/instances/11/properties.xml +191 -0
- data/server/instances/12/properties.xml +191 -0
- data/server/instances/13/properties.xml +204 -0
- data/server/instances/14/properties.xml +31 -0
- data/server/instances/15/properties.xml +30 -0
- data/server/instances/16/properties.xml +29 -0
- data/server/instances/17/properties.xml +29 -0
- data/server/instances/18/properties.xml +31 -0
- data/server/instances/19/properties.xml +31 -0
- data/server/instances/2/properties.xml +12 -137
- data/server/instances/20/properties.xml +191 -0
- data/server/instances/21/properties.xml +156 -0
- data/server/instances/22/properties.xml +118 -0
- data/server/instances/23/properties.xml +118 -0
- data/server/instances/24/properties.xml +156 -0
- data/server/instances/25/properties.xml +156 -0
- data/server/instances/26/properties.xml +156 -0
- data/server/instances/27/properties.xml +140 -0
- data/server/instances/28/properties.xml +156 -0
- data/server/instances/29/properties.xml +156 -0
- data/server/instances/3/properties.xml +80 -116
- data/server/instances/30/properties.xml +354 -0
- data/server/instances/31/properties.xml +354 -0
- 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 +628 -0
- data/server/instances/33/properties.xml +156 -0
- data/server/instances/4/properties.xml +114 -0
- data/server/instances/5/properties.xml +114 -0
- data/server/instances/6/properties.xml +206 -0
- 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/663/properties.xml +31 -0
- 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/671/properties.xml +158 -0
- data/server/instances/672/properties.xml +199 -0
- data/server/instances/673/properties.xml +52 -0
- data/server/instances/674/properties.xml +75 -0
- data/server/instances/675/notifications/10fa09a02f1a981a931ebe75d8cabe48/consumer-secret +1 -0
- data/server/instances/675/notifications/10fa09a02f1a981a931ebe75d8cabe48/producer-secret +1 -0
- data/server/instances/675/notifications/10fa09a02f1a981a931ebe75d8cabe48/subscription.xml +6 -0
- data/server/instances/675/properties.xml +74 -0
- data/server/instances/676/properties.xml +76 -0
- data/server/instances/677/properties.xml +76 -0
- data/server/instances/678/properties.xml +74 -0
- data/server/instances/679/notifications/1b946ec6292b2dacfbad69f6f5e2b085/consumer-secret +1 -0
- data/server/instances/679/notifications/1b946ec6292b2dacfbad69f6f5e2b085/producer-secret +1 -0
- data/server/instances/679/notifications/1b946ec6292b2dacfbad69f6f5e2b085/subscription.xml +38 -0
- data/server/instances/679/properties.xml +76 -0
- data/server/instances/680/properties.xml +76 -0
- data/server/instances/7/properties.xml +156 -0
- data/server/instances/8/properties.xml +118 -0
- data/server/instances/9/properties.xml +120 -0
- data/server/server.pid +1 -1
- data/server/server.rb +0 -1
- metadata +84 -8
- data/cockpit/config.json +0 -6
- data/cockpit/testsets/CPEE.xml +0 -8
- data/cockpit/testsets/Signavio.xml +0 -8
- data/server/resources/base.xml +0 -78
- data/server/resources/test.rb +0 -19
- data/server/resources/test.xml +0 -33
@@ -0,0 +1,118 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<uuid>9b7b1c9c-f895-4780-aae0-43e15654f400</uuid>
|
4
|
+
<info>Linear</info>
|
5
|
+
<modeltype>CPEE</modeltype>
|
6
|
+
<theme>default</theme>
|
7
|
+
</attributes>
|
8
|
+
<state>finished</state>
|
9
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
10
|
+
<positions/>
|
11
|
+
<dataelements>
|
12
|
+
<x>a2,a3,</x>
|
13
|
+
</dataelements>
|
14
|
+
<endpoints>
|
15
|
+
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
16
|
+
</endpoints>
|
17
|
+
<dsl>call :a1, :timeout, parameters: { :label => "Step 1", :method => :post, :arguments => [⭐(:name => :timeout, :value => 2)] }, finalize: <<-END
|
18
|
+
data.x += "a1,"
|
19
|
+
END
|
20
|
+
call :a2, :timeout, parameters: { :label => "Step 2", :method => :post, :arguments => [⭐(:name => :timeout, :value => 4)] }, finalize: <<-END
|
21
|
+
data.x += "a2,"
|
22
|
+
END
|
23
|
+
call :a3, :timeout, parameters: { :label => "Step 3", :method => :post, :arguments => [⭐(:name => :timeout, :value => 4)] }, finalize: <<-END
|
24
|
+
data.x += "a3,"
|
25
|
+
END
|
26
|
+
</dsl>
|
27
|
+
<dslx>
|
28
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
29
|
+
<!--{{{-->
|
30
|
+
<call id="a1" endpoint="timeout">
|
31
|
+
<parameters>
|
32
|
+
<!--{{{-->
|
33
|
+
<label>Step 1</label>
|
34
|
+
<method>:post</method>
|
35
|
+
<arguments>
|
36
|
+
<timeout>2</timeout>
|
37
|
+
</arguments>
|
38
|
+
</parameters>
|
39
|
+
<!--}}}-->
|
40
|
+
<finalize output="result">data.x += "a1,"</finalize>
|
41
|
+
</call>
|
42
|
+
<call id="a2" endpoint="timeout">
|
43
|
+
<parameters>
|
44
|
+
<!--{{{-->
|
45
|
+
<label>Step 2</label>
|
46
|
+
<method>:post</method>
|
47
|
+
<arguments>
|
48
|
+
<timeout>4</timeout>
|
49
|
+
</arguments>
|
50
|
+
</parameters>
|
51
|
+
<!--}}}-->
|
52
|
+
<finalize output="result">data.x += "a2,"</finalize>
|
53
|
+
</call>
|
54
|
+
<call id="a3" endpoint="timeout">
|
55
|
+
<parameters>
|
56
|
+
<!--{{{-->
|
57
|
+
<label>Step 3</label>
|
58
|
+
<method>:post</method>
|
59
|
+
<arguments>
|
60
|
+
<timeout>4</timeout>
|
61
|
+
</arguments>
|
62
|
+
</parameters>
|
63
|
+
<!--}}}-->
|
64
|
+
<finalize output="result">data.x += "a3,"</finalize>
|
65
|
+
</call>
|
66
|
+
</description>
|
67
|
+
</dslx>
|
68
|
+
<status>
|
69
|
+
<id>0</id>
|
70
|
+
<message>undefined</message>
|
71
|
+
</status>
|
72
|
+
<description>
|
73
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
74
|
+
<!--{{{-->
|
75
|
+
<call id="a1" endpoint="timeout">
|
76
|
+
<parameters>
|
77
|
+
<!--{{{-->
|
78
|
+
<label>Step 1</label>
|
79
|
+
<method>:post</method>
|
80
|
+
<arguments>
|
81
|
+
<timeout>2</timeout>
|
82
|
+
</arguments>
|
83
|
+
</parameters>
|
84
|
+
<!--}}}-->
|
85
|
+
<finalize output="result">data.x += "a1,"</finalize>
|
86
|
+
</call>
|
87
|
+
<call id="a2" endpoint="timeout">
|
88
|
+
<parameters>
|
89
|
+
<!--{{{-->
|
90
|
+
<label>Step 2</label>
|
91
|
+
<method>:post</method>
|
92
|
+
<arguments>
|
93
|
+
<timeout>4</timeout>
|
94
|
+
</arguments>
|
95
|
+
</parameters>
|
96
|
+
<!--}}}-->
|
97
|
+
<finalize output="result">data.x += "a2,"</finalize>
|
98
|
+
</call>
|
99
|
+
<call id="a3" endpoint="timeout">
|
100
|
+
<parameters>
|
101
|
+
<!--{{{-->
|
102
|
+
<label>Step 3</label>
|
103
|
+
<method>:post</method>
|
104
|
+
<arguments>
|
105
|
+
<timeout>4</timeout>
|
106
|
+
</arguments>
|
107
|
+
</parameters>
|
108
|
+
<!--}}}-->
|
109
|
+
<finalize output="result">data.x += "a3,"</finalize>
|
110
|
+
</call>
|
111
|
+
</description>
|
112
|
+
</description>
|
113
|
+
<transformation>
|
114
|
+
<description type="copy"/>
|
115
|
+
<dataelements type="rest"/>
|
116
|
+
<endpoints type="rest"/>
|
117
|
+
</transformation>
|
118
|
+
</properties>
|
@@ -0,0 +1,156 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<uuid>4d5f07d8-3931-4302-9065-6cb2385ab9cd</uuid>
|
4
|
+
<info>Enter info here</info>
|
5
|
+
<modeltype>CPEE</modeltype>
|
6
|
+
<theme>default</theme>
|
7
|
+
</attributes>
|
8
|
+
<state>stopped</state>
|
9
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
10
|
+
<positions/>
|
11
|
+
<dataelements>
|
12
|
+
<persons>3</persons>
|
13
|
+
<card>Visa_12345</card>
|
14
|
+
<airline>null</airline>
|
15
|
+
<hotels>[]</hotels>
|
16
|
+
<from>Vienna</from>
|
17
|
+
<to>Prague</to>
|
18
|
+
<costs>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 "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
|
+
<method>:post</method>
|
54
|
+
<label>Book Airline</label>
|
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
|
+
<method>:post</method>
|
71
|
+
<label>Book Hotel</label>
|
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
|
+
<method>:post</method>
|
88
|
+
<label>Approve Hotel</label>
|
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>0</id>
|
100
|
+
<message>undefined</message>
|
101
|
+
</status>
|
102
|
+
<description>
|
103
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
104
|
+
<call id="a1" endpoint="bookAir">
|
105
|
+
<parameters>
|
106
|
+
<method>:post</method>
|
107
|
+
<label>Book Airline</label>
|
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
|
+
<method>:post</method>
|
124
|
+
<label>Book Hotel</label>
|
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
|
+
<method>:post</method>
|
141
|
+
<label>Approve Hotel</label>
|
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>
|
@@ -0,0 +1,156 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<uuid>f8179149-f621-4dd3-be43-8ba3f34acc4e</uuid>
|
4
|
+
<info>Enter info here</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>["Rathaus","Rathaus","Ibis"]</hotels>
|
16
|
+
<from>Vienna</from>
|
17
|
+
<to>Prague</to>
|
18
|
+
<costs>1199.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 "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>0</id>
|
100
|
+
<message>undefined</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>
|
@@ -0,0 +1,156 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<uuid>2bfe806c-1860-4345-9331-01185a19bc2d</uuid>
|
4
|
+
<info>Enter info here</info>
|
5
|
+
<modeltype>CPEE</modeltype>
|
6
|
+
<theme>labels</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>["Mariott","Rathaus","Mariott"]</hotels>
|
16
|
+
<from>Vienna</from>
|
17
|
+
<to>Prague</to>
|
18
|
+
<costs>830.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 "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>0</id>
|
100
|
+
<message>undefined</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>
|