cpee 2.1.71 → 2.1.74
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/css/wfadaptor.css +1 -1
- data/cockpit/js/instance.js +45 -27
- data/cockpit/js/modifiers.js +3 -0
- data/cockpit/templates/ML-pipe-multi.xml +635 -0
- data/cockpit/templates/Track Test Local.xml +19 -13
- data/cockpit/themes/base.js +14 -5
- data/cpee.gemspec +2 -2
- data/lib/cpee/implementation.rb +22 -1
- data/lib/cpee/implementation_callbacks.rb +15 -1
- data/lib/cpee/implementation_properties.rb +14 -1
- data/lib/cpee/message.rb +1 -1
- data/lib/engine/executionhandler-list.rng +32 -0
- data/lib/engine.xml +8 -0
- data/server/executionhandlers/eval/controller.rb +11 -1
- data/server/executionhandlers/ruby/controller.rb +1 -1
- data/server/executionhandlers/ruby/execution.rb +0 -1
- metadata +4 -11
- data/cockpit/templates/Coopis 2010 Eval.xml +0 -192
- data/server/executionhandlers/rust/backend/README.md +0 -17
- data/server/executionhandlers/rust/backend/compile.sh +0 -5
- data/server/executionhandlers/rust/backend/opts.yaml +0 -6
- data/server/executionhandlers/rust/execution.rb +0 -84
- data/server/routing/end.pid +0 -1
- data/server/routing/forward-events-00.pid +0 -1
- data/server/routing/forward-votes.pid +0 -1
- data/server/routing/persist.pid +0 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
<?xml version="1.0"?>
|
1
2
|
<testset xmlns="http://cpee.org/ns/properties/2.0">
|
2
3
|
<executionhandler>ruby</executionhandler>
|
3
4
|
<dataelements>
|
@@ -5,8 +6,24 @@
|
|
5
6
|
</dataelements>
|
6
7
|
<endpoints>
|
7
8
|
<start_url>https://cpee.org/flow/start/url/</start_url>
|
9
|
+
<user>https-post://cpee.org/services/timeout-user.php</user>
|
10
|
+
<auto>https-post://cpee.org/services/timeout-auto.php</auto>
|
11
|
+
<subprocess>https-post://cpee.org/flow/start/url/</subprocess>
|
12
|
+
<timeout>https-post://cpee.org/services/timeout.php</timeout>
|
13
|
+
<send>https-post://cpee.org/ing/correlators/message/send/</send>
|
14
|
+
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
8
15
|
</endpoints>
|
9
|
-
<
|
16
|
+
<attributes>
|
17
|
+
<info>Track Test Local</info>
|
18
|
+
<modeltype>CPEE</modeltype>
|
19
|
+
<theme>default</theme>
|
20
|
+
<customer>pilotfabrik</customer>
|
21
|
+
<status>development</status>
|
22
|
+
<creator>Christine Ashcreek</creator>
|
23
|
+
<author>Christine Ashcreek</author>
|
24
|
+
<design_stage>development</design_stage>
|
25
|
+
<design_dir>Templates.dir</design_dir>
|
26
|
+
</attributes>
|
10
27
|
<description>
|
11
28
|
<description xmlns="http://cpee.org/ns/description/1.0">
|
12
29
|
<loop mode="pre_test" condition="true">
|
@@ -73,15 +90,4 @@
|
|
73
90
|
<dataelements type="none"/>
|
74
91
|
<endpoints type="none"/>
|
75
92
|
</transformation>
|
76
|
-
|
77
|
-
<info>Track Test Local</info>
|
78
|
-
<modeltype>CPEE</modeltype>
|
79
|
-
<theme>default</theme>
|
80
|
-
<customer>pilotfabrik</customer>
|
81
|
-
<status>development</status>
|
82
|
-
<creator>Christine Ashcreek</creator>
|
83
|
-
<author>Christine Ashcreek</author>
|
84
|
-
<design_stage>development</design_stage>
|
85
|
-
<design_dir>Templates.dir</design_dir>
|
86
|
-
</attributes>
|
87
|
-
</testset>
|
93
|
+
</testset>
|
data/cockpit/themes/base.js
CHANGED
@@ -1248,14 +1248,22 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
1248
1248
|
|
1249
1249
|
var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for >/< version of stuff as only conditions are in attributes, and conditions can not contain assignments
|
1250
1250
|
var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
|
1251
|
-
|
1252
|
-
|
1251
|
+
|
1252
|
+
$('call, loop[condition], alternative[condition]',node).each(function(i,n) {
|
1253
|
+
let item = '';
|
1253
1254
|
if (n.hasAttribute('condition')) {
|
1254
1255
|
item = n.getAttribute('condition');
|
1255
1256
|
} else {
|
1256
|
-
|
1257
|
+
$('call > code > prepare',n).each(function(j,m){
|
1258
|
+
item += m.textContent + '\n';
|
1259
|
+
});
|
1260
|
+
$('call > parameters > arguments > *, call > code > finalize, call > code > update, call > code > rescue',n).each(function(j,m){
|
1261
|
+
let x = m.textContent;
|
1262
|
+
if (m.parentNode.nodeName == 'arguments' && x.charAt(0) != '!' ) { return }
|
1263
|
+
item += x + '\n';
|
1264
|
+
});
|
1257
1265
|
}
|
1258
|
-
if (
|
1266
|
+
if (item == '') { return; }
|
1259
1267
|
|
1260
1268
|
let indices = [];
|
1261
1269
|
|
@@ -1263,11 +1271,12 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
1263
1271
|
indices.push(match.index);
|
1264
1272
|
alist.push(match[1]);
|
1265
1273
|
}
|
1274
|
+
|
1266
1275
|
for (const match of item.matchAll(reg_not_assi)) {
|
1267
1276
|
const arg1 = match[1];
|
1268
1277
|
if (indices.includes(match.index)) { continue; }
|
1269
1278
|
if (!alist.includes(arg1)) {
|
1270
|
-
if (match.index >= indices[0]) {
|
1279
|
+
if (match.index >= indices[0] || indices.length == 0) {
|
1271
1280
|
plist.push(arg1);
|
1272
1281
|
}
|
1273
1282
|
}
|
data/cpee.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.1.
|
3
|
+
s.version = "2.1.74"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3.0-or-later"
|
6
6
|
s.summary = "The cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
|
7
7
|
|
8
8
|
s.description = "see http://cpee.org"
|
9
9
|
|
10
|
-
s.files = Dir['{example/**/*,server/**/*,tools/**/*,tools/archive,lib/**/*,cockpit/**/*,cockpit/templates/.templates.xml,cockpit/templates/.transformations.xml,cockpit/templates/.Signavio.xml,cockpit/templates/.CPEE.xml,cockpit/*.html,cockpit/themes/*/*,cockpit/themes/*/*/*,contrib/logo*,contrib/Screen*}'] - Dir['{server/instances/**/*,cockpit/js_libs/**/*,server/redis*}'] + %w(COPYING FEATURES.md INSTALL.md Rakefile cpee.gemspec README.md AUTHORS)
|
10
|
+
s.files = Dir['{example/**/*,server/**/*,tools/**/*,tools/archive,lib/**/*,cockpit/**/*,cockpit/templates/.templates.xml,cockpit/templates/.transformations.xml,cockpit/templates/.Signavio.xml,cockpit/templates/.CPEE.xml,cockpit/*.html,cockpit/themes/*/*,cockpit/themes/*/*/*,contrib/logo*,contrib/Screen*}'] - Dir['{server/instances/**/*,server/executionhandlers/rust/**/*,cockpit/js_libs/**/*,server/redis*}'] + %w(COPYING FEATURES.md INSTALL.md Rakefile cpee.gemspec README.md AUTHORS)
|
11
11
|
s.require_path = 'lib'
|
12
12
|
s.extra_rdoc_files = ['README.md']
|
13
13
|
s.bindir = 'tools'
|
data/lib/cpee/implementation.rb
CHANGED
@@ -181,6 +181,9 @@ module CPEE
|
|
181
181
|
interface 'main' do
|
182
182
|
run CPEE::Instances, opts if get '*'
|
183
183
|
run CPEE::NewInstance, opts if post 'instance-new'
|
184
|
+
on resource 'executionhandlers' do
|
185
|
+
run CPEE::ExecutionHandlers, opts if get
|
186
|
+
end
|
184
187
|
on resource '\d+' do |r|
|
185
188
|
run CPEE::Info, opts if get
|
186
189
|
run CPEE::DeleteInstance, opts if delete
|
@@ -256,6 +259,24 @@ module CPEE
|
|
256
259
|
end
|
257
260
|
end
|
258
261
|
|
262
|
+
class ExecutionHandlers < Riddl::Implementation #{{{
|
263
|
+
def response
|
264
|
+
opts = @a[0]
|
265
|
+
doc = XML::Smart::string('<handlers/>')
|
266
|
+
list = []
|
267
|
+
Dir[File.join(opts[:global_executionhandlers],'*','execution.rb')].each do |h|
|
268
|
+
list << File.basename(File.dirname(h))
|
269
|
+
end unless opts[:global_executionhandlers].nil? || opts[:global_executionhandlers].strip == ''
|
270
|
+
Dir[File.join(opts[:executionhandlers],'*','execution.rb')].each do |h|
|
271
|
+
list << File.basename(File.dirname(h))
|
272
|
+
end unless opts[:executionhandlers].nil? || opts[:executionhandlers].strip == ''
|
273
|
+
list.uniq.each do |e|
|
274
|
+
doc.root.add('handler',e)
|
275
|
+
end
|
276
|
+
Riddl::Parameter::Complex.new('wis','text/xml',doc.to_s)
|
277
|
+
end
|
278
|
+
end #}}}
|
279
|
+
|
259
280
|
class Instances < Riddl::Implementation #{{{
|
260
281
|
def response
|
261
282
|
opts = @a[0]
|
@@ -272,7 +293,7 @@ module CPEE
|
|
272
293
|
ins.to_s
|
273
294
|
end
|
274
295
|
else
|
275
|
-
Riddl::Parameter::Complex.new(
|
296
|
+
Riddl::Parameter::Complex.new('wis','text/xml','<instances><!-- instances list disabled. --></instances>')
|
276
297
|
end
|
277
298
|
end
|
278
299
|
end #}}}
|
@@ -116,7 +116,21 @@ module CPEE
|
|
116
116
|
if CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'callback'
|
117
117
|
ret = {}
|
118
118
|
ret['values'] = @p.map{ |e|
|
119
|
-
|
119
|
+
# bei complex wenn kleiner 500KiB statt e.value.path e.value.read
|
120
|
+
# bei complex wenn groesser 500KiB das file ueber nginx in einem verzeichnis verfuegbar machen, mimetype auf cpee/externallink
|
121
|
+
# aendert, link auf den server in den content. Der eval macht das dann direkt.
|
122
|
+
# Alt: [e.name, e.class == Riddl::Parameter::Simple ? [:simple,e.value] : [:complex,e.mimetype,e.value.path] ]
|
123
|
+
[
|
124
|
+
e.name,
|
125
|
+
if e.class == Riddl::Parameter::Simple
|
126
|
+
[:simple,e.value]
|
127
|
+
elsif e.class == Riddl::Parameter::Complex && e.value.size <= 512000
|
128
|
+
[:complex,e.mimetype,e.value.read]
|
129
|
+
else
|
130
|
+
# [:complex,'cpee-external-' + e.mimetype,e.value.read]
|
131
|
+
[:complex, e.mimetype,e.value.read]
|
132
|
+
end
|
133
|
+
]
|
120
134
|
}
|
121
135
|
ret['headers'] = @h
|
122
136
|
|
@@ -332,6 +332,16 @@ module CPEE
|
|
332
332
|
class PutExecutionHandler < Riddl::Implementation #{{{
|
333
333
|
def self::set(id,opts,hw)
|
334
334
|
CPEE::Persistence::set_item(id,opts,'executionhandler',:executionhandler => hw)
|
335
|
+
desc = CPEE::Persistence::extract_item(id,opts,'description')
|
336
|
+
dslx = CPEE::Persistence::extract_item(id,opts,'dslx')
|
337
|
+
xml = XML::Smart::string(dslx)
|
338
|
+
xml.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
|
339
|
+
dsl = Object.const_get('CPEE::ExecutionHandler::' + hw.capitalize)::dslx_to_dsl(xml)
|
340
|
+
CPEE::Persistence::set_item(id,opts,'description',
|
341
|
+
:description => xml,
|
342
|
+
:dslx => dslx,
|
343
|
+
:dsl => dsl
|
344
|
+
)
|
335
345
|
end
|
336
346
|
def response
|
337
347
|
id = @a[0]
|
@@ -768,7 +778,10 @@ module CPEE
|
|
768
778
|
CPEE::Persistence::set_item(id,opts,'description',
|
769
779
|
:description => xml,
|
770
780
|
:dslx => dslx,
|
771
|
-
:dsl => dsl
|
781
|
+
:dsl => dsl,
|
782
|
+
:dataelements => CPEE::Persistence::extract_list(id,opts,'dataelements').to_h,
|
783
|
+
:endpoints => CPEE::Persistence::extract_list(id,opts,'endpoints').to_h,
|
784
|
+
:attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h
|
772
785
|
)
|
773
786
|
PatchItems::set_hash('dataelements',id,opts,de) unless de.empty?
|
774
787
|
PatchItems::set_hash('dataelements',id,opts,ep) unless ep.empty?
|
data/lib/cpee/message.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
<!--
|
2
|
+
This file is part of CPEE.
|
3
|
+
|
4
|
+
CPEE is free software: you can redistribute it and/or modify it under the terms
|
5
|
+
of the GNU General Public License as published by the Free Software Foundation,
|
6
|
+
either version 3 of the License, or (at your option) any later version.
|
7
|
+
|
8
|
+
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
9
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
10
|
+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
11
|
+
|
12
|
+
You should have received a copy of the GNU General Public License along with
|
13
|
+
CPEE (file COPYING in the main directory). If not, see
|
14
|
+
<http://www.gnu.org/licenses/>.
|
15
|
+
-->
|
16
|
+
|
17
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
18
|
+
<start>
|
19
|
+
<element name="handlers">
|
20
|
+
<zeroOrMore>
|
21
|
+
<ref name="handler"/>
|
22
|
+
</zeroOrMore>
|
23
|
+
</element>
|
24
|
+
</start>
|
25
|
+
|
26
|
+
<define name="handler">
|
27
|
+
<element name="handler">
|
28
|
+
<data type="string"/>
|
29
|
+
</element>
|
30
|
+
</define>
|
31
|
+
|
32
|
+
</grammar>
|
data/lib/engine.xml
CHANGED
@@ -36,6 +36,11 @@
|
|
36
36
|
<xi:include href="engine/instance-info.rng"/>
|
37
37
|
</parameter>
|
38
38
|
</message>
|
39
|
+
<message name="executionhandlerlist">
|
40
|
+
<parameter name="list" mimetype="text/xml" handler="http://riddl.org/ns/handlers/relaxng">
|
41
|
+
<xi:include href="engine/executionhandler-list.rng"/>
|
42
|
+
</parameter>
|
43
|
+
</message>
|
39
44
|
|
40
45
|
<resource>
|
41
46
|
<doc:documentation>b</doc:documentation>
|
@@ -43,6 +48,9 @@
|
|
43
48
|
<doc:documentation>a</doc:documentation>
|
44
49
|
</get>
|
45
50
|
<post in="instance-new" out="instance-id"/>
|
51
|
+
<resource relative="executionhandlers">
|
52
|
+
<get out="executionhandlerlist"/>
|
53
|
+
</resource>
|
46
54
|
<resource relative="\d+">
|
47
55
|
<get in="*" out="instance-info"/>
|
48
56
|
<delete in="*"/>
|
@@ -70,7 +70,7 @@ class Controller
|
|
70
70
|
if e[1][0] == 'simple'
|
71
71
|
resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
|
72
72
|
elsif e[1][0] == 'complex'
|
73
|
-
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],
|
73
|
+
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],e[1][2])
|
74
74
|
end
|
75
75
|
end
|
76
76
|
@callback_keys[identifier].send(:callback,resp,m['content']['headers'])
|
@@ -136,6 +136,16 @@ class Controller
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
+
def sim
|
140
|
+
if vote("state/change", :state => 'simulating')
|
141
|
+
@thread = @instance.sim
|
142
|
+
@thread.join
|
143
|
+
else
|
144
|
+
@thread = @instance.stop
|
145
|
+
@thread.join
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
139
149
|
def stop
|
140
150
|
### tell the instance to stop
|
141
151
|
@instance.stop
|
@@ -70,7 +70,7 @@ class Controller
|
|
70
70
|
if e[1][0] == 'simple'
|
71
71
|
resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
|
72
72
|
elsif e[1][0] == 'complex'
|
73
|
-
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],
|
73
|
+
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],e[1][2])
|
74
74
|
end
|
75
75
|
end
|
76
76
|
@callback_keys[identifier].send(:callback,resp,m['content']['headers'])
|
@@ -40,7 +40,6 @@ module CPEE
|
|
40
40
|
[ k, v, CPEE::Persistence::extract_item(id,opts,File.join('positions',k,'@passthrough')) ]
|
41
41
|
end
|
42
42
|
iopts = YAML::load_file(ExecutionHandler::Ruby::BACKEND_OPTS)
|
43
|
-
pp iopts
|
44
43
|
iopts[:host] = opts[:host]
|
45
44
|
iopts[:url] = opts[:url]
|
46
45
|
iopts[:redis_url] = opts[:redis_url]
|
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: 2.1.
|
4
|
+
version: 2.1.74
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: tools
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-12-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -270,12 +270,12 @@ files:
|
|
270
270
|
- cockpit/templates.legacy/convert_preset.rb
|
271
271
|
- cockpit/templates.legacy/testsets.xml
|
272
272
|
- cockpit/templates.legacy/transformations.xml
|
273
|
-
- cockpit/templates/Coopis 2010 Eval.xml
|
274
273
|
- cockpit/templates/Coopis 2010.xml
|
275
274
|
- cockpit/templates/Frames.xml
|
276
275
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml
|
277
276
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml
|
278
277
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml
|
278
|
+
- cockpit/templates/ML-pipe-multi.xml
|
279
279
|
- cockpit/templates/Subprocess.xml
|
280
280
|
- cockpit/templates/Subprocess.xml.attrs
|
281
281
|
- cockpit/templates/Track Test Local.xml
|
@@ -863,6 +863,7 @@ files:
|
|
863
863
|
- lib/cpee/statemachine.rb
|
864
864
|
- lib/cpee/value_helper.rb
|
865
865
|
- lib/engine.xml
|
866
|
+
- lib/engine/executionhandler-list.rng
|
866
867
|
- lib/engine/instance-info.rng
|
867
868
|
- lib/engine/instances.rng
|
868
869
|
- lib/properties.xml
|
@@ -908,10 +909,6 @@ files:
|
|
908
909
|
- server/executionhandlers/ruby/controller.rb
|
909
910
|
- server/executionhandlers/ruby/dsl_to_dslx.xsl
|
910
911
|
- server/executionhandlers/ruby/execution.rb
|
911
|
-
- server/executionhandlers/rust/backend/README.md
|
912
|
-
- server/executionhandlers/rust/backend/compile.sh
|
913
|
-
- server/executionhandlers/rust/backend/opts.yaml
|
914
|
-
- server/executionhandlers/rust/execution.rb
|
915
912
|
- server/resources/empty_dslx.xml
|
916
913
|
- server/resources/notifications/logging/subscription.xml
|
917
914
|
- server/resources/properties.empty
|
@@ -920,13 +917,9 @@ files:
|
|
920
917
|
- server/resources/states.xml
|
921
918
|
- server/resources/topics.xml
|
922
919
|
- server/resources/transformation.xml
|
923
|
-
- server/routing/end.pid
|
924
920
|
- server/routing/end.rb
|
925
|
-
- server/routing/forward-events-00.pid
|
926
921
|
- server/routing/forward-events.rb
|
927
|
-
- server/routing/forward-votes.pid
|
928
922
|
- server/routing/forward-votes.rb
|
929
|
-
- server/routing/persist.pid
|
930
923
|
- server/routing/persist.rb
|
931
924
|
- server/server.pid
|
932
925
|
- server/server.rb
|
@@ -1,192 +0,0 @@
|
|
1
|
-
<testset xmlns="http://cpee.org/ns/properties/2.0">
|
2
|
-
<executionhandler>eval</executionhandler>
|
3
|
-
<dataelements>
|
4
|
-
<persons>3</persons>
|
5
|
-
<card>Visa_12345</card>
|
6
|
-
<airline/>
|
7
|
-
<hotels>[]</hotels>
|
8
|
-
<from>Vienna</from>
|
9
|
-
<to>Prague</to>
|
10
|
-
<costs>0</costs>
|
11
|
-
</dataelements>
|
12
|
-
<endpoints>
|
13
|
-
<bookAir>http://gruppe.wst.univie.ac.at/~mangler/services/airline.php</bookAir>
|
14
|
-
<user>https-post://cpee.org/services/timeout-user.php</user>
|
15
|
-
<auto>https-post://cpee.org/services/timeout-auto.php</auto>
|
16
|
-
<timeout>https://cpee.org/services/timeout.php</timeout>
|
17
|
-
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
18
|
-
<subprocess>https://cpee.org/flow/start/url/</subprocess>
|
19
|
-
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
20
|
-
<send>https-post://cpee.org/ing/correlators/message/send/</send>
|
21
|
-
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
22
|
-
</endpoints>
|
23
|
-
<attributes>
|
24
|
-
<theme>extended</theme>
|
25
|
-
<info>Coopis 2010 Eval</info>
|
26
|
-
<creator>Christine Ashcreek</creator>
|
27
|
-
<author>Christine Ashcreek</author>
|
28
|
-
<modeltype>CPEE</modeltype>
|
29
|
-
<design_stage>development</design_stage>
|
30
|
-
<guarded>none</guarded>
|
31
|
-
<design_dir>Templates.dir/</design_dir>
|
32
|
-
<guarded_id/>
|
33
|
-
<model_uuid>1cdc1bc1-6cf9-4f52-a227-8c87a7b9120a</model_uuid>
|
34
|
-
</attributes>
|
35
|
-
<description>
|
36
|
-
<description xmlns="http://cpee.org/ns/description/1.0">
|
37
|
-
<call id="a1" endpoint="bookAir">
|
38
|
-
<parameters>
|
39
|
-
<label>Book Airline 1</label>
|
40
|
-
<method>:post</method>
|
41
|
-
<arguments>
|
42
|
-
<from>!data.from</from>
|
43
|
-
<to>!data.to</to>
|
44
|
-
<persons>!data.persons</persons>
|
45
|
-
</arguments>
|
46
|
-
</parameters>
|
47
|
-
<code>
|
48
|
-
<prepare/>
|
49
|
-
<finalize output="result">data.airline = result.value('id')
|
50
|
-
data.costs += result.value('costs').to_f
|
51
|
-
status.update 1, 'Hotel'</finalize>
|
52
|
-
<update output="result"/>
|
53
|
-
<rescue output="result"/>
|
54
|
-
</code>
|
55
|
-
<annotations>
|
56
|
-
<_timing>
|
57
|
-
<_timing_weight/>
|
58
|
-
<_timing_avg/>
|
59
|
-
<explanations/>
|
60
|
-
</_timing>
|
61
|
-
<_shifting>
|
62
|
-
<_shifting_type>Duration</_shifting_type>
|
63
|
-
</_shifting>
|
64
|
-
<_context_data_analysis>
|
65
|
-
<probes/>
|
66
|
-
<ips/>
|
67
|
-
</_context_data_analysis>
|
68
|
-
<report>
|
69
|
-
<url/>
|
70
|
-
</report>
|
71
|
-
<_notes>
|
72
|
-
<_notes_general/>
|
73
|
-
</_notes>
|
74
|
-
</annotations>
|
75
|
-
<documentation>
|
76
|
-
<input/>
|
77
|
-
<output/>
|
78
|
-
<implementation>
|
79
|
-
<description/>
|
80
|
-
</implementation>
|
81
|
-
<code>
|
82
|
-
<description/>
|
83
|
-
</code>
|
84
|
-
</documentation>
|
85
|
-
</call>
|
86
|
-
<parallel wait="-1" cancel="last">
|
87
|
-
<loop mode="pre_test" condition="data.persons > 0">
|
88
|
-
<parallel_branch>
|
89
|
-
<call id="a2" endpoint="bookHotel">
|
90
|
-
<parameters>
|
91
|
-
<label>Book Hotel</label>
|
92
|
-
<method>:post</method>
|
93
|
-
<arguments>
|
94
|
-
<to>!data.to</to>
|
95
|
-
</arguments>
|
96
|
-
</parameters>
|
97
|
-
<code>
|
98
|
-
<prepare/>
|
99
|
-
<finalize output="result">data.hotels << result.value('id')
|
100
|
-
data.costs += result.value('costs').to_f</finalize>
|
101
|
-
<update output="result"/>
|
102
|
-
<rescue output="result"/>
|
103
|
-
</code>
|
104
|
-
<annotations>
|
105
|
-
<_timing>
|
106
|
-
<_timing_weight/>
|
107
|
-
<_timing_avg/>
|
108
|
-
<explanations/>
|
109
|
-
</_timing>
|
110
|
-
<_shifting>
|
111
|
-
<_shifting_type>Duration</_shifting_type>
|
112
|
-
</_shifting>
|
113
|
-
<_context_data_analysis>
|
114
|
-
<probes/>
|
115
|
-
<ips/>
|
116
|
-
</_context_data_analysis>
|
117
|
-
<report>
|
118
|
-
<url/>
|
119
|
-
</report>
|
120
|
-
<_notes>
|
121
|
-
<_notes_general/>
|
122
|
-
</_notes>
|
123
|
-
</annotations>
|
124
|
-
<documentation>
|
125
|
-
<input/>
|
126
|
-
<output/>
|
127
|
-
<implementation>
|
128
|
-
<description/>
|
129
|
-
</implementation>
|
130
|
-
<code>
|
131
|
-
<description/>
|
132
|
-
</code>
|
133
|
-
</documentation>
|
134
|
-
</call>
|
135
|
-
</parallel_branch>
|
136
|
-
<manipulate id="a3">data.persons -= 1</manipulate>
|
137
|
-
</loop>
|
138
|
-
</parallel>
|
139
|
-
<choose mode="exclusive">
|
140
|
-
<alternative condition="data.costs > 700">
|
141
|
-
<_probability>
|
142
|
-
<_probability_min/>
|
143
|
-
<_probability_max/>
|
144
|
-
<_probability_avg/>
|
145
|
-
</_probability>
|
146
|
-
<call id="a4" endpoint="approve">
|
147
|
-
<parameters>
|
148
|
-
<label>Approve Hotel</label>
|
149
|
-
<method>:post</method>
|
150
|
-
<arguments>
|
151
|
-
<costs>!data.costs</costs>
|
152
|
-
</arguments>
|
153
|
-
</parameters>
|
154
|
-
<annotations>
|
155
|
-
<_timing>
|
156
|
-
<_timing_weight/>
|
157
|
-
<_timing_avg/>
|
158
|
-
<explanations/>
|
159
|
-
</_timing>
|
160
|
-
<_shifting>
|
161
|
-
<_shifting_type>Duration</_shifting_type>
|
162
|
-
</_shifting>
|
163
|
-
<_context_data_analysis>
|
164
|
-
<probes/>
|
165
|
-
<ips/>
|
166
|
-
</_context_data_analysis>
|
167
|
-
<report>
|
168
|
-
<url/>
|
169
|
-
</report>
|
170
|
-
<_notes>
|
171
|
-
<_notes_general/>
|
172
|
-
</_notes>
|
173
|
-
</annotations>
|
174
|
-
<documentation>
|
175
|
-
<input/>
|
176
|
-
<output/>
|
177
|
-
<implementation>
|
178
|
-
<description/>
|
179
|
-
</implementation>
|
180
|
-
</documentation>
|
181
|
-
</call>
|
182
|
-
</alternative>
|
183
|
-
<otherwise/>
|
184
|
-
</choose>
|
185
|
-
</description>
|
186
|
-
</description>
|
187
|
-
<transformation>
|
188
|
-
<description type="copy"/>
|
189
|
-
<dataelements type="none"/>
|
190
|
-
<endpoints type="none"/>
|
191
|
-
</transformation>
|
192
|
-
</testset>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
* run is copied into every instance.
|
2
|
-
* opts.yaml is written on each start.
|
3
|
-
* instance.rb is written on each start.
|
4
|
-
|
5
|
-
## What can you do to make it more robust?
|
6
|
-
|
7
|
-
Replace run with a program that actually compiles and runs instance.rb. Of
|
8
|
-
courses the transformation_* xslts would have to be adapted to create suitable
|
9
|
-
code. The compiled executable would just need to behave the same as the instance.rb,
|
10
|
-
dispersing all the same events through redis.
|
11
|
-
|
12
|
-
More suitable languages would be crystal and javascript, c++. Less suitable,
|
13
|
-
but doable, would be python, C. I.e., all languages that do not support multi-line
|
14
|
-
lambdas would produce much less readable code, thus the "Description" tab in
|
15
|
-
the cockpit would be garbage.
|
16
|
-
|
17
|
-
Definitely do tell me if you are interessted in doing something like this ;-)
|