cpee 1.3.181 → 1.3.183
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/css/ui.css +19 -60
- data/cockpit/css/wfadaptor.css +11 -0
- data/cockpit/index.html +45 -71
- data/cockpit/js/details.js +50 -139
- data/cockpit/js/instance.js +133 -185
- data/cockpit/js/parameters.js +57 -55
- data/cockpit/js/ui.js +4 -29
- data/cockpit/js/wfadaptor.js +190 -108
- data/cockpit/rngs/attributes.rng +8 -0
- data/cockpit/rngs/dataelements.rng +8 -0
- data/cockpit/rngs/endpoints.rng +8 -0
- data/cockpit/testsets/Concurrent.xml +6 -6
- data/cockpit/testsets/Coopis Testset.xml +12 -12
- data/cockpit/testsets/ICSOC Testset.xml +27 -27
- data/cockpit/testsets/Infinity.xml +4 -4
- data/cockpit/testsets/Linear.xml +10 -10
- data/cockpit/testsets/Mangler 1.xml +20 -20
- data/cockpit/testsets/Mangler 2.xml +18 -18
- data/cockpit/testsets/Promise.xml +258 -0
- data/cockpit/testsets/SOPROMO Test Sonification.xml +11 -11
- data/cockpit/testsets/Syncing P34 1.xml +12 -12
- data/cockpit/testsets/Syncing P34 2.xml +12 -12
- data/cockpit/testsets/Syncing P34 3.xml +12 -12
- data/cockpit/testsets/Syncing P34.xml +12 -12
- data/cockpit/testsets/TEST - Bad Loop.xml +39 -39
- data/cockpit/testsets/Update.xml +1 -1
- data/cockpit/testsets/Worklist Parallel.xml +8 -8
- data/cockpit/testsets/Worklist Test CPEE.xml +2 -2
- data/cockpit/testsets/Worklist Test.xml +2 -2
- data/cockpit/testsets/testsets.xml +2 -0
- data/cockpit/themes/adventure/rngs/alternative.rng +5 -0
- data/cockpit/themes/adventure/rngs/call.rng +29 -0
- data/cockpit/{rngtest2.rng → themes/adventure/rngs/callmanipulate.rng} +9 -9
- data/cockpit/themes/adventure/rngs/choose.rng +8 -0
- data/cockpit/themes/adventure/rngs/critical.rng +5 -0
- data/cockpit/themes/adventure/rngs/escape.rng +1 -0
- data/cockpit/themes/adventure/rngs/finalize.rng +6 -0
- data/cockpit/themes/adventure/rngs/group.rng +3 -0
- data/cockpit/themes/adventure/rngs/loop.rng +11 -0
- data/cockpit/themes/adventure/rngs/manipulate.rng +6 -0
- data/cockpit/themes/adventure/rngs/otherwise.rng +1 -0
- data/cockpit/themes/adventure/rngs/parallel.rng +5 -0
- data/cockpit/themes/adventure/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/adventure/rngs/update.rng +6 -0
- data/cockpit/themes/adventure/symbols/alternative.svg +4 -0
- data/cockpit/themes/adventure/symbols/call.svg +4 -0
- data/cockpit/themes/adventure/symbols/callmanipulate.svg +6 -0
- data/cockpit/themes/adventure/symbols/choose.svg +5 -0
- data/cockpit/themes/adventure/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/adventure/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/adventure/symbols/critical.svg +4 -0
- data/cockpit/themes/adventure/symbols/escape.svg +5 -0
- data/cockpit/themes/adventure/symbols/loop.svg +5 -0
- data/cockpit/themes/adventure/symbols/manipulate.svg +4 -0
- data/cockpit/themes/adventure/symbols/otherwise.svg +4 -0
- data/cockpit/themes/adventure/symbols/parallel.svg +5 -0
- data/cockpit/themes/adventure/symbols/parallel_branch.svg +4 -0
- data/cockpit/themes/adventure/symbols/scripts.svg +4 -0
- data/cockpit/themes/adventure/symbols/start.svg +3 -0
- data/cockpit/themes/adventure/theme.js +729 -0
- data/cockpit/themes/default/rngs/alternative.rng +5 -0
- data/cockpit/themes/default/rngs/call.rng +29 -0
- data/cockpit/themes/default/rngs/callmanipulate.rng +41 -0
- data/cockpit/themes/default/rngs/choose.rng +8 -0
- data/cockpit/themes/default/rngs/critical.rng +5 -0
- data/cockpit/themes/default/rngs/escape.rng +1 -0
- data/cockpit/themes/default/rngs/finalize.rng +6 -0
- data/cockpit/themes/default/rngs/group.rng +3 -0
- data/cockpit/themes/default/rngs/loop.rng +11 -0
- data/cockpit/themes/default/rngs/manipulate.rng +6 -0
- data/cockpit/themes/default/rngs/otherwise.rng +1 -0
- data/cockpit/themes/default/rngs/parallel.rng +5 -0
- data/cockpit/themes/default/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/default/rngs/update.rng +6 -0
- data/cockpit/themes/default/symbols/alternative.svg +4 -0
- data/cockpit/themes/default/symbols/call.svg +4 -0
- data/cockpit/themes/default/symbols/callmanipulate.svg +6 -0
- data/cockpit/themes/default/symbols/choose.svg +5 -0
- data/cockpit/themes/default/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/default/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/default/symbols/critical.svg +4 -0
- data/cockpit/themes/default/symbols/escape.svg +5 -0
- data/cockpit/themes/default/symbols/loop.svg +5 -0
- data/cockpit/themes/default/symbols/manipulate.svg +4 -0
- data/cockpit/themes/default/symbols/otherwise.svg +4 -0
- data/cockpit/themes/default/symbols/parallel.svg +5 -0
- data/cockpit/themes/default/symbols/parallel_branch.svg +4 -0
- data/cockpit/themes/default/symbols/scripts.svg +4 -0
- data/cockpit/themes/default/symbols/start.svg +3 -0
- data/cockpit/themes/default/theme.js +729 -0
- data/cockpit/themes/lego/rngs/alternative.rng +5 -0
- data/cockpit/themes/lego/rngs/call.rng +41 -0
- data/cockpit/themes/lego/rngs/choose.rng +8 -0
- data/cockpit/themes/lego/rngs/critical.rng +5 -0
- data/cockpit/themes/lego/rngs/loop.rng +11 -0
- data/cockpit/themes/lego/rngs/manipulate.rng +6 -0
- data/cockpit/themes/lego/rngs/parallel.rng +5 -0
- data/cockpit/themes/lego/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/lego/symbols/alternative.svg +4 -0
- data/cockpit/themes/lego/symbols/call.svg +4 -0
- data/cockpit/themes/lego/symbols/callmanipulate.svg +6 -0
- data/cockpit/themes/lego/symbols/callori.svg +4 -0
- data/cockpit/themes/lego/symbols/choose.svg +4 -0
- data/cockpit/themes/lego/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/lego/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/lego/symbols/critical.svg +4 -0
- data/cockpit/themes/lego/symbols/escape.svg +5 -0
- data/cockpit/themes/lego/symbols/lego.svg +72 -0
- data/cockpit/themes/lego/symbols/loop.svg +5 -0
- data/cockpit/themes/lego/symbols/manipulate.svg +4 -0
- data/cockpit/themes/lego/symbols/otherwise.svg +4 -0
- data/cockpit/themes/lego/symbols/parallel.svg +6 -0
- data/cockpit/themes/lego/symbols/parallel_branch.svg +4 -0
- data/cockpit/themes/lego/symbols/scripts.svg +4 -0
- data/cockpit/themes/lego/symbols/start.svg +3 -0
- data/cockpit/themes/lego/theme.js +742 -0
- data/cockpit/themes/promise/rngs/alternative.rng +5 -0
- data/cockpit/themes/promise/rngs/call.rng +41 -0
- data/cockpit/themes/promise/rngs/choose.rng +8 -0
- data/cockpit/themes/promise/rngs/critical.rng +5 -0
- data/cockpit/themes/promise/rngs/loop.rng +11 -0
- data/cockpit/themes/promise/rngs/manipulate.rng +6 -0
- data/cockpit/themes/promise/rngs/parallel.rng +5 -0
- data/cockpit/themes/promise/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/promise/symbols/alternative.svg +4 -0
- data/cockpit/themes/promise/symbols/call.svg +4 -0
- data/cockpit/themes/promise/symbols/callmanipulate.svg +6 -0
- data/cockpit/themes/promise/symbols/choose.svg +4 -0
- data/cockpit/themes/promise/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/promise/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/promise/symbols/critical.svg +4 -0
- data/cockpit/themes/promise/symbols/escape.svg +5 -0
- data/cockpit/themes/promise/symbols/loop.svg +5 -0
- data/cockpit/themes/promise/symbols/manipulate.svg +4 -0
- data/cockpit/themes/promise/symbols/otherwise.svg +4 -0
- data/cockpit/themes/promise/symbols/parallel.svg +6 -0
- data/cockpit/themes/promise/symbols/parallel_branch.svg +4 -0
- data/cockpit/themes/promise/symbols/preminder.svg +6 -0
- data/cockpit/themes/promise/symbols/scripts.svg +4 -0
- data/cockpit/themes/promise/symbols/start.svg +3 -0
- data/cockpit/themes/promise/theme.js +742 -0
- data/cpee.gemspec +2 -2
- data/lib/cpee/implementation.rb +15 -15
- data/server/handlerwrappers/default.rb +19 -19
- data/server/handlerwrappers/log.rb +264 -0
- data/server/instances/10/properties.xml +148 -0
- data/server/instances/11/properties.xml +149 -0
- data/server/instances/12/properties.xml +149 -0
- data/server/instances/13/properties.xml +149 -0
- data/server/instances/14/properties.xml +111 -0
- data/server/instances/15/properties.xml +113 -0
- data/server/instances/16/properties.xml +113 -0
- data/server/instances/17/properties.xml +149 -0
- data/server/instances/18/properties.xml +149 -0
- data/server/instances/19/properties.xml +114 -0
- data/server/instances/2/properties.xml +1 -1
- data/server/instances/20/properties.xml +113 -0
- data/server/instances/21/notifications/0851248d60c898cadd743d0dd5b6d273/consumer-secret +1 -0
- data/server/instances/21/notifications/0851248d60c898cadd743d0dd5b6d273/producer-secret +1 -0
- data/server/instances/21/notifications/0851248d60c898cadd743d0dd5b6d273/subscription.xml +6 -0
- data/server/instances/21/notifications/b7bac3f3010d433ce5d8f29338a06f9a/consumer-secret +1 -0
- data/server/instances/21/notifications/b7bac3f3010d433ce5d8f29338a06f9a/producer-secret +1 -0
- data/server/instances/21/notifications/b7bac3f3010d433ce5d8f29338a06f9a/subscription.xml +23 -0
- data/server/instances/21/properties.xml +149 -0
- data/server/instances/22/properties.xml +113 -0
- data/server/instances/23/properties.xml +88 -0
- data/server/instances/24/properties.xml +168 -0
- data/server/instances/25/properties.xml +149 -0
- data/server/instances/26/properties.xml +113 -0
- data/server/instances/27/properties.xml +141 -0
- data/server/instances/3/properties.xml +46 -0
- data/server/instances/4/properties.xml +148 -0
- data/server/instances/5/properties.xml +148 -0
- data/server/instances/6/properties.xml +148 -0
- data/server/instances/7/properties.xml +148 -0
- data/server/instances/8/properties.xml +148 -0
- data/server/instances/9/properties.xml +46 -0
- data/server/resources/properties.init +2 -1
- data/server/resources/transformation_dslx.xsl +12 -12
- data/server/server.pid +1 -0
- data/server/server.rb +2 -0
- metadata +152 -12
- data/cockpit/js/wfadaptor.cpee.js +0 -936
- data/cockpit/rngtest1.html +0 -53
- data/cockpit/rngtest1.rng +0 -38
- data/cockpit/rngtest1.xml +0 -16
- data/cockpit/rngtest2.html +0 -53
- data/cockpit/rngtest2.xml +0 -11
- data/cockpit/test.html +0 -46
@@ -0,0 +1,113 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<info>Enter info here</info>
|
4
|
+
<modeltype>CPEE</modeltype>
|
5
|
+
<theme>default</theme>
|
6
|
+
</attributes>
|
7
|
+
<state>finished</state>
|
8
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
9
|
+
<positions>
|
10
|
+
<a1>after</a1>
|
11
|
+
</positions>
|
12
|
+
<dataelements>
|
13
|
+
<x/>
|
14
|
+
</dataelements>
|
15
|
+
<endpoints>
|
16
|
+
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
17
|
+
</endpoints>
|
18
|
+
<dsl>call :a1, :timeout, parameters: { :method => :post, :arguments => {:timeout => 2} }, finalize: <<-END
|
19
|
+
data.x += "a1,"
|
20
|
+
END
|
21
|
+
call :a2, :timeout, parameters: { :method => :post, :arguments => {:timeout => 4} }, finalize: <<-END
|
22
|
+
data.x += "a2,"
|
23
|
+
END
|
24
|
+
call :a3, :timeout, parameters: { :method => :post, :arguments => {:timeout => 4} }, finalize: <<-END
|
25
|
+
data.x += "a3,"
|
26
|
+
END
|
27
|
+
</dsl>
|
28
|
+
<dslx>
|
29
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
30
|
+
<!--{{{-->
|
31
|
+
<call id="a1" endpoint="timeout">
|
32
|
+
<parameters>
|
33
|
+
<!--{{{-->
|
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
|
+
<method>:post</method>
|
46
|
+
<arguments>
|
47
|
+
<timeout>4</timeout>
|
48
|
+
</arguments>
|
49
|
+
</parameters>
|
50
|
+
<!--}}}-->
|
51
|
+
<finalize output="result"> data.x += "a2,"</finalize>
|
52
|
+
</call>
|
53
|
+
<call id="a3" endpoint="timeout">
|
54
|
+
<parameters>
|
55
|
+
<!--{{{-->
|
56
|
+
<method>:post</method>
|
57
|
+
<arguments>
|
58
|
+
<timeout>4</timeout>
|
59
|
+
</arguments>
|
60
|
+
</parameters>
|
61
|
+
<!--}}}-->
|
62
|
+
<finalize output="result"> data.x += "a3,"</finalize>
|
63
|
+
</call>
|
64
|
+
</description>
|
65
|
+
</dslx>
|
66
|
+
<status>
|
67
|
+
<id>0</id>
|
68
|
+
<message>undefined</message>
|
69
|
+
</status>
|
70
|
+
<description>
|
71
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
72
|
+
<!--{{{-->
|
73
|
+
<call id="a1" endpoint="timeout">
|
74
|
+
<parameters>
|
75
|
+
<!--{{{-->
|
76
|
+
<method>:post</method>
|
77
|
+
<arguments>
|
78
|
+
<timeout>2</timeout>
|
79
|
+
</arguments>
|
80
|
+
</parameters>
|
81
|
+
<!--}}}-->
|
82
|
+
<finalize output="result"> data.x += "a1,"</finalize>
|
83
|
+
</call>
|
84
|
+
<call id="a2" endpoint="timeout">
|
85
|
+
<parameters>
|
86
|
+
<!--{{{-->
|
87
|
+
<method>:post</method>
|
88
|
+
<arguments>
|
89
|
+
<timeout>4</timeout>
|
90
|
+
</arguments>
|
91
|
+
</parameters>
|
92
|
+
<!--}}}-->
|
93
|
+
<finalize output="result"> data.x += "a2,"</finalize>
|
94
|
+
</call>
|
95
|
+
<call id="a3" endpoint="timeout">
|
96
|
+
<parameters>
|
97
|
+
<!--{{{-->
|
98
|
+
<method>:post</method>
|
99
|
+
<arguments>
|
100
|
+
<timeout>4</timeout>
|
101
|
+
</arguments>
|
102
|
+
</parameters>
|
103
|
+
<!--}}}-->
|
104
|
+
<finalize output="result"> data.x += "a3,"</finalize>
|
105
|
+
</call>
|
106
|
+
</description>
|
107
|
+
</description>
|
108
|
+
<transformation>
|
109
|
+
<description type="copy"/>
|
110
|
+
<dataelements type="rest"/>
|
111
|
+
<endpoints type="rest"/>
|
112
|
+
</transformation>
|
113
|
+
</properties>
|
@@ -0,0 +1,141 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<info>Enter info here</info>
|
4
|
+
<modeltype>CPEE</modeltype>
|
5
|
+
<theme>default</theme>
|
6
|
+
</attributes>
|
7
|
+
<state>stopped</state>
|
8
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
9
|
+
<positions>
|
10
|
+
<a1>after</a1>
|
11
|
+
</positions>
|
12
|
+
<dataelements>
|
13
|
+
<persons>3</persons>
|
14
|
+
<card>Visa_12345</card>
|
15
|
+
<airline>FlyNiki</airline>
|
16
|
+
<hotels>[]</hotels>
|
17
|
+
<from>Vienna</from>
|
18
|
+
<to>Prague</to>
|
19
|
+
<costs>751.0</costs>
|
20
|
+
</dataelements>
|
21
|
+
<endpoints>
|
22
|
+
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
23
|
+
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
24
|
+
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
25
|
+
</endpoints>
|
26
|
+
<dsl>call :a1, :bookAir, parameters: { :method => :post, :arguments => {:from => data.from, :to => data.to, :persons => data.persons} }
|
27
|
+
parallel do
|
28
|
+
loop pre_test{data.persons > 0} do
|
29
|
+
parallel_branch data.persons do |p|
|
30
|
+
call :a2, :bookHotel, parameters: { :method => :post, :arguments => {:to => data.to} }, finalize: <<-END
|
31
|
+
data.hotels << result.value('id')
|
32
|
+
data.costs += result.value('costs').to_f
|
33
|
+
END
|
34
|
+
end
|
35
|
+
manipulate :a3, <<-END
|
36
|
+
data.persons -= 1
|
37
|
+
END
|
38
|
+
end
|
39
|
+
end
|
40
|
+
choose :inclusive do
|
41
|
+
alternative "data.costs > 700" do
|
42
|
+
call :a4, :approve, parameters: { :method => :post, :arguments => {:costs => data.costs} }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
</dsl>
|
46
|
+
<dslx>
|
47
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
48
|
+
<call id="a1" endpoint="bookAir">
|
49
|
+
<parameters>
|
50
|
+
<method>:post</method>
|
51
|
+
<arguments>
|
52
|
+
<from>data.from</from>
|
53
|
+
<to>data.to</to>
|
54
|
+
<persons>data.persons</persons>
|
55
|
+
</arguments>
|
56
|
+
</parameters>
|
57
|
+
</call>
|
58
|
+
<parallel>
|
59
|
+
<loop mode="pre_test" condition="data.persons > 0">
|
60
|
+
<parallel_branch pass="data.persons" local="p">
|
61
|
+
<call id="a2" endpoint="bookHotel">
|
62
|
+
<parameters>
|
63
|
+
<method>:post</method>
|
64
|
+
<arguments>
|
65
|
+
<to>data.to</to>
|
66
|
+
</arguments>
|
67
|
+
</parameters>
|
68
|
+
<finalize output="result"> data.hotels << result.value('id')
|
69
|
+
data.costs += result.value('costs').to_f</finalize>
|
70
|
+
</call>
|
71
|
+
</parallel_branch>
|
72
|
+
<manipulate id="a3"> data.persons -= 1</manipulate>
|
73
|
+
</loop>
|
74
|
+
</parallel>
|
75
|
+
<choose>
|
76
|
+
<alternative condition="data.costs > 700">
|
77
|
+
<call id="a4" endpoint="approve">
|
78
|
+
<parameters>
|
79
|
+
<method>:post</method>
|
80
|
+
<arguments>
|
81
|
+
<costs>data.costs</costs>
|
82
|
+
</arguments>
|
83
|
+
</parameters>
|
84
|
+
</call>
|
85
|
+
</alternative>
|
86
|
+
</choose>
|
87
|
+
</description>
|
88
|
+
</dslx>
|
89
|
+
<status>
|
90
|
+
<id>0</id>
|
91
|
+
<message>undefined</message>
|
92
|
+
</status>
|
93
|
+
<description>
|
94
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
95
|
+
<call id="a1" endpoint="bookAir">
|
96
|
+
<parameters>
|
97
|
+
<method>:post</method>
|
98
|
+
<arguments>
|
99
|
+
<from>data.from</from>
|
100
|
+
<to>data.to</to>
|
101
|
+
<persons>data.persons</persons>
|
102
|
+
</arguments>
|
103
|
+
</parameters>
|
104
|
+
</call>
|
105
|
+
<parallel>
|
106
|
+
<loop mode="pre_test" condition="data.persons > 0">
|
107
|
+
<parallel_branch pass="data.persons" local="p">
|
108
|
+
<call id="a2" endpoint="bookHotel">
|
109
|
+
<parameters>
|
110
|
+
<method>:post</method>
|
111
|
+
<arguments>
|
112
|
+
<to>data.to</to>
|
113
|
+
</arguments>
|
114
|
+
</parameters>
|
115
|
+
<finalize output="result"> data.hotels << result.value('id')
|
116
|
+
data.costs += result.value('costs').to_f</finalize>
|
117
|
+
</call>
|
118
|
+
</parallel_branch>
|
119
|
+
<manipulate id="a3"> data.persons -= 1</manipulate>
|
120
|
+
</loop>
|
121
|
+
</parallel>
|
122
|
+
<choose>
|
123
|
+
<alternative condition="data.costs > 700">
|
124
|
+
<call id="a4" endpoint="approve">
|
125
|
+
<parameters>
|
126
|
+
<method>:post</method>
|
127
|
+
<arguments>
|
128
|
+
<costs>data.costs</costs>
|
129
|
+
</arguments>
|
130
|
+
</parameters>
|
131
|
+
</call>
|
132
|
+
</alternative>
|
133
|
+
</choose>
|
134
|
+
</description>
|
135
|
+
</description>
|
136
|
+
<transformation>
|
137
|
+
<description type="copy"/>
|
138
|
+
<dataelements type="rest"/>
|
139
|
+
<endpoints type="rest"/>
|
140
|
+
</transformation>
|
141
|
+
</properties>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<!--
|
3
|
+
This file is part of CPEE.
|
4
|
+
|
5
|
+
CPEE is free software: you can redistribute it and/or modify it under the terms
|
6
|
+
of the GNU General Public License as published by the Free Software Foundation,
|
7
|
+
either version 3 of the License, or (at your option) any later version.
|
8
|
+
|
9
|
+
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
10
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
11
|
+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
12
|
+
|
13
|
+
You should have received a copy of the GNU General Public License along with
|
14
|
+
CPEE (file COPYING in the main directory). If not, see
|
15
|
+
<http://www.gnu.org/licenses/>.
|
16
|
+
-->
|
17
|
+
|
18
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
19
|
+
<attributes>
|
20
|
+
<info/>
|
21
|
+
<modeltype>CPEE</modeltype>
|
22
|
+
</attributes>
|
23
|
+
<state>ready</state>
|
24
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
25
|
+
<positions/>
|
26
|
+
<dataelements/>
|
27
|
+
<endpoints>
|
28
|
+
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
29
|
+
</endpoints>
|
30
|
+
<dsl/>
|
31
|
+
<dslx>
|
32
|
+
<description xmlns="http://cpee.org/ns/description/1.0"/>
|
33
|
+
</dslx>
|
34
|
+
<status>
|
35
|
+
<id>0</id>
|
36
|
+
<message>undefined</message>
|
37
|
+
</status>
|
38
|
+
<description>
|
39
|
+
<description xmlns="http://cpee.org/ns/description/1.0"/>
|
40
|
+
</description>
|
41
|
+
<transformation>
|
42
|
+
<description type='copy'/>
|
43
|
+
<dataelements type='none'/>
|
44
|
+
<endpoints type='none'/>
|
45
|
+
</transformation>
|
46
|
+
</properties>
|
@@ -0,0 +1,148 @@
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
2
|
+
<attributes>
|
3
|
+
<info>Enter info here</info>
|
4
|
+
<modeltype>CPEE</modeltype>
|
5
|
+
</attributes>
|
6
|
+
<state>ready</state>
|
7
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
8
|
+
<positions/>
|
9
|
+
<dataelements>
|
10
|
+
<persons>3</persons>
|
11
|
+
<card>Visa_12345</card>
|
12
|
+
<airline>null</airline>
|
13
|
+
<hotels>[]</hotels>
|
14
|
+
<from>Vienna</from>
|
15
|
+
<to>Prague</to>
|
16
|
+
<costs>0</costs>
|
17
|
+
</dataelements>
|
18
|
+
<endpoints>
|
19
|
+
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
20
|
+
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
21
|
+
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
22
|
+
</endpoints>
|
23
|
+
<dsl>call :a1, :bookAir, parameters: { :method => :post, :parameters => {:from => data.from, :to => data.to, :persons => data.persons} }, finalize: <<-END
|
24
|
+
data.airline = result.value('id')
|
25
|
+
data.costs += result.value('costs').to_f
|
26
|
+
status.update 1, 'Hotel'
|
27
|
+
END
|
28
|
+
parallel do
|
29
|
+
loop pre_test{data.persons > 0} do
|
30
|
+
parallel_branch data.persons do |p|
|
31
|
+
call :a2, :bookHotel, parameters: { :method => :post, :parameters => {:to => data.to} }, finalize: <<-END
|
32
|
+
data.hotels << result.value('id')
|
33
|
+
data.costs += result.value('costs').to_f
|
34
|
+
END
|
35
|
+
end
|
36
|
+
manipulate :a3, <<-END
|
37
|
+
data.persons -= 1
|
38
|
+
END
|
39
|
+
end
|
40
|
+
end
|
41
|
+
choose :inclusive do
|
42
|
+
alternative "data.costs > 700" do
|
43
|
+
call :a4, :approve, parameters: { :method => :post, :parameters => {:costs => data.costs} }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
</dsl>
|
47
|
+
<dslx>
|
48
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
49
|
+
<call id="a1" endpoint="bookAir">
|
50
|
+
<parameters>
|
51
|
+
<method>:post</method>
|
52
|
+
<parameters>
|
53
|
+
<from>data.from</from>
|
54
|
+
<to>data.to</to>
|
55
|
+
<persons>data.persons</persons>
|
56
|
+
</parameters>
|
57
|
+
</parameters>
|
58
|
+
<finalize output="result"> data.airline = result.value('id')
|
59
|
+
data.costs += result.value('costs').to_f
|
60
|
+
status.update 1, 'Hotel'</finalize>
|
61
|
+
</call>
|
62
|
+
<parallel>
|
63
|
+
<loop pre_test="data.persons > 0">
|
64
|
+
<parallel_branch pass="data.persons" local="p">
|
65
|
+
<call id="a2" endpoint="bookHotel">
|
66
|
+
<parameters>
|
67
|
+
<method>:post</method>
|
68
|
+
<parameters>
|
69
|
+
<to>data.to</to>
|
70
|
+
</parameters>
|
71
|
+
</parameters>
|
72
|
+
<finalize output="result"> data.hotels << result.value('id')
|
73
|
+
data.costs += result.value('costs').to_f</finalize>
|
74
|
+
</call>
|
75
|
+
</parallel_branch>
|
76
|
+
<manipulate id="a3"> data.persons -= 1</manipulate>
|
77
|
+
</loop>
|
78
|
+
</parallel>
|
79
|
+
<choose>
|
80
|
+
<alternative condition="data.costs > 700">
|
81
|
+
<call id="a4" endpoint="approve">
|
82
|
+
<parameters>
|
83
|
+
<method>:post</method>
|
84
|
+
<parameters>
|
85
|
+
<costs>data.costs</costs>
|
86
|
+
</parameters>
|
87
|
+
</parameters>
|
88
|
+
</call>
|
89
|
+
</alternative>
|
90
|
+
</choose>
|
91
|
+
</description>
|
92
|
+
</dslx>
|
93
|
+
<status>
|
94
|
+
<id>0</id>
|
95
|
+
<message>undefined</message>
|
96
|
+
</status>
|
97
|
+
<description>
|
98
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
99
|
+
<call id="a1" endpoint="bookAir">
|
100
|
+
<parameters>
|
101
|
+
<method>:post</method>
|
102
|
+
<parameters>
|
103
|
+
<from>data.from</from>
|
104
|
+
<to>data.to</to>
|
105
|
+
<persons>data.persons</persons>
|
106
|
+
</parameters>
|
107
|
+
</parameters>
|
108
|
+
<finalize output="result"> data.airline = result.value('id')
|
109
|
+
data.costs += result.value('costs').to_f
|
110
|
+
status.update 1, 'Hotel'</finalize>
|
111
|
+
</call>
|
112
|
+
<parallel>
|
113
|
+
<loop pre_test="data.persons > 0">
|
114
|
+
<parallel_branch pass="data.persons" local="p">
|
115
|
+
<call id="a2" endpoint="bookHotel">
|
116
|
+
<parameters>
|
117
|
+
<method>:post</method>
|
118
|
+
<parameters>
|
119
|
+
<to>data.to</to>
|
120
|
+
</parameters>
|
121
|
+
</parameters>
|
122
|
+
<finalize output="result"> data.hotels << result.value('id')
|
123
|
+
data.costs += result.value('costs').to_f</finalize>
|
124
|
+
</call>
|
125
|
+
</parallel_branch>
|
126
|
+
<manipulate id="a3"> data.persons -= 1</manipulate>
|
127
|
+
</loop>
|
128
|
+
</parallel>
|
129
|
+
<choose>
|
130
|
+
<alternative condition="data.costs > 700">
|
131
|
+
<call id="a4" endpoint="approve">
|
132
|
+
<parameters>
|
133
|
+
<method>:post</method>
|
134
|
+
<parameters>
|
135
|
+
<costs>data.costs</costs>
|
136
|
+
</parameters>
|
137
|
+
</parameters>
|
138
|
+
</call>
|
139
|
+
</alternative>
|
140
|
+
</choose>
|
141
|
+
</description>
|
142
|
+
</description>
|
143
|
+
<transformation>
|
144
|
+
<description type="copy"/>
|
145
|
+
<dataelements type="rest"/>
|
146
|
+
<endpoints type="rest"/>
|
147
|
+
</transformation>
|
148
|
+
</properties>
|