cpee 2.0.24 → 2.0.30
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/{templates/.CPEE.xml → CPEE.xml} +1 -1
- data/cockpit/{templates/.Signavio.xml → Signavio.xml} +1 -1
- data/cockpit/css/model.css +1 -1
- data/cockpit/css/ui.css +30 -5
- data/cockpit/css/wfadaptor.css +11 -0
- data/cockpit/edit.html +260 -0
- data/cockpit/graph.html +3 -3
- data/cockpit/index.html +9 -8
- data/cockpit/js/details.js +0 -1
- data/cockpit/js/edit.js +32 -0
- data/cockpit/js/instance.js +51 -35
- data/cockpit/js/model.js +6 -36
- data/cockpit/js/parameters.js +9 -4
- data/cockpit/js/ui.js +7 -0
- data/cockpit/model.html +5 -3
- data/cockpit/replay.html +3 -2
- data/cockpit/templates/Coopis 2010.xml +1 -1
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +1 -1
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +1 -1
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +1 -1
- data/cockpit/templates/Track Test Local.xml +6 -2
- data/cockpit/templates/Track Test.xml +5 -1
- data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +5 -1
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +8 -4
- data/cockpit/templates/UR-VUE 2020 Solution NN.xml +8 -4
- data/cockpit/templates/UR-VUE 2020 Solution View.xml +8 -4
- data/cockpit/templates/UR-VUE 2020.xml +8 -4
- data/cockpit/themes/compact/rngs/call.rng +26 -1
- data/cockpit/themes/compact/rngs/callmanipulate.rng +32 -2
- data/cockpit/themes/compact/rngs/parallel.rng +6 -0
- data/cockpit/themes/compact/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/compact/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/compact/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/compact/theme.js +102 -27
- data/cockpit/themes/control/rngs/call.rng +26 -1
- data/cockpit/themes/control/rngs/callmanipulate.rng +32 -2
- data/cockpit/themes/control/rngs/parallel.rng +6 -0
- data/cockpit/themes/control/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/control/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/control/theme.js +95 -21
- data/cockpit/themes/default/rngs/call.rng +26 -1
- data/cockpit/themes/default/rngs/callmanipulate.rng +32 -2
- data/cockpit/themes/default/rngs/parallel.rng +6 -0
- data/cockpit/themes/default/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/default/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/default/theme.js +94 -20
- data/cockpit/themes/extended/rngs/call.rng +26 -1
- data/cockpit/themes/extended/rngs/callmanipulate.rng +32 -2
- data/cockpit/themes/extended/rngs/parallel.rng +6 -0
- data/cockpit/themes/extended/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/extended/theme.js +95 -21
- data/cockpit/themes/model/rngs/call.rng +21 -20
- data/cockpit/themes/model/rngs/callmanipulate.rng +23 -22
- data/cockpit/themes/model/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/model/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/model/theme.js +96 -22
- data/cockpit/themes/packed/rngs/call.rng +26 -1
- data/cockpit/themes/packed/rngs/callmanipulate.rng +32 -2
- data/cockpit/themes/packed/rngs/parallel.rng +6 -0
- data/cockpit/themes/packed/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/packed/theme.js +95 -21
- data/cockpit/themes/preset/rngs/call.rng +26 -1
- data/cockpit/themes/preset/rngs/callmanipulate.rng +32 -2
- data/cockpit/themes/preset/rngs/parallel.rng +6 -0
- data/cockpit/themes/preset/symbols/parallel_branch_event.svg +2 -2
- data/cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/preset/theme.js +94 -20
- data/cockpit/track.html +3 -3
- data/cockpit/{templates/.transformations.xml → transformations.xml} +0 -0
- data/cpee.gemspec +3 -3
- data/lib/callbacks.xml +5 -0
- data/lib/cpee/controller.rb +30 -28
- data/lib/cpee/implementation_callbacks.rb +60 -0
- data/lib/cpee/implementation_notifications.rb +6 -2
- data/server/handlerwrappers/default.rb +19 -3
- data/server/resources/transformation_dslx.xsl +5 -1
- data/server/routing/end.pid +1 -1
- data/server/routing/end.rb +1 -0
- data/server/routing/forward-events.pid +1 -1
- data/server/routing/forward-votes.pid +1 -1
- data/server/routing/forward-votes.rb +6 -5
- data/server/routing/persist.pid +1 -1
- data/server/routing/persist.rb +4 -4
- data/server/server.pid +1 -1
- metadata +24 -58
- data/cockpit/edit.html +0 -1
- data/cockpit/templates/.templates.xml +0 -13
- data/cockpit/themes/diana/rngs/alternative.rng +0 -25
- data/cockpit/themes/diana/rngs/call.rng +0 -149
- data/cockpit/themes/diana/rngs/callmanipulate.rng +0 -188
- data/cockpit/themes/diana/rngs/choose.rng +0 -14
- data/cockpit/themes/diana/rngs/closed_loop.rng +0 -62
- data/cockpit/themes/diana/rngs/closed_loop_cancel.rng +0 -5
- data/cockpit/themes/diana/rngs/closed_loop_control.rng +0 -31
- data/cockpit/themes/diana/rngs/closed_loop_measuring.rng +0 -12
- data/cockpit/themes/diana/rngs/critical.rng +0 -5
- data/cockpit/themes/diana/rngs/escape.rng +0 -1
- data/cockpit/themes/diana/rngs/group.rng +0 -3
- data/cockpit/themes/diana/rngs/loop.rng +0 -22
- data/cockpit/themes/diana/rngs/manipulate.rng +0 -9
- data/cockpit/themes/diana/rngs/otherwise.rng +0 -22
- data/cockpit/themes/diana/rngs/parallel.rng +0 -21
- data/cockpit/themes/diana/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/diana/rngs/scripts.rng +0 -23
- data/cockpit/themes/diana/rngs/stop.rng +0 -5
- data/cockpit/themes/diana/rngs/terminate.rng +0 -1
- data/cockpit/themes/diana/symbols/alternative.svg +0 -5
- data/cockpit/themes/diana/symbols/arrow.svg +0 -3
- data/cockpit/themes/diana/symbols/call.svg +0 -6
- data/cockpit/themes/diana/symbols/callmanipulate.svg +0 -8
- data/cockpit/themes/diana/symbols/choose.svg +0 -5
- data/cockpit/themes/diana/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/diana/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/diana/symbols/closed_loop.svg +0 -5
- data/cockpit/themes/diana/symbols/closed_loop_cancel.svg +0 -5
- data/cockpit/themes/diana/symbols/closed_loop_control.svg +0 -5
- data/cockpit/themes/diana/symbols/closed_loop_measuring.svg +0 -6
- data/cockpit/themes/diana/symbols/complex.svg +0 -8
- data/cockpit/themes/diana/symbols/critical.svg +0 -4
- data/cockpit/themes/diana/symbols/end.svg +0 -3
- data/cockpit/themes/diana/symbols/escape.svg +0 -5
- data/cockpit/themes/diana/symbols/event_end.svg +0 -3
- data/cockpit/themes/diana/symbols/loop.svg +0 -5
- data/cockpit/themes/diana/symbols/manipulate.svg +0 -4
- data/cockpit/themes/diana/symbols/otherwise.svg +0 -5
- data/cockpit/themes/diana/symbols/parallel.svg +0 -5
- data/cockpit/themes/diana/symbols/parallel_branch.svg +0 -5
- data/cockpit/themes/diana/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/diana/symbols/parallel_branch_event.svg +0 -14
- data/cockpit/themes/diana/symbols/parallel_branch_normal.svg +0 -5
- data/cockpit/themes/diana/symbols/scripts.svg +0 -4
- data/cockpit/themes/diana/symbols/start.svg +0 -3
- data/cockpit/themes/diana/symbols/stop.svg +0 -5
- data/cockpit/themes/diana/symbols/terminate.svg +0 -4
- data/cockpit/themes/diana/theme.js +0 -1650
data/cockpit/track.html
CHANGED
@@ -37,11 +37,11 @@
|
|
37
37
|
|
38
38
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
39
39
|
|
40
|
-
<script type="text/javascript" src="/js_libs/
|
40
|
+
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
41
41
|
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
42
42
|
|
43
43
|
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
44
|
-
<link rel="stylesheet" href="/js_libs/
|
44
|
+
<link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
|
45
45
|
|
46
46
|
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
47
47
|
|
@@ -58,7 +58,7 @@
|
|
58
58
|
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
59
59
|
<link rel="stylesheet" href="css/track.css" type="text/css"/>
|
60
60
|
</head>
|
61
|
-
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui">
|
61
|
+
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
|
62
62
|
<div class='hidden' id='relaxngworker'></div>
|
63
63
|
<div id="trackfull">
|
64
64
|
<div id='graphcolumn'>
|
File without changes
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.0.
|
3
|
+
s.version = "2.0.30"
|
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."
|
@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.homepage = 'http://cpee.org/'
|
23
23
|
|
24
24
|
s.add_runtime_dependency 'riddl', '~> 0.108'
|
25
|
-
s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.
|
25
|
+
s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.98'
|
26
26
|
s.add_runtime_dependency 'highline', '~> 2.0'
|
27
27
|
s.add_runtime_dependency 'json', '~>2.1'
|
28
28
|
s.add_runtime_dependency 'redis', '~> 4.1'
|
29
|
-
s.add_runtime_dependency 'rubyzip', '~>
|
29
|
+
s.add_runtime_dependency 'rubyzip', '~>2'
|
30
30
|
end
|
data/lib/callbacks.xml
CHANGED
@@ -20,11 +20,16 @@
|
|
20
20
|
<xi:include href="callbacks/callbacks.rng"/>
|
21
21
|
</parameter>
|
22
22
|
</message>
|
23
|
+
<message name="callback">
|
24
|
+
<parameter name="callback" mimetype="application/json"/>
|
25
|
+
</message>
|
23
26
|
|
24
27
|
<resource>
|
25
28
|
<doc:documentation>xb</doc:documentation>
|
26
29
|
<get in="*" out="callbacks"/>
|
27
30
|
<resource>
|
31
|
+
<get out="callback"/>
|
32
|
+
<delete/>
|
28
33
|
<put in="*"/>
|
29
34
|
</resource>
|
30
35
|
</resource>
|
data/lib/cpee/controller.rb
CHANGED
@@ -52,6 +52,34 @@ module CPEE
|
|
52
52
|
@opts = opts
|
53
53
|
@instance = nil
|
54
54
|
@loop_guard = {}
|
55
|
+
|
56
|
+
@callback_keys = {}
|
57
|
+
@psredis = @opts[:redis_dyn].call
|
58
|
+
|
59
|
+
Thread.new do
|
60
|
+
@psredis.psubscribe('callback-response:*','callback-end:*') do |on|
|
61
|
+
on.pmessage do |pat, what, message|
|
62
|
+
if pat == 'callback-response:*' && @callback_keys.has_key?(what[18..-1])
|
63
|
+
index = message.index(' ')
|
64
|
+
mess = message[index+1..-1]
|
65
|
+
instance = message[0...index]
|
66
|
+
m = JSON.parse(mess)
|
67
|
+
resp = []
|
68
|
+
m['content']['values'].each do |e|
|
69
|
+
if e[1][0] == 'simple'
|
70
|
+
resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
|
71
|
+
elsif e[1][0] == 'complex'
|
72
|
+
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],File.open(e[1][2]))
|
73
|
+
end
|
74
|
+
end
|
75
|
+
@callback_keys[what[18..-1]].send(:callback,resp,m['content']['headers'])
|
76
|
+
end
|
77
|
+
if pat == 'callback-end:*'
|
78
|
+
@callback_keys.delete(what[13..-1])
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
55
83
|
end
|
56
84
|
|
57
85
|
attr_reader :id
|
@@ -139,7 +167,7 @@ module CPEE
|
|
139
167
|
@votes += votes
|
140
168
|
psredis = @opts[:redis_dyn].call
|
141
169
|
collect = []
|
142
|
-
psredis.subscribe(votes.map{|e| ['vote-response:' + e.to_s
|
170
|
+
psredis.subscribe(votes.map{|e| ['vote-response:' + e.to_s] }.flatten) do |on|
|
143
171
|
on.message do |what, message|
|
144
172
|
index = message.index(' ')
|
145
173
|
mess = message[index+1..-1]
|
@@ -160,33 +188,7 @@ module CPEE
|
|
160
188
|
|
161
189
|
def callback(hw,key,content)
|
162
190
|
CPEE::Message::send(:callback,'activity/content',base,@id,uuid,info,content.merge(:key => key),@redis)
|
163
|
-
|
164
|
-
psredis = @opts[:redis_dyn].call
|
165
|
-
response = nil
|
166
|
-
Thread.new do
|
167
|
-
psredis.subscribe('callback-response:' + key, 'callback-end:' + key) do |on|
|
168
|
-
on.message do |what, message|
|
169
|
-
if what == 'callback-response:' + key
|
170
|
-
index = message.index(' ')
|
171
|
-
mess = message[index+1..-1]
|
172
|
-
instance = message[0...index]
|
173
|
-
m = JSON.parse(mess)
|
174
|
-
resp = []
|
175
|
-
m['content']['values'].each do |e|
|
176
|
-
if e[1][0] == 'simple'
|
177
|
-
resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
|
178
|
-
elsif e[1][0] == 'complex'
|
179
|
-
resp << Riddl::Parameter::Complex.new(e[0],e[1][1],File.open(e[1][2]))
|
180
|
-
end
|
181
|
-
end
|
182
|
-
hw.send(:callback,resp,m['content']['headers'])
|
183
|
-
end
|
184
|
-
if what == 'callback-end:' + key
|
185
|
-
psredis.unsubscribe
|
186
|
-
end
|
187
|
-
end
|
188
|
-
end
|
189
|
-
end
|
191
|
+
@callback_keys[key] = hw
|
190
192
|
end
|
191
193
|
|
192
194
|
def cancel_callback(key)
|
@@ -7,6 +7,8 @@ module CPEE
|
|
7
7
|
Proc.new do
|
8
8
|
run CPEE::Callbacks::Callbacks, id, opts if get
|
9
9
|
on resource do
|
10
|
+
run CPEE::Callbacks::GetCallback, id, opts if get
|
11
|
+
run CPEE::Callbacks::DelCallback, id, opts if delete
|
10
12
|
run CPEE::Callbacks::ExCallback, id, opts if put
|
11
13
|
end
|
12
14
|
end
|
@@ -26,6 +28,64 @@ module CPEE
|
|
26
28
|
ret.to_s
|
27
29
|
end
|
28
30
|
end
|
31
|
+
end # }}}
|
32
|
+
|
33
|
+
class GetCallback < Riddl::Implementation #{{{
|
34
|
+
def response
|
35
|
+
id = @a[0]
|
36
|
+
opts = @a[1]
|
37
|
+
callback = @r[-1]
|
38
|
+
|
39
|
+
if opts[:redis].sismember("instance:#{id}/callbacks",callback)
|
40
|
+
res = {}
|
41
|
+
res[:uuid] = opts[:redis].get("instance:#{id}/callback/#{callback}/uuid")
|
42
|
+
res[:type] = opts[:redis].get("instance:#{id}/callback/#{callback}/type")
|
43
|
+
res[:position] = opts[:redis].get("instance:#{id}/callback/#{callback}/position")
|
44
|
+
res[:label] = opts[:redis].get("instance:#{id}/callback/#{callback}/label")
|
45
|
+
if sub = opts[:redis].get("instance:#{id}/callback/#{callback}/subscription")
|
46
|
+
res[:subscription] = sub
|
47
|
+
end
|
48
|
+
|
49
|
+
Riddl::Parameter::Complex.new("callback","application/json",JSON.generate(res))
|
50
|
+
else
|
51
|
+
@status = 404
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end #}}}
|
55
|
+
|
56
|
+
class DelCallback < Riddl::Implementation #{{{
|
57
|
+
def response
|
58
|
+
id = @a[0]
|
59
|
+
opts = @a[1]
|
60
|
+
callback = @r[-1]
|
61
|
+
|
62
|
+
if opts[:redis].get("instance:#{id}/callback/#{callback}/type") == 'callback'
|
63
|
+
CPEE::Message::send(
|
64
|
+
:'callback-end',
|
65
|
+
callback,
|
66
|
+
opts[:url],
|
67
|
+
id,
|
68
|
+
{},
|
69
|
+
{},
|
70
|
+
{},
|
71
|
+
opts[:redis]
|
72
|
+
)
|
73
|
+
elsif opts[:redis].get("instance:#{id}/callback/#{callback}/type") == 'vote'
|
74
|
+
CPEE::Message::send(
|
75
|
+
:'vote-response',
|
76
|
+
callback,
|
77
|
+
opts[:url],
|
78
|
+
id,
|
79
|
+
{},
|
80
|
+
{},
|
81
|
+
'true',
|
82
|
+
opts[:redis]
|
83
|
+
)
|
84
|
+
else
|
85
|
+
@status = 404
|
86
|
+
end
|
87
|
+
nil
|
88
|
+
end
|
29
89
|
end #}}}
|
30
90
|
|
31
91
|
class ExCallback < Riddl::Implementation #{{{
|
@@ -169,8 +169,12 @@ module CPEE
|
|
169
169
|
conn.psubscribe('forward:*','event:state/change') do |on|
|
170
170
|
on.pmessage do |pat, what, message|
|
171
171
|
if pat == 'forward:*'
|
172
|
-
|
173
|
-
opts.dig(:sse_connections,id.to_i,key)
|
172
|
+
id, key = what.match(/forward:([^\/]+)\/(.+)/).captures
|
173
|
+
if sse = opts.dig(:sse_connections,id.to_i,key)
|
174
|
+
sse.send message
|
175
|
+
else
|
176
|
+
DeleteSubscription::set(id,opts,key)
|
177
|
+
end
|
174
178
|
elsif pat == 'event:state/change'
|
175
179
|
mess = JSON.parse(message[message.index(' ')+1..-1])
|
176
180
|
state = mess.dig('content','state')
|
@@ -50,6 +50,8 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
50
50
|
@handler_returnOptions = nil
|
51
51
|
@handler_activity_uuid = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
52
52
|
@label = ''
|
53
|
+
@guard_files = []
|
54
|
+
@guard_items = []
|
53
55
|
end # }}}
|
54
56
|
|
55
57
|
def prepare(readonly, endpoints, parameters, replay=false) #{{{
|
@@ -70,6 +72,10 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
70
72
|
params
|
71
73
|
end #}}}
|
72
74
|
|
75
|
+
def additional #{{{
|
76
|
+
{ :attributes => @controller.attributes }
|
77
|
+
end #}}}
|
78
|
+
|
73
79
|
def proto_curl(parameters) #{{{
|
74
80
|
params = []
|
75
81
|
callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
@@ -109,8 +115,8 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
109
115
|
|
110
116
|
client = Riddl::Client.new(tendpoint)
|
111
117
|
|
112
|
-
@controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
113
118
|
@handler_passthrough = callback
|
119
|
+
@controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
114
120
|
|
115
121
|
status, result, headers = client.request type => params
|
116
122
|
if status < 200 || status >= 300
|
@@ -261,8 +267,8 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
261
267
|
|
262
268
|
def callback(result=nil,options={})
|
263
269
|
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
|
264
|
-
|
265
|
-
@handler_returnValue = result
|
270
|
+
@guard_files += result
|
271
|
+
@handler_returnValue = simplify_result(result)
|
266
272
|
@handler_returnOptions = options
|
267
273
|
if options['CPEE_UPDATE']
|
268
274
|
if options['CPEE_UPDATE_STATUS']
|
@@ -280,6 +286,16 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
280
286
|
end
|
281
287
|
end
|
282
288
|
|
289
|
+
def mem_guard() #{{{
|
290
|
+
@guard_files.each do |p|
|
291
|
+
if p&.respond_to?(:close)
|
292
|
+
p.close
|
293
|
+
elsif p&.value&.respond_to?(:close)
|
294
|
+
p.value.close
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end #}}}
|
298
|
+
|
283
299
|
def test_condition(mr,code)
|
284
300
|
res = mr.instance_eval(code)
|
285
301
|
@controller.notify("condition/eval", :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"))
|
@@ -114,6 +114,10 @@
|
|
114
114
|
<xsl:if test="@wait">
|
115
115
|
<xsl:text> :wait => </xsl:text>
|
116
116
|
<xsl:value-of select="@wait"/>
|
117
|
+
<xsl:if test="@cancel">
|
118
|
+
<xsl:text>, :cancel => :</xsl:text>
|
119
|
+
<xsl:value-of select="@cancel"/>
|
120
|
+
</xsl:if>
|
117
121
|
</xsl:if>
|
118
122
|
<xsl:text> do</xsl:text>
|
119
123
|
<xsl:call-template name="print-newline"/>
|
@@ -509,7 +513,7 @@
|
|
509
513
|
<xsl:when test="child::node()[not(self::text())]">
|
510
514
|
<!-- FUUUU, there is probably much more TODO. Updated Matthias und Juergen, we tested for ing-opcua/execute -->
|
511
515
|
<xsl:choose>
|
512
|
-
<xsl:when test="child::* and name(child::*)=concat(name(.),'_item')
|
516
|
+
<xsl:when test="child::* and name(child::*)=concat(name(.),'_item') and count(child::*[not(name()=name(../child::*[1]))])=0">
|
513
517
|
<xsl:text>"[ </xsl:text>
|
514
518
|
<xsl:apply-templates select="*" mode="JSONArrayItem"/>
|
515
519
|
<xsl:text>]"</xsl:text>
|
data/server/routing/end.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3009845
|
data/server/routing/end.rb
CHANGED
@@ -46,6 +46,7 @@ Daemonite.new do |opts|
|
|
46
46
|
multi.del("instance:#{instance}/callback/#{key}/label")
|
47
47
|
multi.del("instance:#{instance}/callback/#{key}/position")
|
48
48
|
multi.del("instance:#{instance}/callback/#{key}/type")
|
49
|
+
multi.del("instance:#{instance}/callback/#{key}/subscription")
|
49
50
|
end
|
50
51
|
rescue => e
|
51
52
|
puts e.message
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3009833
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3009837
|
@@ -24,7 +24,8 @@ require_relative '../../lib/cpee/redis'
|
|
24
24
|
def persist_handler(instance,key,mess,redis) #{{{
|
25
25
|
redis.multi do |multi|
|
26
26
|
multi.sadd("instance:#{instance}/callbacks",key)
|
27
|
-
multi.set("instance:#{instance}/callback/#{key}/
|
27
|
+
multi.set("instance:#{instance}/callback/#{key}/subscription",mess.dig('content','subscription'))
|
28
|
+
multi.set("instance:#{instance}/callback/#{key}/uuid",mess.dig('content','activity-uuid'))
|
28
29
|
multi.set("instance:#{instance}/callback/#{key}/label",mess.dig('content','label'))
|
29
30
|
multi.set("instance:#{instance}/callback/#{key}/position",mess.dig('content','activity'))
|
30
31
|
multi.set("instance:#{instance}/callback/#{key}/type",'vote')
|
@@ -79,7 +80,7 @@ Daemonite.new do |opts|
|
|
79
80
|
url = opts[:redis].get("instance:#{instance}/handlers/#{subscription_key}/url")
|
80
81
|
|
81
82
|
if url.nil? || url == ""
|
82
|
-
persist_handler instance, callback_key, m, redis
|
83
|
+
persist_handler instance, callback_key, m, opts[:redis]
|
83
84
|
opts[:redis].publish("forward:#{instance}/#{subscription_key}",mess)
|
84
85
|
else
|
85
86
|
client = Riddl::Client.new(url)
|
@@ -104,12 +105,12 @@ Daemonite.new do |opts|
|
|
104
105
|
result[0].value.read
|
105
106
|
end
|
106
107
|
if (headers["CPEE_CALLBACK"] && headers["CPEE_CALLBACK"] == 'true') || val == 'callback'
|
107
|
-
persist_handler instance, callback_key, m, redis
|
108
|
+
persist_handler instance, callback_key, m, opts[:redis]
|
108
109
|
else # they may send true or false
|
109
|
-
send_response instance, callback_key, m['cpee'], val, redis
|
110
|
+
send_response instance, callback_key, m['cpee'], val, opts[:redis]
|
110
111
|
end
|
111
112
|
else
|
112
|
-
send_response instance, callback_key, m['cpee'], true, redis
|
113
|
+
send_response instance, callback_key, m['cpee'], true, opts[:redis]
|
113
114
|
end
|
114
115
|
end
|
115
116
|
end
|
data/server/routing/persist.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3009841
|
data/server/routing/persist.rb
CHANGED
@@ -59,7 +59,7 @@ Daemonite.new do |opts|
|
|
59
59
|
key = mess.dig('content','key')
|
60
60
|
opts[:redis].multi do |multi|
|
61
61
|
multi.sadd("instance:#{instance}/callbacks",key)
|
62
|
-
multi.set("instance:#{instance}/callback/#{key}/uuid",mess.dig('content','
|
62
|
+
multi.set("instance:#{instance}/callback/#{key}/uuid",mess.dig('content','activity-uuid'))
|
63
63
|
multi.set("instance:#{instance}/callback/#{key}/label",mess.dig('content','label'))
|
64
64
|
multi.set("instance:#{instance}/callback/#{key}/position",mess.dig('content','activity'))
|
65
65
|
multi.set("instance:#{instance}/callback/#{key}/type",'callback')
|
@@ -99,11 +99,11 @@ Daemonite.new do |opts|
|
|
99
99
|
end
|
100
100
|
when 'event:transformation/change'
|
101
101
|
opts[:redis].multi do |multi|
|
102
|
-
multi.set("instance:#{instance}/transformation/description
|
102
|
+
multi.set("instance:#{instance}/transformation/description",mess.dig('content','description'))
|
103
103
|
multi.set("instance:#{instance}/transformation/description/@type",mess.dig('content','description_type'))
|
104
|
-
multi.set("instance:#{instance}/transformation/dataelements
|
104
|
+
multi.set("instance:#{instance}/transformation/dataelements",mess.dig('content','dataelements'))
|
105
105
|
multi.set("instance:#{instance}/transformation/dataelements/@type",mess.dig('content','dataelements_type'))
|
106
|
-
multi.set("instance:#{instance}/transformation/endpoints
|
106
|
+
multi.set("instance:#{instance}/transformation/endpoints",mess.dig('content','endpoints'))
|
107
107
|
multi.set("instance:#{instance}/transformation/endpoints/@type",mess.dig('content','endpoints_type'))
|
108
108
|
end
|
109
109
|
when 'event:status/change'
|
data/server/server.pid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3009809
|
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.0.
|
4
|
+
version: 2.0.30
|
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: 2021-
|
13
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
version: '1.99'
|
36
36
|
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 1.99.
|
38
|
+
version: 1.99.98
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
version: '1.99'
|
46
46
|
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.99.
|
48
|
+
version: 1.99.98
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: highline
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,14 +94,14 @@ dependencies:
|
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
97
|
+
version: '2'
|
98
98
|
type: :runtime
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '2'
|
105
105
|
description: see http://cpee.org
|
106
106
|
email: juergen.mangler@gmail.com
|
107
107
|
executables:
|
@@ -116,7 +116,9 @@ files:
|
|
116
116
|
- INSTALL.md
|
117
117
|
- README.md
|
118
118
|
- Rakefile
|
119
|
+
- cockpit/CPEE.xml
|
119
120
|
- cockpit/README
|
121
|
+
- cockpit/Signavio.xml
|
120
122
|
- cockpit/config.json
|
121
123
|
- cockpit/contrib/graph_example.svg
|
122
124
|
- cockpit/contrib/legend.svg
|
@@ -133,6 +135,7 @@ files:
|
|
133
135
|
- cockpit/graph.html
|
134
136
|
- cockpit/index.html
|
135
137
|
- cockpit/js/details.js
|
138
|
+
- cockpit/js/edit.js
|
136
139
|
- cockpit/js/instance.js
|
137
140
|
- cockpit/js/model.js
|
138
141
|
- cockpit/js/parameters.js
|
@@ -189,10 +192,6 @@ files:
|
|
189
192
|
- cockpit/templates.legacy/convert_preset.rb
|
190
193
|
- cockpit/templates.legacy/testsets.xml
|
191
194
|
- cockpit/templates.legacy/transformations.xml
|
192
|
-
- cockpit/templates/.CPEE.xml
|
193
|
-
- cockpit/templates/.Signavio.xml
|
194
|
-
- cockpit/templates/.templates.xml
|
195
|
-
- cockpit/templates/.transformations.xml
|
196
195
|
- cockpit/templates/Coopis 2010.xml
|
197
196
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml
|
198
197
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml
|
@@ -252,6 +251,8 @@ files:
|
|
252
251
|
- cockpit/themes/compact/symbols/parallel_branch_compact.svg
|
253
252
|
- cockpit/themes/compact/symbols/parallel_branch_event.svg
|
254
253
|
- cockpit/themes/compact/symbols/parallel_branch_normal.svg
|
254
|
+
- cockpit/themes/compact/symbols/parallel_eventbased_exclusive.svg
|
255
|
+
- cockpit/themes/compact/symbols/parallel_eventbased_parallel.svg
|
255
256
|
- cockpit/themes/compact/symbols/scripts.svg
|
256
257
|
- cockpit/themes/compact/symbols/start.svg
|
257
258
|
- cockpit/themes/compact/symbols/stop.svg
|
@@ -300,6 +301,8 @@ files:
|
|
300
301
|
- cockpit/themes/control/symbols/parallel_branch_compact.svg
|
301
302
|
- cockpit/themes/control/symbols/parallel_branch_event.svg
|
302
303
|
- cockpit/themes/control/symbols/parallel_branch_normal.svg
|
304
|
+
- cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg
|
305
|
+
- cockpit/themes/control/symbols/parallel_eventbased_parallel.svg
|
303
306
|
- cockpit/themes/control/symbols/scripts.svg
|
304
307
|
- cockpit/themes/control/symbols/start.svg
|
305
308
|
- cockpit/themes/control/symbols/stop.svg
|
@@ -348,59 +351,13 @@ files:
|
|
348
351
|
- cockpit/themes/default/symbols/parallel_branch_compact.svg
|
349
352
|
- cockpit/themes/default/symbols/parallel_branch_event.svg
|
350
353
|
- cockpit/themes/default/symbols/parallel_branch_normal.svg
|
354
|
+
- cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg
|
355
|
+
- cockpit/themes/default/symbols/parallel_eventbased_parallel.svg
|
351
356
|
- cockpit/themes/default/symbols/scripts.svg
|
352
357
|
- cockpit/themes/default/symbols/start.svg
|
353
358
|
- cockpit/themes/default/symbols/stop.svg
|
354
359
|
- cockpit/themes/default/symbols/terminate.svg
|
355
360
|
- cockpit/themes/default/theme.js
|
356
|
-
- cockpit/themes/diana/rngs/alternative.rng
|
357
|
-
- cockpit/themes/diana/rngs/call.rng
|
358
|
-
- cockpit/themes/diana/rngs/callmanipulate.rng
|
359
|
-
- cockpit/themes/diana/rngs/choose.rng
|
360
|
-
- cockpit/themes/diana/rngs/closed_loop.rng
|
361
|
-
- cockpit/themes/diana/rngs/closed_loop_cancel.rng
|
362
|
-
- cockpit/themes/diana/rngs/closed_loop_control.rng
|
363
|
-
- cockpit/themes/diana/rngs/closed_loop_measuring.rng
|
364
|
-
- cockpit/themes/diana/rngs/critical.rng
|
365
|
-
- cockpit/themes/diana/rngs/escape.rng
|
366
|
-
- cockpit/themes/diana/rngs/group.rng
|
367
|
-
- cockpit/themes/diana/rngs/loop.rng
|
368
|
-
- cockpit/themes/diana/rngs/manipulate.rng
|
369
|
-
- cockpit/themes/diana/rngs/otherwise.rng
|
370
|
-
- cockpit/themes/diana/rngs/parallel.rng
|
371
|
-
- cockpit/themes/diana/rngs/parallel_branch.rng
|
372
|
-
- cockpit/themes/diana/rngs/scripts.rng
|
373
|
-
- cockpit/themes/diana/rngs/stop.rng
|
374
|
-
- cockpit/themes/diana/rngs/terminate.rng
|
375
|
-
- cockpit/themes/diana/symbols/alternative.svg
|
376
|
-
- cockpit/themes/diana/symbols/arrow.svg
|
377
|
-
- cockpit/themes/diana/symbols/call.svg
|
378
|
-
- cockpit/themes/diana/symbols/callmanipulate.svg
|
379
|
-
- cockpit/themes/diana/symbols/choose.svg
|
380
|
-
- cockpit/themes/diana/symbols/choose_exclusive.svg
|
381
|
-
- cockpit/themes/diana/symbols/choose_inclusive.svg
|
382
|
-
- cockpit/themes/diana/symbols/closed_loop.svg
|
383
|
-
- cockpit/themes/diana/symbols/closed_loop_cancel.svg
|
384
|
-
- cockpit/themes/diana/symbols/closed_loop_control.svg
|
385
|
-
- cockpit/themes/diana/symbols/closed_loop_measuring.svg
|
386
|
-
- cockpit/themes/diana/symbols/complex.svg
|
387
|
-
- cockpit/themes/diana/symbols/critical.svg
|
388
|
-
- cockpit/themes/diana/symbols/end.svg
|
389
|
-
- cockpit/themes/diana/symbols/escape.svg
|
390
|
-
- cockpit/themes/diana/symbols/event_end.svg
|
391
|
-
- cockpit/themes/diana/symbols/loop.svg
|
392
|
-
- cockpit/themes/diana/symbols/manipulate.svg
|
393
|
-
- cockpit/themes/diana/symbols/otherwise.svg
|
394
|
-
- cockpit/themes/diana/symbols/parallel.svg
|
395
|
-
- cockpit/themes/diana/symbols/parallel_branch.svg
|
396
|
-
- cockpit/themes/diana/symbols/parallel_branch_compact.svg
|
397
|
-
- cockpit/themes/diana/symbols/parallel_branch_event.svg
|
398
|
-
- cockpit/themes/diana/symbols/parallel_branch_normal.svg
|
399
|
-
- cockpit/themes/diana/symbols/scripts.svg
|
400
|
-
- cockpit/themes/diana/symbols/start.svg
|
401
|
-
- cockpit/themes/diana/symbols/stop.svg
|
402
|
-
- cockpit/themes/diana/symbols/terminate.svg
|
403
|
-
- cockpit/themes/diana/theme.js
|
404
361
|
- cockpit/themes/extended/rngs/alternative.rng
|
405
362
|
- cockpit/themes/extended/rngs/call.rng
|
406
363
|
- cockpit/themes/extended/rngs/callmanipulate.rng
|
@@ -444,6 +401,8 @@ files:
|
|
444
401
|
- cockpit/themes/extended/symbols/parallel_branch_compact.svg
|
445
402
|
- cockpit/themes/extended/symbols/parallel_branch_event.svg
|
446
403
|
- cockpit/themes/extended/symbols/parallel_branch_normal.svg
|
404
|
+
- cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg
|
405
|
+
- cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg
|
447
406
|
- cockpit/themes/extended/symbols/scripts.svg
|
448
407
|
- cockpit/themes/extended/symbols/start.svg
|
449
408
|
- cockpit/themes/extended/symbols/stop.svg
|
@@ -488,6 +447,8 @@ files:
|
|
488
447
|
- cockpit/themes/model/symbols/parallel_branch_compact.svg
|
489
448
|
- cockpit/themes/model/symbols/parallel_branch_event.svg
|
490
449
|
- cockpit/themes/model/symbols/parallel_branch_normal.svg
|
450
|
+
- cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg
|
451
|
+
- cockpit/themes/model/symbols/parallel_eventbased_parallel.svg
|
491
452
|
- cockpit/themes/model/symbols/scripts.svg
|
492
453
|
- cockpit/themes/model/symbols/start.svg
|
493
454
|
- cockpit/themes/model/symbols/stop.svg
|
@@ -536,6 +497,8 @@ files:
|
|
536
497
|
- cockpit/themes/packed/symbols/parallel_branch_compact.svg
|
537
498
|
- cockpit/themes/packed/symbols/parallel_branch_event.svg
|
538
499
|
- cockpit/themes/packed/symbols/parallel_branch_normal.svg
|
500
|
+
- cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg
|
501
|
+
- cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg
|
539
502
|
- cockpit/themes/packed/symbols/scripts.svg
|
540
503
|
- cockpit/themes/packed/symbols/start.svg
|
541
504
|
- cockpit/themes/packed/symbols/stop.svg
|
@@ -584,12 +547,15 @@ files:
|
|
584
547
|
- cockpit/themes/preset/symbols/parallel_branch_compact.svg
|
585
548
|
- cockpit/themes/preset/symbols/parallel_branch_event.svg
|
586
549
|
- cockpit/themes/preset/symbols/parallel_branch_normal.svg
|
550
|
+
- cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg
|
551
|
+
- cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg
|
587
552
|
- cockpit/themes/preset/symbols/scripts.svg
|
588
553
|
- cockpit/themes/preset/symbols/start.svg
|
589
554
|
- cockpit/themes/preset/symbols/stop.svg
|
590
555
|
- cockpit/themes/preset/symbols/terminate.svg
|
591
556
|
- cockpit/themes/preset/theme.js
|
592
557
|
- cockpit/track.html
|
558
|
+
- cockpit/transformations.xml
|
593
559
|
- contrib/Screenshot at 2011-09-28 02:38:11.png
|
594
560
|
- contrib/logo2-small.png
|
595
561
|
- contrib/logo2.png
|