cpee 1.4.5 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/cpee.gemspec +1 -1
- data/lib/cpee/controller.rb +11 -5
- data/server/instances/74/properties.xml +156 -0
- data/server/instances/75/properties.xml +158 -0
- data/server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/consumer-secret +1 -0
- data/server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/producer-secret +1 -0
- data/server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/subscription.xml +38 -0
- data/server/instances/76/properties.xml +156 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8951441080b5f80bddb04e068c31ef1e0d9be56cc5ed075031be42704d3b05bd
|
|
4
|
+
data.tar.gz: 8b40820c7c5b5590b8a0d5602c8764d3a87c99eefb80fc5d5b1ab9fc6c8e7896
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b423e36aeeab7ad83bd312879296125eeb6761cedc3807fa78f3bc42a3c78f1f6605f7cb3ee0ba616e42d7af0fd5b34d1313bb114f13fb602189d2ee21625e7c
|
|
7
|
+
data.tar.gz: 10ad5f072da46f65b584b2e5d25f04b045dd597b9dbfe27065bec13df184c6f2cd99998cbe480859b3ea8f930be7fc3186206ea83ada4544a92f49002e2c9cc5
|
data/cpee.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "cpee"
|
|
3
|
-
s.version = "1.4.
|
|
3
|
+
s.version = "1.4.7"
|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
|
5
5
|
s.license = "LGPL-3.0"
|
|
6
6
|
s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
|
data/lib/cpee/controller.rb
CHANGED
|
@@ -81,10 +81,6 @@ module CPEE
|
|
|
81
81
|
@directory + '/notifications/',
|
|
82
82
|
opts[:notifications_init]
|
|
83
83
|
)
|
|
84
|
-
|
|
85
|
-
@notifications.subscriptions.keys.each do |key|
|
|
86
|
-
self.unserialize_notifications!(:cre,key)
|
|
87
|
-
end
|
|
88
84
|
unless ['stopped','ready','finished'].include?(@properties.data.find("string(/p:properties/p:state)"))
|
|
89
85
|
@properties.modify do |doc|
|
|
90
86
|
doc.find("/p:properties/p:state").first.text = 'stopped'
|
|
@@ -95,6 +91,11 @@ module CPEE
|
|
|
95
91
|
@instance = nil
|
|
96
92
|
else
|
|
97
93
|
@instance = EmptyWorkflow.new(self)
|
|
94
|
+
|
|
95
|
+
@notifications.subscriptions.keys.each do |key|
|
|
96
|
+
self.unserialize_notifications!(:cre,key)
|
|
97
|
+
end
|
|
98
|
+
|
|
98
99
|
unserialize_handlerwrapper!
|
|
99
100
|
unserialize_dataelements!
|
|
100
101
|
unserialize_endpoints!
|
|
@@ -188,7 +189,12 @@ module CPEE
|
|
|
188
189
|
end
|
|
189
190
|
|
|
190
191
|
def finalize_if_finished
|
|
191
|
-
|
|
192
|
+
if @instance.state == :finished
|
|
193
|
+
@instance = nil
|
|
194
|
+
@notifications.subscriptions.keys.each do |key|
|
|
195
|
+
unserialize_notifications!(:del,key)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
192
198
|
end
|
|
193
199
|
|
|
194
200
|
def serialize_dataelements! #{{{
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
|
2
|
+
<attributes>
|
|
3
|
+
<uuid>d2ccaf91-7c26-459d-accb-396ca4eb7727</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>["Mariott","Rathaus","Rathaus"]</hotels>
|
|
16
|
+
<from>Vienna</from>
|
|
17
|
+
<to>Prague</to>
|
|
18
|
+
<costs>999.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>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
|
2
|
+
<attributes>
|
|
3
|
+
<uuid>edec7e94-0561-4e1f-9066-da0fa2723a7b</uuid>
|
|
4
|
+
<info>Plain Instance</info>
|
|
5
|
+
<modeltype>CPEE</modeltype>
|
|
6
|
+
<theme>default</theme>
|
|
7
|
+
</attributes>
|
|
8
|
+
<state>stopped</state>
|
|
9
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
|
10
|
+
<positions>
|
|
11
|
+
<a4>at</a4>
|
|
12
|
+
</positions>
|
|
13
|
+
<dataelements>
|
|
14
|
+
<persons>0</persons>
|
|
15
|
+
<card>Visa_12345</card>
|
|
16
|
+
<airline>American Airlines</airline>
|
|
17
|
+
<hotels>["Ibis","Rathaus","Ibis"]</hotels>
|
|
18
|
+
<from>Vienna</from>
|
|
19
|
+
<to>Prague</to>
|
|
20
|
+
<costs>780.0</costs>
|
|
21
|
+
</dataelements>
|
|
22
|
+
<endpoints>
|
|
23
|
+
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
|
24
|
+
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
|
25
|
+
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
|
26
|
+
</endpoints>
|
|
27
|
+
<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
|
|
28
|
+
data.airline = result.value('id')
|
|
29
|
+
data.costs += result.value('costs').to_f
|
|
30
|
+
status.update 1, 'Hotel'
|
|
31
|
+
END
|
|
32
|
+
parallel do
|
|
33
|
+
loop pre_test{data.persons > 0} do
|
|
34
|
+
parallel_branch data.persons do |p|
|
|
35
|
+
call :a2, :bookHotel, parameters: { :label => "Book Hotel", :method => :post, :arguments => [⭐(:name => :to, :value => "data.to")] }, finalize: <<-END
|
|
36
|
+
data.hotels << result.value('id')
|
|
37
|
+
data.costs += result.value('costs').to_f
|
|
38
|
+
END
|
|
39
|
+
end
|
|
40
|
+
manipulate :a3, <<-END
|
|
41
|
+
data.persons -= 1
|
|
42
|
+
END
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
choose :inclusive do
|
|
46
|
+
alternative test{data.costs > 700} do
|
|
47
|
+
call :a4, :approve, parameters: { :label => "Approve Hotel", :method => :post, :arguments => [⭐(:name => :costs, :value => "data.costs")] }
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
</dsl>
|
|
51
|
+
<dslx>
|
|
52
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
53
|
+
<call id="a1" endpoint="bookAir">
|
|
54
|
+
<parameters>
|
|
55
|
+
<label>Book Airline</label>
|
|
56
|
+
<method>:post</method>
|
|
57
|
+
<arguments>
|
|
58
|
+
<from>data.from</from>
|
|
59
|
+
<to>data.to</to>
|
|
60
|
+
<persons>data.persons</persons>
|
|
61
|
+
</arguments>
|
|
62
|
+
</parameters>
|
|
63
|
+
<finalize output="result">data.airline = result.value('id')
|
|
64
|
+
data.costs += result.value('costs').to_f
|
|
65
|
+
status.update 1, 'Hotel'</finalize>
|
|
66
|
+
</call>
|
|
67
|
+
<parallel>
|
|
68
|
+
<loop mode="pre_test" condition="data.persons > 0">
|
|
69
|
+
<parallel_branch pass="data.persons" local="p">
|
|
70
|
+
<call id="a2" endpoint="bookHotel">
|
|
71
|
+
<parameters>
|
|
72
|
+
<label>Book Hotel</label>
|
|
73
|
+
<method>:post</method>
|
|
74
|
+
<arguments>
|
|
75
|
+
<to>data.to</to>
|
|
76
|
+
</arguments>
|
|
77
|
+
</parameters>
|
|
78
|
+
<finalize output="result">data.hotels << result.value('id')
|
|
79
|
+
data.costs += result.value('costs').to_f</finalize>
|
|
80
|
+
</call>
|
|
81
|
+
</parallel_branch>
|
|
82
|
+
<manipulate id="a3">data.persons -= 1</manipulate>
|
|
83
|
+
</loop>
|
|
84
|
+
</parallel>
|
|
85
|
+
<choose mode="inclusive">
|
|
86
|
+
<alternative condition="data.costs > 700">
|
|
87
|
+
<call id="a4" endpoint="approve">
|
|
88
|
+
<parameters>
|
|
89
|
+
<label>Approve Hotel</label>
|
|
90
|
+
<method>:post</method>
|
|
91
|
+
<arguments>
|
|
92
|
+
<costs>data.costs</costs>
|
|
93
|
+
</arguments>
|
|
94
|
+
</parameters>
|
|
95
|
+
</call>
|
|
96
|
+
</alternative>
|
|
97
|
+
</choose>
|
|
98
|
+
</description>
|
|
99
|
+
</dslx>
|
|
100
|
+
<status>
|
|
101
|
+
<id>1</id>
|
|
102
|
+
<message>Hotel</message>
|
|
103
|
+
</status>
|
|
104
|
+
<description>
|
|
105
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
106
|
+
<call id="a1" endpoint="bookAir">
|
|
107
|
+
<parameters>
|
|
108
|
+
<label>Book Airline</label>
|
|
109
|
+
<method>:post</method>
|
|
110
|
+
<arguments>
|
|
111
|
+
<from>data.from</from>
|
|
112
|
+
<to>data.to</to>
|
|
113
|
+
<persons>data.persons</persons>
|
|
114
|
+
</arguments>
|
|
115
|
+
</parameters>
|
|
116
|
+
<finalize output="result">data.airline = result.value('id')
|
|
117
|
+
data.costs += result.value('costs').to_f
|
|
118
|
+
status.update 1, 'Hotel'</finalize>
|
|
119
|
+
</call>
|
|
120
|
+
<parallel>
|
|
121
|
+
<loop mode="pre_test" condition="data.persons > 0">
|
|
122
|
+
<parallel_branch pass="data.persons" local="p">
|
|
123
|
+
<call id="a2" endpoint="bookHotel">
|
|
124
|
+
<parameters>
|
|
125
|
+
<label>Book Hotel</label>
|
|
126
|
+
<method>:post</method>
|
|
127
|
+
<arguments>
|
|
128
|
+
<to>data.to</to>
|
|
129
|
+
</arguments>
|
|
130
|
+
</parameters>
|
|
131
|
+
<finalize output="result">data.hotels << result.value('id')
|
|
132
|
+
data.costs += result.value('costs').to_f</finalize>
|
|
133
|
+
</call>
|
|
134
|
+
</parallel_branch>
|
|
135
|
+
<manipulate id="a3">data.persons -= 1</manipulate>
|
|
136
|
+
</loop>
|
|
137
|
+
</parallel>
|
|
138
|
+
<choose mode="inclusive">
|
|
139
|
+
<alternative condition="data.costs > 700">
|
|
140
|
+
<call id="a4" endpoint="approve">
|
|
141
|
+
<parameters>
|
|
142
|
+
<label>Approve Hotel</label>
|
|
143
|
+
<method>:post</method>
|
|
144
|
+
<arguments>
|
|
145
|
+
<costs>data.costs</costs>
|
|
146
|
+
</arguments>
|
|
147
|
+
</parameters>
|
|
148
|
+
</call>
|
|
149
|
+
</alternative>
|
|
150
|
+
</choose>
|
|
151
|
+
</description>
|
|
152
|
+
</description>
|
|
153
|
+
<transformation>
|
|
154
|
+
<description type="copy"/>
|
|
155
|
+
<dataelements type="rest"/>
|
|
156
|
+
<endpoints type="rest"/>
|
|
157
|
+
</transformation>
|
|
158
|
+
</properties>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c75067ce4044c8ba4bcfe9187cf4b992
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
61ca976322a6c8c79640cda7623fe013
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
|
2
|
+
<topic id="activity">
|
|
3
|
+
<event>calling</event>
|
|
4
|
+
<event>status</event>
|
|
5
|
+
<event>manipulating</event>
|
|
6
|
+
<event>failed</event>
|
|
7
|
+
<event>done</event>
|
|
8
|
+
</topic>
|
|
9
|
+
<topic id="position">
|
|
10
|
+
<event>change</event>
|
|
11
|
+
</topic>
|
|
12
|
+
<topic id="description">
|
|
13
|
+
<event>change</event>
|
|
14
|
+
<event>error</event>
|
|
15
|
+
</topic>
|
|
16
|
+
<topic id="state">
|
|
17
|
+
<event>change</event>
|
|
18
|
+
</topic>
|
|
19
|
+
<topic id="dataelements">
|
|
20
|
+
<event>change</event>
|
|
21
|
+
</topic>
|
|
22
|
+
<topic id="endpoints">
|
|
23
|
+
<event>change</event>
|
|
24
|
+
</topic>
|
|
25
|
+
<topic id="attributes">
|
|
26
|
+
<event>change</event>
|
|
27
|
+
</topic>
|
|
28
|
+
<topic id="transformation">
|
|
29
|
+
<event>change</event>
|
|
30
|
+
</topic>
|
|
31
|
+
<topic id="handlerwrapper">
|
|
32
|
+
<event>error</event>
|
|
33
|
+
<event>change</event>
|
|
34
|
+
</topic>
|
|
35
|
+
<topic id="handlers">
|
|
36
|
+
<event>change</event>
|
|
37
|
+
</topic>
|
|
38
|
+
</subscription>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
|
2
|
+
<attributes>
|
|
3
|
+
<uuid>5dfbf7ff-320a-4944-b897-0ea677207a7c</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>American Airlines</airline>
|
|
15
|
+
<hotels>["Mariott","Rathaus","Mariott"]</hotels>
|
|
16
|
+
<from>Vienna</from>
|
|
17
|
+
<to>Prague</to>
|
|
18
|
+
<costs>699.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>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cpee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juergen eTM Mangler
|
|
@@ -355,6 +355,12 @@ files:
|
|
|
355
355
|
- server/instances/71/properties.xml
|
|
356
356
|
- server/instances/72/properties.xml
|
|
357
357
|
- server/instances/73/properties.xml
|
|
358
|
+
- server/instances/74/properties.xml
|
|
359
|
+
- server/instances/75/properties.xml
|
|
360
|
+
- server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/consumer-secret
|
|
361
|
+
- server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/producer-secret
|
|
362
|
+
- server/instances/76/notifications/a59df784fab648f5327915fc6cf012ab/subscription.xml
|
|
363
|
+
- server/instances/76/properties.xml
|
|
358
364
|
- server/instances/8/properties.xml
|
|
359
365
|
- server/instances/9/properties.xml
|
|
360
366
|
- server/resources/base.xml
|