cpee 2.1.56 → 2.1.57
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/cockpit/css/resources-label.css +33 -32
- data/cockpit/css/resources-svg.css +2 -2
- data/cockpit/css/ui.css +2 -42
- data/cockpit/css/wfadaptor.css +9 -0
- data/cockpit/edit.html +15 -2
- data/cockpit/graph.html +12 -1
- data/cockpit/index.html +14 -1
- data/cockpit/js/details.js +1 -0
- data/cockpit/js/instance.js +29 -13
- data/cockpit/js/resources.js +59 -11
- data/cockpit/js/wfadaptor.js +10 -6
- data/cockpit/model.html +3 -2
- data/cockpit/themes/base.js +1506 -0
- data/cockpit/themes/compact/rngs/start.rng +10 -0
- data/cockpit/themes/compact/symbols/start_event.svg +1 -1
- data/cockpit/themes/compact/theme.js +8 -1487
- data/cockpit/themes/control/rngs/start.rng +10 -0
- data/cockpit/themes/control/symbols/start_event.svg +1 -1
- data/cockpit/themes/control/theme.js +277 -1334
- data/cockpit/themes/dataflow/rngs/start.rng +10 -0
- data/cockpit/themes/dataflow/symbols/start_event.svg +1 -1
- data/cockpit/themes/dataflow/theme.js +144 -1563
- data/cockpit/themes/default/rngs/start.rng +10 -0
- data/cockpit/themes/default/symbols/start_event.svg +1 -1
- data/cockpit/themes/default/theme.js +1 -1493
- data/cockpit/themes/extended/rngs/start.rng +10 -0
- data/cockpit/themes/extended/symbols/start_event.svg +1 -1
- data/cockpit/themes/extended/theme.js +81 -1529
- data/cockpit/themes/felix/symbols/start_event.svg +1 -1
- data/cockpit/themes/felix/theme.js +68 -1528
- data/cockpit/themes/model/symbols/start_event.svg +1 -1
- data/cockpit/themes/model/theme.js +735 -1383
- data/cockpit/themes/packed/rngs/start.rng +10 -0
- data/cockpit/themes/packed/symbols/start_event.svg +1 -1
- data/cockpit/themes/packed/theme.js +9 -1487
- data/cockpit/themes/preset/rngs/start.rng +10 -0
- data/cockpit/themes/preset/symbols/start_event.svg +1 -1
- data/cockpit/themes/preset/theme.js +1 -1493
- data/cockpit/track.html +11 -0
- data/cpee.gemspec +1 -1
- data/lib/properties/executionhandler.rng +1 -1
- data/lib/properties.xml +1 -1
- data/server/executionhandlers/ruby/connection.rb +8 -11
- data/server/executionhandlers/rust/backend/README.md +17 -0
- data/server/executionhandlers/rust/backend/compile.sh +5 -0
- data/server/executionhandlers/rust/backend/opts.yaml +6 -0
- data/server/executionhandlers/rust/execution.rb +84 -0
- 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 +8 -3
data/cockpit/track.html
CHANGED
@@ -57,6 +57,7 @@
|
|
57
57
|
<script type="text/javascript" src="js/track.js"></script>
|
58
58
|
<script type="text/javascript" src="js/modifiers.js"></script>
|
59
59
|
<script type="text/javascript" src="js/resources.js"></script>
|
60
|
+
<script type="text/javascript" src="themes/base.js"></script>
|
60
61
|
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
61
62
|
<link rel="stylesheet" href="css/resources-label.css" type="text/css"/>
|
62
63
|
<link rel="stylesheet" href="css/resources-svg.css" type="text/css" data-include-export="true"/>
|
@@ -64,6 +65,16 @@
|
|
64
65
|
</head>
|
65
66
|
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
|
66
67
|
<div class='hidden' id='relaxngworker'></div>
|
68
|
+
<template id="label">
|
69
|
+
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: 0; left: 0;" class="displaylabel">
|
70
|
+
<g transform="translate(1 %%1) rotate(-%%2)">
|
71
|
+
<rect class="displaylabel" width="200" height="14" x="8" y="0" rx="5" ry="5"/>
|
72
|
+
<path class="displaylabel" d="M10,13 0,13 8,8"/>
|
73
|
+
<path class="displaylabelinner" d="M10,11.5 8.5,11.5 8.5,9.5 10,9.5"/>
|
74
|
+
<text class="label" x="18" y="10">aaaa</text>
|
75
|
+
</g>
|
76
|
+
</svg>
|
77
|
+
</template>
|
67
78
|
<div id="trackfull">
|
68
79
|
<div id='graphcolumn'>
|
69
80
|
<div id="trackusage">
|
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.57"
|
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.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
|
data/lib/properties.xml
CHANGED
@@ -142,8 +142,6 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
142
142
|
@handler_passthrough = callback
|
143
143
|
@controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
144
144
|
|
145
|
-
pp params
|
146
|
-
|
147
145
|
status, result, headers = client.request type => params
|
148
146
|
@guard_files += result
|
149
147
|
|
@@ -389,24 +387,23 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
389
387
|
|
390
388
|
def callback(result=nil,options={})
|
391
389
|
recv = structurize_result(result)
|
392
|
-
|
393
|
-
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv, :annotations => @anno)
|
394
|
-
end
|
395
|
-
@guard_files += result
|
390
|
+
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv, :annotations => @anno)
|
396
391
|
|
397
|
-
@
|
392
|
+
@guard_files += result
|
398
393
|
|
399
|
-
@handler_returnOptions = options
|
400
394
|
if options['CPEE_INSTANTIATION']
|
401
395
|
@controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(options['CPEE_INSTANTIATION']))
|
402
396
|
end
|
403
397
|
if options['CPEE_EVENT']
|
404
398
|
@controller.notify("task/#{options['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv)
|
399
|
+
else
|
400
|
+
@handler_returnValue = simplify_result(result)
|
401
|
+
@handler_returnOptions = options
|
402
|
+
end
|
403
|
+
if options['CPEE_STATUS']
|
404
|
+
@controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_STATUS'])
|
405
405
|
end
|
406
406
|
if options['CPEE_UPDATE']
|
407
|
-
if options['CPEE_UPDATE_STATUS']
|
408
|
-
@controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
|
409
|
-
end
|
410
407
|
@handler_continue.continue WEEL::Signal::Again
|
411
408
|
else
|
412
409
|
@controller.cancel_callback(@handler_passthrough)
|
@@ -0,0 +1,17 @@
|
|
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 ;-)
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# This file is part of CPEE.
|
2
|
+
#
|
3
|
+
# CPEE is free software: you can redistribute it and/or modify it under the terms
|
4
|
+
# of the GNU General Public License as published by the Free Software Foundation,
|
5
|
+
# either version 3 of the License, or (at your option) any later version.
|
6
|
+
#
|
7
|
+
# CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
8
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
9
|
+
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
10
|
+
#
|
11
|
+
# You should have received a copy of the GNU General Public License along with
|
12
|
+
# CPEE (file COPYING in the main directory). If not, see
|
13
|
+
# <http://www.gnu.org/licenses/>.
|
14
|
+
|
15
|
+
module CPEE
|
16
|
+
|
17
|
+
module ExecutionHandler
|
18
|
+
|
19
|
+
module Rust
|
20
|
+
BACKEND_INSTANCE = 'instance.rs'
|
21
|
+
BACKEND_OPTS = 'opts.yaml'
|
22
|
+
BACKEND_COMPILE = File.expand_path(File.join(__dir__,'backend','compile.sh'))
|
23
|
+
BACKEND_RUN = File.expand_path(File.join(__dir__,'backend','run'))
|
24
|
+
|
25
|
+
def self::dslx_to_dsl(dslx) # transpile
|
26
|
+
'hello world'
|
27
|
+
end
|
28
|
+
|
29
|
+
def self::prepare(id,opts) # write result to disk
|
30
|
+
Dir.mkdir(File.join(opts[:instances],id.to_s)) rescue nil
|
31
|
+
FileUtils.copy(ExecutionHandler::Rust::BACKEND_COMPILE,File.join(opts[:instances],id.to_s))
|
32
|
+
dsl = CPEE::Persistence::extract_item(id,opts,'dsl')
|
33
|
+
hw = CPEE::Persistence::extract_item(id,opts,'executionhandler')
|
34
|
+
endpoints = CPEE::Persistence::extract_list(id,opts,'endpoints').to_h
|
35
|
+
dataelements = CPEE::Persistence::extract_list(id,opts,'dataelements').to_h
|
36
|
+
attributes = CPEE::Persistence::extract_list(id,opts,'attributes').to_h
|
37
|
+
positions = CPEE::Persistence::extract_set(id,opts,'positions')
|
38
|
+
positions.map! do |k, v|
|
39
|
+
[ k, v, CPEE::Persistence::extract_item(id,opts,File.join('positions',k,'@passthrough')) ]
|
40
|
+
end
|
41
|
+
File.open(File.join(opts[:instances],id.to_s,ExecutionHandler::Rust::BACKEND_OPTS),'w') do |f|
|
42
|
+
YAML::dump({
|
43
|
+
:host => opts[:host],
|
44
|
+
:url => opts[:url],
|
45
|
+
:redis_url => opts[:redis_url],
|
46
|
+
:redis_path => File.join(opts[:basepath],opts[:redis_path]),
|
47
|
+
:redis_db => opts[:redis_db],
|
48
|
+
:workers => opts[:workers],
|
49
|
+
:global_executionhandlers => opts[:global_executionhandlers],
|
50
|
+
:executionhandlers => opts[:executionhandlers],
|
51
|
+
:executionhandler => hw,
|
52
|
+
:endpoints => endpoints,
|
53
|
+
:dataelements => dataelements,
|
54
|
+
:positions => positions,
|
55
|
+
:attributes => attributes
|
56
|
+
},f)
|
57
|
+
end
|
58
|
+
File.write(File.join(opts[:instances],id.to_s,ExecutionHandler::Rust::BACKEND_INSTANCE),dsl)
|
59
|
+
`#{File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Rust::BACKEND_COMPILE))}`
|
60
|
+
end
|
61
|
+
|
62
|
+
def self::run(id,opts)
|
63
|
+
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Rust::BACKEND_RUN))
|
64
|
+
pid = Kernel.spawn(exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
|
65
|
+
Process.detach pid
|
66
|
+
File.write(exe + '.pid',pid)
|
67
|
+
end
|
68
|
+
|
69
|
+
def self::stop(id,opts) ### return: bool to tell if manually changing redis is necessary
|
70
|
+
exe = File.join(opts[:instances],id.to_s,File.basename(ExecutionHandler::Rust::BACKEND_RUN))
|
71
|
+
pid = File.read(exe + '.pid') rescue nil
|
72
|
+
if pid && (Process.kill(0, pid.to_i) rescue false)
|
73
|
+
Process.kill('HUP', pid.to_i) rescue nil
|
74
|
+
false
|
75
|
+
else # its not running, so clean up
|
76
|
+
File.unlink(exe + '.pid') rescue nil
|
77
|
+
true
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
data/server/routing/end.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
10638
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
10657
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
10651
|
data/server/routing/persist.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
10645
|
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.57
|
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-06-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- cockpit/templates/instantiate/Take_Perf.xml
|
259
259
|
- cockpit/templates/instantiate/Take_Sub.xml
|
260
260
|
- cockpit/templates/instantiate/Take_X.xml
|
261
|
+
- cockpit/themes/base.js
|
261
262
|
- cockpit/themes/compact/rngs/alternative.rng
|
262
263
|
- cockpit/themes/compact/rngs/call.rng
|
263
264
|
- cockpit/themes/compact/rngs/callmanipulate.rng
|
@@ -809,6 +810,10 @@ files:
|
|
809
810
|
- server/executionhandlers/ruby/controller.rb
|
810
811
|
- server/executionhandlers/ruby/dsl_to_dslx.xsl
|
811
812
|
- server/executionhandlers/ruby/execution.rb
|
813
|
+
- server/executionhandlers/rust/backend/README.md
|
814
|
+
- server/executionhandlers/rust/backend/compile.sh
|
815
|
+
- server/executionhandlers/rust/backend/opts.yaml
|
816
|
+
- server/executionhandlers/rust/execution.rb
|
812
817
|
- server/resources/empty_dslx.xml
|
813
818
|
- server/resources/notifications/logging/subscription.xml
|
814
819
|
- server/resources/properties.empty
|
@@ -850,7 +855,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
850
855
|
- !ruby/object:Gem::Version
|
851
856
|
version: '0'
|
852
857
|
requirements: []
|
853
|
-
rubygems_version: 3.
|
858
|
+
rubygems_version: 3.5.9
|
854
859
|
signing_key:
|
855
860
|
specification_version: 4
|
856
861
|
summary: Preliminary release of cloud process execution engine (cpee.org). If you
|