cpee 2.1.77 → 2.1.78
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/js/details.js +21 -9
- data/cockpit/templates/Subprocess.xml +16 -44
- data/cockpit/templates/Subprocess.xml.attrs +6 -6
- data/cockpit/templates/Wait.xml +16 -5
- data/cockpit/themes/compact/rngs/call.rng +1 -0
- data/cockpit/themes/compact/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/control/rngs/call.rng +1 -0
- data/cockpit/themes/control/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/dataflow/rngs/call.rng +1 -0
- data/cockpit/themes/dataflow/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/default/rngs/call.rng +1 -0
- data/cockpit/themes/default/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/extended/rngs/call.rng +1 -0
- data/cockpit/themes/extended/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/packed/rngs/call.rng +1 -0
- data/cockpit/themes/packed/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/preset/rngs/call.rng +1 -0
- data/cockpit/themes/preset/rngs/callmanipulate.rng +1 -0
- data/cockpit/themes/reduced/rngs/call.rng +1 -0
- data/cockpit/themes/reduced/rngs/callmanipulate.rng +1 -0
- data/cpee.gemspec +1 -1
- data/lib/cpee/implementation.rb +5 -2
- data/lib/cpee/implementation_properties.rb +7 -7
- data/server/executionhandlers/ruby/connection.rb +15 -10
- data/server/executionhandlers/ruby/execution.rb +2 -1
- data/server/routing/end.pid +1 -1
- data/server/routing/forward-events-00.pid +1 -1
- data/server/routing/forward-votes.pid +1 -1
- data/server/routing/persist.pid +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9526070ed5def28c277c8581f28cac23c3a8f0ec1ac0e7d6e95fe66ed61ad639
|
4
|
+
data.tar.gz: 2a1f76601b0afe5c52d50f0d0c4805db1339f977b31f56d8e442d144b0344f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3789d2bf18a604d52c89cdffa210f2294fb089993eeab142ddb5d6c17f613c1f2c13f3c327d525e78d1889ce84f840d6744d3a731dc5a979e76267d8e7963624
|
7
|
+
data.tar.gz: 666024df8c6e900bec39b07604a906a83929a1f1f4c04c4888a8ef7511d41ad878aa4271d6d91cf64ff636de8c7254008d85fa544436785e01c33c1f6b8bddd7
|
data/cockpit/js/details.js
CHANGED
@@ -29,22 +29,36 @@ $(document).ready(function() {
|
|
29
29
|
|
30
30
|
function do_main_save() { //{{{
|
31
31
|
if (save['details'].has_changed()) {
|
32
|
-
do_main_work();
|
32
|
+
do_main_work(save['details_target'].svgid);
|
33
33
|
}
|
34
34
|
} //}}}
|
35
35
|
|
36
|
-
function do_main_work() { //{{{
|
37
|
-
var svgid = save['details_target'].svgid;
|
36
|
+
function do_main_work(svgid) { //{{{
|
38
37
|
var desc = save['details_target'].model;
|
39
38
|
var node = desc.get_node_by_svg_id(svgid);
|
40
39
|
var orignode = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]');
|
41
40
|
var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
|
42
41
|
|
43
42
|
var url = $('body').attr('current-instance');
|
44
|
-
save['details'].set_checkpoint();
|
45
43
|
|
46
|
-
var nnew
|
47
|
-
|
44
|
+
var nnew;
|
45
|
+
if (svgid != save['details_target'].svgid ) {
|
46
|
+
let tn = desc.get_node_by_svg_id(svgid).get(0);
|
47
|
+
let rng = desc.elements[$(tn).attr('svg-subtype')].clone();
|
48
|
+
if (save['endpoints_cache'][$(tn).attr('endpoint')] && save['endpoints_cache'][$(tn).attr('endpoint')].schema) {
|
49
|
+
let schema = save['endpoints_cache'][$(tn).attr('endpoint')].schema.documentElement;
|
50
|
+
$(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
|
51
|
+
}
|
52
|
+
if (save['endpoints_list'][$(tn).attr('endpoint')] && (!save['endpoints_list'][$(tn).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(tn).attr('endpoint')].match(/^https?-/))) {
|
53
|
+
$(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
|
54
|
+
}
|
55
|
+
let rngw = new RelaxNGui(rng,$('#relaxngworker'),desc.context_eval);
|
56
|
+
nnew = $(rngw.save().documentElement);
|
57
|
+
} else {
|
58
|
+
save['details'].set_checkpoint();
|
59
|
+
nnew = $(save['details'].save().documentElement);
|
60
|
+
}
|
61
|
+
nnew.attr('svg-id',svgid);
|
48
62
|
|
49
63
|
if ($('*[svg-id]',node).length > 0) {
|
50
64
|
nnew.append(node.children().filter(function(){ return this.attributes['svg-id'] != undefined; }));
|
@@ -54,8 +68,6 @@ function do_main_work() { //{{{
|
|
54
68
|
nnew[0].removeAttribute('xmlns');
|
55
69
|
}
|
56
70
|
|
57
|
-
parameters_changed
|
58
|
-
|
59
71
|
node.replaceWith(nnew);
|
60
72
|
|
61
73
|
var ttarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
|
@@ -82,7 +94,7 @@ function do_main_work() { //{{{
|
|
82
94
|
|
83
95
|
if (newtype != origtype) {
|
84
96
|
manifestation.update_details(svgid);
|
85
|
-
do_main_work();
|
97
|
+
do_main_work(svgid);
|
86
98
|
} else {
|
87
99
|
$.ajax({
|
88
100
|
type: "PUT",
|
@@ -3,61 +3,29 @@
|
|
3
3
|
<executionhandler>ruby</executionhandler>
|
4
4
|
<dataelements/>
|
5
5
|
<endpoints>
|
6
|
-
<subprocess>https-post://
|
6
|
+
<subprocess>https-post://echo.bpm.in.tum.de/flow/start/url/</subprocess>
|
7
|
+
<user>https-post://cpee.org/services/timeout-user.php</user>
|
8
|
+
<auto>https-post://cpee.org/services/timeout-auto.php</auto>
|
7
9
|
<timeout>https://cpee.org/services/timeout.php</timeout>
|
10
|
+
<send>https-post://cpee.org/ing/correlators/message/send/</send>
|
11
|
+
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
8
12
|
</endpoints>
|
9
13
|
<attributes>
|
14
|
+
<guarded>none</guarded>
|
10
15
|
<info>Subprocess</info>
|
11
|
-
<creator>Christine Ashcreek</creator>
|
12
|
-
<author>Christine Ashcreek</author>
|
13
16
|
<modeltype>CPEE</modeltype>
|
14
|
-
<
|
17
|
+
<theme>extended</theme>
|
18
|
+
<creator>Christine Ashcreek</creator>
|
15
19
|
<guarded_id/>
|
20
|
+
<author>Christine Ashcreek</author>
|
16
21
|
<model_uuid>1fc43528-3e4a-40ee-8503-c0ed7e5d883c</model_uuid>
|
17
22
|
<model_version/>
|
18
|
-
<theme>extended</theme>
|
19
|
-
<design_dir>Templates.dir</design_dir>
|
20
23
|
<design_stage>development</design_stage>
|
24
|
+
<design_dir>Templates.dir</design_dir>
|
21
25
|
</attributes>
|
22
26
|
<description>
|
23
27
|
<description xmlns="http://cpee.org/ns/description/1.0">
|
24
|
-
<
|
25
|
-
<parameters>
|
26
|
-
<label>Wait</label>
|
27
|
-
<method>:post</method>
|
28
|
-
<arguments>
|
29
|
-
<timeout>2</timeout>
|
30
|
-
</arguments>
|
31
|
-
</parameters>
|
32
|
-
<annotations>
|
33
|
-
<_generic/>
|
34
|
-
<_timing>
|
35
|
-
<_timing_weight/>
|
36
|
-
<_timing_avg/>
|
37
|
-
<explanations/>
|
38
|
-
</_timing>
|
39
|
-
<_shifting>
|
40
|
-
<_shifting_type>Duration</_shifting_type>
|
41
|
-
</_shifting>
|
42
|
-
<_context_data_analysis>
|
43
|
-
<probes/>
|
44
|
-
<ips/>
|
45
|
-
</_context_data_analysis>
|
46
|
-
<report>
|
47
|
-
<url/>
|
48
|
-
</report>
|
49
|
-
<_notes>
|
50
|
-
<_notes_general/>
|
51
|
-
</_notes>
|
52
|
-
</annotations>
|
53
|
-
<documentation>
|
54
|
-
<input/>
|
55
|
-
<output/>
|
56
|
-
<implementation>
|
57
|
-
<description/>
|
58
|
-
</implementation>
|
59
|
-
</documentation>
|
60
|
-
</call>
|
28
|
+
<manipulate id="a3" label="">data.start = Time.now.to_f</manipulate>
|
61
29
|
<call id="a1" endpoint="subprocess">
|
62
30
|
<parameters>
|
63
31
|
<label>Create Sub</label>
|
@@ -74,7 +42,10 @@
|
|
74
42
|
</parameters>
|
75
43
|
<code>
|
76
44
|
<prepare/>
|
77
|
-
<finalize output="result">data.res = result
|
45
|
+
<finalize output="result">data.res = result
|
46
|
+
data.substart = result['start'].to_f - data.start.to_f
|
47
|
+
data.subend = result['end'].to_f - data.start.to_f
|
48
|
+
data.duration = Time.now.to_f - data.start.to_f</finalize>
|
78
49
|
<update output="result"/>
|
79
50
|
<rescue output="result"/>
|
80
51
|
</code>
|
@@ -110,6 +81,7 @@
|
|
110
81
|
</code>
|
111
82
|
</documentation>
|
112
83
|
</call>
|
84
|
+
<stop id="a2"/>
|
113
85
|
</description>
|
114
86
|
</description>
|
115
87
|
<transformation>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
|
+
"guarded": "none",
|
2
3
|
"info": "Subprocess",
|
3
|
-
"creator": "Christine Ashcreek",
|
4
|
-
"author": "Christine Ashcreek",
|
5
4
|
"modeltype": "CPEE",
|
6
|
-
"
|
5
|
+
"theme": "extended",
|
6
|
+
"creator": "Christine Ashcreek",
|
7
7
|
"guarded_id": "",
|
8
|
+
"author": "Christine Ashcreek",
|
8
9
|
"model_uuid": "1fc43528-3e4a-40ee-8503-c0ed7e5d883c",
|
9
10
|
"model_version": "",
|
10
|
-
"
|
11
|
-
"design_dir": "Templates.dir"
|
12
|
-
"design_stage": "development"
|
11
|
+
"design_stage": "development",
|
12
|
+
"design_dir": "Templates.dir"
|
13
13
|
}
|
data/cockpit/templates/Wait.xml
CHANGED
@@ -7,29 +7,37 @@
|
|
7
7
|
<subprocess>https://cpee.org/flow/start/url/</subprocess>
|
8
8
|
</endpoints>
|
9
9
|
<attributes>
|
10
|
+
<guarded>none</guarded>
|
10
11
|
<info>Wait</info>
|
11
|
-
<creator>Christine Ashcreek</creator>
|
12
|
-
<author>Christine Ashcreek</author>
|
13
12
|
<modeltype>CPEE</modeltype>
|
14
|
-
<
|
13
|
+
<theme>extended</theme>
|
14
|
+
<creator>Christine Ashcreek</creator>
|
15
15
|
<guarded_id/>
|
16
|
+
<author>Christine Ashcreek</author>
|
16
17
|
<model_uuid>c92d0c0b-8bbd-40dd-baad-01c5616dfceb</model_uuid>
|
17
18
|
<model_version/>
|
18
|
-
<theme>extended</theme>
|
19
19
|
<design_dir>Templates.dir</design_dir>
|
20
20
|
<design_stage>development</design_stage>
|
21
21
|
</attributes>
|
22
22
|
<description>
|
23
23
|
<description xmlns="http://cpee.org/ns/description/1.0">
|
24
|
+
<manipulate id="a2" label="Measure Start">data.start = Time.now.to_f</manipulate>
|
24
25
|
<call id="a1" endpoint="timeout">
|
25
26
|
<parameters>
|
26
27
|
<label>Wait</label>
|
27
28
|
<method>:post</method>
|
28
29
|
<arguments>
|
29
|
-
<timeout>
|
30
|
+
<timeout>1</timeout>
|
30
31
|
</arguments>
|
31
32
|
</parameters>
|
33
|
+
<code>
|
34
|
+
<prepare/>
|
35
|
+
<finalize output="result">data.end = Time.now.to_f</finalize>
|
36
|
+
<update output="result"/>
|
37
|
+
<rescue output="result"/>
|
38
|
+
</code>
|
32
39
|
<annotations>
|
40
|
+
<_generic/>
|
33
41
|
<_timing>
|
34
42
|
<_timing_weight/>
|
35
43
|
<_timing_avg/>
|
@@ -55,6 +63,9 @@
|
|
55
63
|
<implementation>
|
56
64
|
<description/>
|
57
65
|
</implementation>
|
66
|
+
<code>
|
67
|
+
<description/>
|
68
|
+
</code>
|
58
69
|
</documentation>
|
59
70
|
</call>
|
60
71
|
</description>
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.1.
|
3
|
+
s.version = "2.1.78"
|
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."
|
data/lib/cpee/implementation.rb
CHANGED
@@ -87,13 +87,16 @@ module CPEE
|
|
87
87
|
opts[:redis_db_name] ||= 'redis.rdb' # use e.g. /var/lib/redis.rdb for global stuff. Look it up in your redis config
|
88
88
|
|
89
89
|
opts[:libs_preload] ||= ['weel', 'json', 'redis', 'securerandom', 'riddl/client', 'cpee/value_helper', 'cpee/attributes_helper', 'cpee/message', 'cpee/redis', 'cpee/persistence', 'yaml', 'charlock_holmes', 'psych', 'xml/smart', 'ostruct', 'bigdecimal', 'mimemagic', 'cpee-eval-ruby/translation', 'get_process_mem']
|
90
|
+
opts[:libs_preloader] ||= '~/bin/by-server'
|
91
|
+
opts[:libs_preloaderrun] ||= '~/bin/by'
|
90
92
|
|
91
93
|
CPEE::redis_connect opts, 'Server Main'
|
92
94
|
|
93
95
|
### start by server
|
94
96
|
if opts[:libs_preload]&.is_a?(Array) && opts[:libs_preload].length > 0
|
95
|
-
puts '(re)starting by-server ...
|
96
|
-
|
97
|
+
puts '(re)starting by-server ...'
|
98
|
+
`pkill -f #{File.basename(opts[:libs_preloader])}`
|
99
|
+
`#{opts[:libs_preloader]} '#{opts[:libs_preload].join("' '")}'`
|
97
100
|
end
|
98
101
|
|
99
102
|
opts[:sse_keepalive_frequency] ||= 10
|
@@ -186,27 +186,27 @@ module CPEE
|
|
186
186
|
end #}}}
|
187
187
|
class Put < Riddl::Implementation #{{{
|
188
188
|
def self::change_first(id,opts,doc)
|
189
|
-
if (node = doc.find('
|
189
|
+
if (node = doc.find('/*/p:status')).any?
|
190
190
|
CPEE::Properties::PutStatus::set id, opts, node.first.dump
|
191
191
|
end
|
192
|
-
if (node = doc.find('
|
192
|
+
if (node = doc.find('/*/p:executionhandler')).any?
|
193
193
|
CPEE::Properties::PutExecutionHandler::set id, opts, node.first.text, false
|
194
194
|
end
|
195
195
|
|
196
196
|
%w{dataelements endpoints attributes}.each do |item|
|
197
|
-
if (node = doc.find('
|
197
|
+
if (node = doc.find('/*/p:' + item)).any?
|
198
198
|
CPEE::Properties::PutItems::set item, id, opts, node.first.dump
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
-
if (node = doc.find('
|
202
|
+
if (node = doc.find('/*/p:transformation')).any?
|
203
203
|
CPEE::Properties::PutTransformation::set id, opts, node.first.dump
|
204
204
|
end
|
205
|
-
if (node = doc.find('
|
205
|
+
if (node = doc.find('/*/p:description/*')).any?
|
206
206
|
CPEE::Properties::PutDescription::set id, opts, node.first.dump
|
207
207
|
end
|
208
208
|
|
209
|
-
if (node = doc.find('
|
209
|
+
if (node = doc.find('/*/p:positions')).any?
|
210
210
|
if node.first.find('p:*').any?
|
211
211
|
CPEE::Properties::PutPositions::set id, opts, node.first.dump
|
212
212
|
end
|
@@ -215,7 +215,7 @@ module CPEE
|
|
215
215
|
end
|
216
216
|
|
217
217
|
def self::change_last(id,opts,doc)
|
218
|
-
if (node = doc.find('
|
218
|
+
if (node = doc.find('/*/p:state')).any?
|
219
219
|
CPEE::Properties::PutState::run id, opts, node.first.text
|
220
220
|
end
|
221
221
|
end
|
@@ -158,20 +158,25 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
158
158
|
a[k_ht] = headers[hname] if headers[hname]
|
159
159
|
end
|
160
160
|
end
|
161
|
-
params.
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
161
|
+
p = params.find{|p| p.name == k }
|
162
|
+
if p.nil?
|
163
|
+
p = Riddl::Parameter::Simple.new(k,'{}')
|
164
|
+
params << p
|
165
|
+
end
|
166
|
+
|
167
|
+
if a.is_a? String
|
168
|
+
p.value = a
|
169
|
+
elsif a.is_a? Hash
|
170
|
+
ohash = JSON::parse(p.value) rescue {}
|
171
|
+
ohash.merge!(a)
|
172
|
+
p.value = JSON.generate(ohash)
|
171
173
|
end
|
172
174
|
end
|
173
175
|
end
|
174
176
|
end
|
177
|
+
|
178
|
+
order = { 'behavior' => 1, 'url' => 2, 'init' => 3, 'endpoints' => 4, 'attributes' => 5, 'customization' => 6 }
|
179
|
+
params.sort!{|a,b| order[a.name].to_i <=> order[b.name].to_i }
|
175
180
|
end
|
176
181
|
else
|
177
182
|
@handler_endpoint = @handler_endpoint_orig
|
@@ -55,12 +55,13 @@ module CPEE
|
|
55
55
|
end
|
56
56
|
template = ERB.new(File.read(ExecutionHandler::Ruby::BACKEND_TEMPLATE), trim_mode: '-')
|
57
57
|
res = template.result_with_hash(dsl: dsl, dataelements: dataelements, endpoints: endpoints, positions: positions)
|
58
|
+
pp dataelements
|
58
59
|
File.write(File.join(opts[:instances],id.to_s,ExecutionHandler::Ruby::BACKEND_INSTANCE),res)
|
59
60
|
end
|
60
61
|
|
61
62
|
def self::run(id,opts)
|
62
63
|
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Ruby::BACKEND_RUN))
|
63
|
-
pid = Kernel.spawn(exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
|
64
|
+
pid = Kernel.spawn(opts[:libs_preloaderrun] + ' ' + exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
|
64
65
|
Process.detach pid
|
65
66
|
File.write(exe + '.pid',pid)
|
66
67
|
end
|
data/server/routing/end.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
55683
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
55702
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
55696
|
data/server/routing/persist.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
55689
|
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.78
|
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: 2025-02-
|
13
|
+
date: 2025-02-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|