cpee 2.1.26 → 2.1.32
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/Frames.xml +297 -0
- data/cockpit/templates/Subprocess.xml +79 -0
- data/cockpit/templates/Subprocess.xml.attrs +13 -0
- data/cockpit/templates/Track Test.xml +31 -28
- data/cockpit/templates/Track Test.xml.attrs +11 -0
- data/cockpit/templates/Wait.xml +73 -0
- data/cockpit/templates/Wait.xml.attrs +13 -0
- data/cockpit/templates/Worklist.xml +58 -26
- data/cockpit/templates/instantiate/Take_Perf.xml +13 -10
- data/cockpit/templates/instantiate/Take_Sub.xml +4 -8
- data/cockpit/templates/instantiate/Take_X.xml +12 -9
- data/cockpit/themes/compact/theme.js +1 -1
- data/cockpit/themes/control/theme.js +1 -1
- data/cockpit/themes/default/theme.js +1 -1
- data/cockpit/themes/extended/theme.js +1 -1
- data/cockpit/themes/model/theme.js +1 -1
- data/cockpit/themes/packed/theme.js +1 -1
- data/cockpit/themes/preset/theme.js +1 -1
- data/cpee.gemspec +1 -1
- data/lib/cpee/fail.rb +23 -0
- data/lib/cpee/implementation.rb +34 -18
- data/lib/cpee/implementation_callbacks.rb +20 -15
- data/lib/cpee/implementation_notifications.rb +22 -17
- data/lib/cpee/implementation_properties.rb +66 -61
- data/lib/cpee/message.rb +15 -13
- data/lib/cpee/persistence.rb +33 -10
- data/server/executionhandlers/ruby/connection.rb +15 -5
- data/server/executionhandlers/ruby/controller.rb +11 -6
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +36 -6
- data/server/routing/end.pid +1 -0
- data/server/routing/forward-events.pid +1 -0
- data/server/routing/forward-events.rb +6 -0
- data/server/routing/forward-votes.pid +1 -0
- data/server/routing/persist.pid +1 -0
- data/server/routing/persist.rb +4 -2
- data/server/server.conf +1 -1
- metadata +13 -6
- data/cockpit/templates/Coopis 2010.xml.active +0 -1
- data/cockpit/templates/Coopis 2010.xml.active-uuid +0 -1
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active +0 -1
- data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active-uuid +0 -1
@@ -13,6 +13,7 @@
|
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
14
14
|
|
15
15
|
require_relative 'attributes_helper'
|
16
|
+
require_relative 'fail'
|
16
17
|
require_relative 'value_helper'
|
17
18
|
require 'json'
|
18
19
|
require 'erb'
|
@@ -25,71 +26,75 @@ module CPEE
|
|
25
26
|
|
26
27
|
def self::implementation(id,opts)
|
27
28
|
Proc.new do
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
39
|
-
on resource 'status' do
|
40
|
-
run CPEE::Properties::GetStatus, id, opts if get
|
41
|
-
run CPEE::Properties::PutStatus, id, opts if put 'status'
|
42
|
-
on resource 'id' do
|
43
|
-
run CPEE::Properties::GetStatusID, id, opts if get
|
44
|
-
end
|
45
|
-
on resource 'message' do
|
46
|
-
run CPEE::Properties::GetStatusMessage, id, opts if get
|
47
|
-
end
|
48
|
-
end
|
49
|
-
on resource 'executionhandler' do
|
50
|
-
run CPEE::Properties::GetExecutionHandler, id, opts if get
|
51
|
-
run CPEE::Properties::PutExecutionHandler, id, opts if put 'executionhandler'
|
52
|
-
end
|
53
|
-
on resource 'positions' do
|
54
|
-
run CPEE::Properties::GetPositions, id, opts if get
|
55
|
-
run CPEE::Properties::PatchPositions, id, opts if patch 'positions'
|
56
|
-
run CPEE::Properties::PutPositions, id, opts if put 'positions'
|
57
|
-
run CPEE::Properties::PostPositions, id, opts if post 'position'
|
58
|
-
on resource do
|
59
|
-
run CPEE::Properties::GetDetail, 'positions', id, opts if get
|
60
|
-
run CPEE::Properties::SetDetail, id, opts if put 'detail'
|
61
|
-
run CPEE::Properties::DelDetail, id, opts if delete
|
62
|
-
on resource '@passthrough' do
|
63
|
-
run CPEE::Properties::GetPt, id, opts if get
|
29
|
+
if CPEE::Persistence::exists?(id,opts)
|
30
|
+
run CPEE::Properties::Get, id, opts if get
|
31
|
+
run CPEE::Properties::Patch, id, opts if patch 'set-some-properties'
|
32
|
+
run CPEE::Properties::Put, id, opts if put 'set-some-properties'
|
33
|
+
on resource 'state' do
|
34
|
+
run CPEE::Properties::GetStateMachine, id, opts if get 'machine'
|
35
|
+
run CPEE::Properties::GetState, id, opts if get
|
36
|
+
run CPEE::Properties::PutState, id, opts if put 'state'
|
37
|
+
on resource '@changed' do
|
38
|
+
run CPEE::Properties::GetStateChanged, id, opts if get
|
64
39
|
end
|
65
40
|
end
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
41
|
+
on resource 'status' do
|
42
|
+
run CPEE::Properties::GetStatus, id, opts if get
|
43
|
+
run CPEE::Properties::PutStatus, id, opts if put 'status'
|
44
|
+
on resource 'id' do
|
45
|
+
run CPEE::Properties::GetStatusID, id, opts if get
|
46
|
+
end
|
47
|
+
on resource 'message' do
|
48
|
+
run CPEE::Properties::GetStatusMessage, id, opts if get
|
49
|
+
end
|
50
|
+
end
|
51
|
+
on resource 'executionhandler' do
|
52
|
+
run CPEE::Properties::GetExecutionHandler, id, opts if get
|
53
|
+
run CPEE::Properties::PutExecutionHandler, id, opts if put 'executionhandler'
|
54
|
+
end
|
55
|
+
on resource 'positions' do
|
56
|
+
run CPEE::Properties::GetPositions, id, opts if get
|
57
|
+
run CPEE::Properties::PatchPositions, id, opts if patch 'positions'
|
58
|
+
run CPEE::Properties::PutPositions, id, opts if put 'positions'
|
59
|
+
run CPEE::Properties::PostPositions, id, opts if post 'position'
|
73
60
|
on resource do
|
74
|
-
run CPEE::Properties::
|
75
|
-
run CPEE::Properties::
|
76
|
-
run CPEE::Properties::
|
61
|
+
run CPEE::Properties::GetDetail, 'positions', id, opts if get
|
62
|
+
run CPEE::Properties::SetDetail, id, opts if put 'detail'
|
63
|
+
run CPEE::Properties::DelDetail, id, opts if delete
|
64
|
+
on resource '@passthrough' do
|
65
|
+
run CPEE::Properties::GetPt, id, opts if get
|
66
|
+
end
|
77
67
|
end
|
78
68
|
end
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
69
|
+
%w{dataelements endpoints attributes}.each do |ele|
|
70
|
+
on resource ele do
|
71
|
+
run CPEE::Properties::GetItems, ele, id, opts if get
|
72
|
+
run CPEE::Properties::PatchItems, ele, id, opts if patch ele
|
73
|
+
run CPEE::Properties::PutItems, ele, id, opts if put ele
|
74
|
+
run CPEE::Properties::PostItem, ele, id, opts if post ele[0..-2]
|
75
|
+
on resource do
|
76
|
+
run CPEE::Properties::GetItem, ele, id, opts if get
|
77
|
+
run CPEE::Properties::SetItem, ele, id, opts if put 'string'
|
78
|
+
run CPEE::Properties::DelItem, ele, id, opts if delete
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
on resource 'dsl' do
|
83
|
+
run CPEE::Properties::GetComplex, 'dsl', 'text/plain', id, opts if get
|
84
|
+
end
|
85
|
+
on resource 'dslx' do
|
86
|
+
run CPEE::Properties::GetComplex, 'dslx', 'text/xml', id, opts if get
|
87
|
+
end
|
88
|
+
on resource 'description' do
|
89
|
+
run CPEE::Properties::GetComplex, 'description', 'text/xml', id, opts if get
|
90
|
+
run CPEE::Properties::PutDescription, id, opts if put 'description'
|
91
|
+
end
|
92
|
+
on resource 'transformation' do
|
93
|
+
run CPEE::Properties::GetTransformation, id, opts if get
|
94
|
+
run CPEE::Properties::PutTransformation, id, opts if put 'transformation'
|
95
|
+
end
|
96
|
+
else
|
97
|
+
run CPEE::FAIL
|
93
98
|
end
|
94
99
|
end
|
95
100
|
end
|
@@ -222,7 +227,7 @@ module CPEE
|
|
222
227
|
end #}}}
|
223
228
|
class PutState < Riddl::Implementation #{{{
|
224
229
|
def self::set(id,opts,state)
|
225
|
-
CPEE::Persistence::set_item(id,opts,'state',:state => state, :
|
230
|
+
CPEE::Persistence::set_item(id,opts,'state',:state => state, :attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h)
|
226
231
|
end
|
227
232
|
|
228
233
|
def self::run(id,opts,state)
|
data/lib/cpee/message.rb
CHANGED
@@ -15,25 +15,27 @@
|
|
15
15
|
module CPEE
|
16
16
|
|
17
17
|
module Message
|
18
|
+
WHO = 'cpee'
|
19
|
+
TYPE = 'instance'
|
18
20
|
|
19
21
|
def self::send(type, event, cpee, instance, instance_uuid, instance_name, content={}, backend)
|
20
22
|
topic = ::File::dirname(event)
|
21
23
|
name = ::File::basename(event)
|
24
|
+
payload = {
|
25
|
+
WHO => cpee,
|
26
|
+
TYPE + '-url' => File.join(cpee,instance.to_s),
|
27
|
+
TYPE => instance,
|
28
|
+
'topic' => topic,
|
29
|
+
'type' => type,
|
30
|
+
'name' => name,
|
31
|
+
'timestamp' => Time.now.xmlschema(3),
|
32
|
+
'content' => content
|
33
|
+
}
|
34
|
+
payload[TYPE + '-uuid'] = instance_uuid if instance_uuid
|
35
|
+
payload[TYPE + '-name'] = instance_name if instance_name
|
22
36
|
backend.publish(type.to_s + ':' + event,
|
23
37
|
instance.to_s + ' ' +
|
24
|
-
JSON::generate(
|
25
|
-
{ 'cpee' => cpee,
|
26
|
-
'instance-url' => File.join(cpee,instance.to_s),
|
27
|
-
'instance-uuid' => instance_uuid,
|
28
|
-
'instance-name' => instance_name,
|
29
|
-
'instance' => instance,
|
30
|
-
'topic' => topic,
|
31
|
-
'type' => type,
|
32
|
-
'name' => name,
|
33
|
-
'timestamp' => Time.now.xmlschema(3),
|
34
|
-
'content' => content
|
35
|
-
}
|
36
|
-
)
|
38
|
+
JSON::generate(payload)
|
37
39
|
)
|
38
40
|
end
|
39
41
|
|
data/lib/cpee/persistence.rb
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
module CPEE
|
16
16
|
|
17
17
|
module Persistence
|
18
|
+
OBJ = 'instance'
|
19
|
+
|
18
20
|
def self::set_list(id,opts,item,values,deleted=[]) #{{{
|
19
21
|
ah = AttributesHelper.new
|
20
22
|
attributes = Persistence::extract_list(id,opts,'attributes').to_h
|
@@ -37,13 +39,13 @@ module CPEE
|
|
37
39
|
)
|
38
40
|
end #}}}
|
39
41
|
def self::extract_set(id,opts,item) #{{{
|
40
|
-
opts[:redis].smembers("
|
41
|
-
[e,opts[:redis].get("
|
42
|
+
opts[:redis].smembers(OBJ + ":#{id}/#{item}").map do |e|
|
43
|
+
[e,opts[:redis].get(OBJ + ":#{id}/#{item}/#{e}")]
|
42
44
|
end
|
43
45
|
end #}}}
|
44
46
|
def self::extract_list(id,opts,item) #{{{
|
45
|
-
opts[:redis].zrange("
|
46
|
-
[e,opts[:redis].get("
|
47
|
+
opts[:redis].zrange(OBJ + ":#{id}/#{item}",0,-1).map do |e|
|
48
|
+
[e,opts[:redis].get(OBJ + ":#{id}/#{item}/#{e}")]
|
47
49
|
end
|
48
50
|
end #}}}
|
49
51
|
|
@@ -60,11 +62,32 @@ module CPEE
|
|
60
62
|
)
|
61
63
|
end #}}}
|
62
64
|
def self::extract_item(id,opts,item) #{{{
|
63
|
-
opts[:redis].get("
|
65
|
+
opts[:redis].get(OBJ + ":#{id}/#{item}")
|
66
|
+
end #}}}
|
67
|
+
|
68
|
+
def self::exists?(id,opts) #{{{
|
69
|
+
opts[:redis].exists?(OBJ + ":#{id}/state")
|
64
70
|
end #}}}
|
71
|
+
def self::is_member?(id,opts,item,value) #{{{
|
72
|
+
opts[:redis].sismember(OBJ + ":#{id}/#{item}",value)
|
73
|
+
end #}}}
|
74
|
+
|
75
|
+
def self::each_object(opts)
|
76
|
+
opts[:redis].zrevrange(OBJ + 's',0,-1).each do |instance|
|
77
|
+
yield instance
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def self::new_object(opts)
|
82
|
+
opts[:redis].zrevrange(OBJ + 's', 0, 0).first.to_i + 1
|
83
|
+
end
|
84
|
+
|
85
|
+
def self::keys(id,opts,item=nil)
|
86
|
+
opts[:redis].keys(File.join(OBJ + ":#{id}",item.to_s,'*'))
|
87
|
+
end
|
65
88
|
|
66
89
|
def self::set_handler(id,opts,key,url,values,update=false) #{{{
|
67
|
-
exis = opts[:redis].smembers("
|
90
|
+
exis = opts[:redis].smembers(OBJ + ":#{id}/handlers/#{key}")
|
68
91
|
|
69
92
|
if update == false && exis.length > 0
|
70
93
|
return 405
|
@@ -97,14 +120,14 @@ module CPEE
|
|
97
120
|
200
|
98
121
|
end #}}}
|
99
122
|
def self::extract_handler(id,opts,key) #{{{
|
100
|
-
opts[:redis].smembers("
|
123
|
+
opts[:redis].smembers(OBJ + ":#{id}/handlers/#{key}")
|
101
124
|
end #}}}
|
102
125
|
def self::exists_handler?(id,opts,key) #{{{
|
103
|
-
opts[:redis].exists?("
|
126
|
+
opts[:redis].exists?(OBJ + ":#{id}/handlers/#{key}")
|
104
127
|
end #}}}
|
105
128
|
def self::extract_handlers(id,opts) #{{{
|
106
|
-
opts[:redis].smembers("
|
107
|
-
[e, opts[:redis].get("
|
129
|
+
opts[:redis].smembers(OBJ + ":#{id}/handlers").map do |e|
|
130
|
+
[e, opts[:redis].get(OBJ + ":#{id}/handlers/#{e}/url")]
|
108
131
|
end
|
109
132
|
end #}}}
|
110
133
|
end
|
@@ -77,7 +77,15 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
77
77
|
end #}}}
|
78
78
|
|
79
79
|
def additional #{{{
|
80
|
-
{
|
80
|
+
{
|
81
|
+
:attributes => @controller.attributes,
|
82
|
+
:cpee => {
|
83
|
+
'base' => @controller.base_url,
|
84
|
+
'instance' => @controller.instance_id,
|
85
|
+
'instance_url' => @controller.instance_url,
|
86
|
+
'instance_uuid' => @controller.uuid
|
87
|
+
}
|
88
|
+
}
|
81
89
|
end #}}}
|
82
90
|
|
83
91
|
def proto_curl(parameters) #{{{
|
@@ -149,8 +157,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
149
157
|
def activity_handle(passthrough, parameters) # {{{
|
150
158
|
raise "Wrong endpoint" if @handler_endpoint.nil? || @handler_endpoint.empty?
|
151
159
|
@label = parameters[:label]
|
152
|
-
@anno = parameters
|
153
|
-
@controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :annotations => anno)
|
160
|
+
@anno = parameters.delete(:annotations) rescue nil
|
161
|
+
@controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :annotations => @anno)
|
154
162
|
if passthrough.to_s.empty?
|
155
163
|
proto_curl parameters
|
156
164
|
else
|
@@ -198,7 +206,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
198
206
|
@controller.notify("status/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
|
199
207
|
end
|
200
208
|
unless changed_dataelements.nil? || changed_dataelements.empty?
|
201
|
-
de = dataelements.slice(*changed_dataelements).transform_values { |v| enc = detect_encoding(v); (enc == 'OTHER' ? v
|
209
|
+
de = dataelements.slice(*changed_dataelements).transform_values { |v| enc = detect_encoding(v); (enc == 'OTHER' ? v : (v.encode('UTF-8',enc) rescue convert_to_base64(v))) }
|
202
210
|
@controller.notify("dataelements/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => de)
|
203
211
|
end
|
204
212
|
unless changed_endpoints.nil? || changed_endpoints.empty?
|
@@ -220,6 +228,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
220
228
|
elsif result[0].is_a? Riddl::Parameter::Complex
|
221
229
|
if result[0].mimetype == 'application/json'
|
222
230
|
result = JSON::parse(result[0].value.read) rescue nil
|
231
|
+
elsif result[0].mimetype == 'text/yaml'
|
232
|
+
result = YAML::load(result[0].value.read) rescue nil
|
223
233
|
elsif result[0].mimetype == 'application/xml' || result[0].mimetype == 'text/xml'
|
224
234
|
result = XML::Smart::string(result[0].value.read) rescue nil
|
225
235
|
elsif result[0].mimetype == 'text/plain'
|
@@ -276,7 +286,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
276
286
|
''
|
277
287
|
else
|
278
288
|
enc = detect_encoding(ttt)
|
279
|
-
enc == 'OTHER' ? ttt
|
289
|
+
enc == 'OTHER' ? ttt : (ttt.encode('UTF-8',enc) rescue convert_to_base64(ttt))
|
280
290
|
end
|
281
291
|
elsif r.mimetype == 'text/plain' || r.mimetype == 'text/html'
|
282
292
|
ttt = r.value.read
|
@@ -21,6 +21,7 @@ require 'cpee/value_helper'
|
|
21
21
|
require 'cpee/attributes_helper'
|
22
22
|
require 'cpee/message'
|
23
23
|
require 'cpee/redis'
|
24
|
+
require 'cpee/persistence'
|
24
25
|
|
25
26
|
require 'ostruct'
|
26
27
|
class ParaStruct < OpenStruct
|
@@ -41,8 +42,8 @@ class Controller
|
|
41
42
|
@id = id
|
42
43
|
|
43
44
|
@attributes = {}
|
44
|
-
|
45
|
-
@attributes[
|
45
|
+
CPEE::Persistence::extract_list(id,opts,'attributes').each do |de|
|
46
|
+
@attributes[de[0]] = de[1]
|
46
47
|
end
|
47
48
|
|
48
49
|
@attributes_helper = AttributesHelper.new
|
@@ -52,9 +53,9 @@ class Controller
|
|
52
53
|
@loop_guard = {}
|
53
54
|
|
54
55
|
@callback_keys = {}
|
55
|
-
@psredis = @opts[:redis_dyn].call "Instance #{@id} Callback Response"
|
56
56
|
|
57
|
-
Thread.new do
|
57
|
+
@subs = Thread.new do
|
58
|
+
@psredis = @opts[:redis_dyn].call "Instance #{@id} Callback Response"
|
58
59
|
@psredis.psubscribe('callback-response:*','callback-end:*') do |on|
|
59
60
|
on.pmessage do |pat, what, message|
|
60
61
|
if pat == 'callback-response:*' && @callback_keys.has_key?(what[18..-1])
|
@@ -77,6 +78,10 @@ class Controller
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
end
|
81
|
+
@psredis.close
|
82
|
+
rescue => e
|
83
|
+
sleep 1
|
84
|
+
retry
|
80
85
|
end
|
81
86
|
end
|
82
87
|
|
@@ -136,7 +141,6 @@ class Controller
|
|
136
141
|
CPEE::Message::send(:'vote-response',key,base,@id,uuid,info,true,@redis)
|
137
142
|
end
|
138
143
|
end
|
139
|
-
@thread.join if !@thread.nil? && @thread.alive?
|
140
144
|
end
|
141
145
|
|
142
146
|
def info
|
@@ -152,7 +156,8 @@ class Controller
|
|
152
156
|
topic, name = what.split('/')
|
153
157
|
handler = File.join(topic,'vote',name)
|
154
158
|
votes = []
|
155
|
-
|
159
|
+
|
160
|
+
CPEE::Persistence::extract_handler(id,@opts,handler).each do |client|
|
156
161
|
voteid = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
157
162
|
content[:key] = voteid
|
158
163
|
content[:attributes] = attributes_translated
|
@@ -6,10 +6,10 @@
|
|
6
6
|
<xsl:template match="/">
|
7
7
|
<xsl:text>control flow do</xsl:text>
|
8
8
|
<xsl:call-template name="print-newline"/>
|
9
|
-
<xsl:apply-templates select="
|
9
|
+
<xsl:apply-templates select="/d:description"/>
|
10
10
|
<xsl:text>end</xsl:text>
|
11
11
|
</xsl:template>
|
12
|
-
<xsl:template match="
|
12
|
+
<xsl:template match="/d:description">
|
13
13
|
<xsl:apply-templates>
|
14
14
|
<xsl:with-param name="myspace">
|
15
15
|
<xsl:value-of select="0*$myspacemultiplier"/>
|
@@ -417,7 +417,9 @@
|
|
417
417
|
<xsl:text>:</xsl:text>
|
418
418
|
<xsl:value-of select="name()"/>
|
419
419
|
<xsl:text> => </xsl:text>
|
420
|
-
<xsl:
|
420
|
+
<xsl:text>{ </xsl:text>
|
421
|
+
<xsl:apply-templates select="d:*" mode="simplemulti"/>
|
422
|
+
<xsl:text> }</xsl:text>
|
421
423
|
</xsl:template>
|
422
424
|
<xsl:template match="d:*[not(name()='label')]" mode="parameter">
|
423
425
|
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
@@ -507,6 +509,34 @@
|
|
507
509
|
</xsl:choose>
|
508
510
|
<xsl:text> }</xsl:text>
|
509
511
|
</xsl:template>
|
512
|
+
<xsl:template match="d:*" mode="simplemulti">
|
513
|
+
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
514
|
+
<xsl:text>:</xsl:text>
|
515
|
+
<xsl:value-of select="name()"/>
|
516
|
+
<xsl:text> => </xsl:text>
|
517
|
+
<xsl:choose>
|
518
|
+
<xsl:when test="count(*) > 0">
|
519
|
+
<xsl:text>{</xsl:text>
|
520
|
+
<xsl:apply-templates select="d:*" mode="plain"/>
|
521
|
+
<xsl:text>}</xsl:text>
|
522
|
+
</xsl:when>
|
523
|
+
<xsl:when test="not(node())">
|
524
|
+
<xsl:text>nil</xsl:text>
|
525
|
+
</xsl:when>
|
526
|
+
<xsl:otherwise>
|
527
|
+
<xsl:choose>
|
528
|
+
<xsl:when test="substring(text(),1,1) = '!'">
|
529
|
+
<xsl:value-of select="substring(text(),2)"/>
|
530
|
+
</xsl:when>
|
531
|
+
<xsl:otherwise>
|
532
|
+
<xsl:text>"</xsl:text>
|
533
|
+
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
534
|
+
<xsl:text>"</xsl:text>
|
535
|
+
</xsl:otherwise>
|
536
|
+
</xsl:choose>
|
537
|
+
</xsl:otherwise>
|
538
|
+
</xsl:choose>
|
539
|
+
</xsl:template>
|
510
540
|
<xsl:template name="format-name">
|
511
541
|
<xsl:param name="tname"/>
|
512
542
|
<xsl:choose>
|
@@ -719,9 +749,9 @@
|
|
719
749
|
<xsl:otherwise>
|
720
750
|
<xsl:choose>
|
721
751
|
<xsl:when test="substring(.,1,1) = '!'">
|
722
|
-
<xsl:text>#{</xsl:text>
|
723
|
-
<xsl:value-of select="
|
724
|
-
<xsl:text
|
752
|
+
<xsl:text>#{(</xsl:text>
|
753
|
+
<xsl:value-of select="substring(.,2)"/>
|
754
|
+
<xsl:text>).to_json}</xsl:text>
|
725
755
|
</xsl:when>
|
726
756
|
<xsl:otherwise>
|
727
757
|
<xsl:text>\"</xsl:text>
|
@@ -0,0 +1 @@
|
|
1
|
+
2206017
|
@@ -0,0 +1 @@
|
|
1
|
+
2206021
|
@@ -62,6 +62,12 @@ Daemonite.new do |opts|
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
65
|
+
unless opts[:redis].exists?("instance:#{instance}/state")
|
66
|
+
empt = opts[:redis].keys("instance:#{instance}/*").to_a
|
67
|
+
opts[:redis].multi do |multi|
|
68
|
+
multi.del empt
|
69
|
+
end
|
70
|
+
end
|
65
71
|
rescue => e
|
66
72
|
puts e.message
|
67
73
|
puts e.backtrace
|
@@ -0,0 +1 @@
|
|
1
|
+
2206025
|
@@ -0,0 +1 @@
|
|
1
|
+
2206029
|
data/server/routing/persist.rb
CHANGED
@@ -66,8 +66,10 @@ Daemonite.new do |opts|
|
|
66
66
|
end
|
67
67
|
when 'event:state/change'
|
68
68
|
opts[:redis].multi do |multi|
|
69
|
-
|
70
|
-
|
69
|
+
unless mess.dig('content','state') == 'purged'
|
70
|
+
multi.set("instance:#{instance}/state",mess.dig('content','state'))
|
71
|
+
multi.set("instance:#{instance}/state/@changed",mess.dig('timestamp'))
|
72
|
+
end
|
71
73
|
end
|
72
74
|
when 'event:executionhandler/change'
|
73
75
|
opts[:redis].set("instance:#{instance}/executionhandler",mess.dig('content','executionhandler'))
|
data/server/server.conf
CHANGED
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.32
|
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:
|
13
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -221,20 +221,22 @@ files:
|
|
221
221
|
- cockpit/templates.legacy/testsets.xml
|
222
222
|
- cockpit/templates.legacy/transformations.xml
|
223
223
|
- cockpit/templates/Coopis 2010.xml
|
224
|
-
- cockpit/templates/
|
225
|
-
- cockpit/templates/Coopis 2010.xml.active-uuid
|
224
|
+
- cockpit/templates/Frames.xml
|
226
225
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml
|
227
226
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml
|
228
227
|
- cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml
|
228
|
+
- cockpit/templates/Subprocess.xml
|
229
|
+
- cockpit/templates/Subprocess.xml.attrs
|
229
230
|
- cockpit/templates/Track Test Local.xml
|
230
231
|
- cockpit/templates/Track Test.xml
|
232
|
+
- cockpit/templates/Track Test.xml.attrs
|
231
233
|
- cockpit/templates/UR-VUE 2020 Manual Adjust.xml
|
232
234
|
- cockpit/templates/UR-VUE 2020 Solution Baseline.xml
|
233
|
-
- cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active
|
234
|
-
- cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active-uuid
|
235
235
|
- cockpit/templates/UR-VUE 2020 Solution NN.xml
|
236
236
|
- cockpit/templates/UR-VUE 2020 Solution View.xml
|
237
237
|
- cockpit/templates/UR-VUE 2020.xml
|
238
|
+
- cockpit/templates/Wait.xml
|
239
|
+
- cockpit/templates/Wait.xml.attrs
|
238
240
|
- cockpit/templates/Worklist.xml
|
239
241
|
- cockpit/templates/instantiate.local/Take_Sub.xml
|
240
242
|
- cockpit/templates/instantiate/Take_Perf.xml
|
@@ -605,6 +607,7 @@ files:
|
|
605
607
|
- lib/callbacks/callbacks.rng
|
606
608
|
- lib/cpee.xml
|
607
609
|
- lib/cpee/attributes_helper.rb
|
610
|
+
- lib/cpee/fail.rb
|
608
611
|
- lib/cpee/implementation.rb
|
609
612
|
- lib/cpee/implementation_callbacks.rb
|
610
613
|
- lib/cpee/implementation_notifications.rb
|
@@ -661,9 +664,13 @@ files:
|
|
661
664
|
- server/resources/states.xml
|
662
665
|
- server/resources/topics.xml
|
663
666
|
- server/resources/transformation.xml
|
667
|
+
- server/routing/end.pid
|
664
668
|
- server/routing/end.rb
|
669
|
+
- server/routing/forward-events.pid
|
665
670
|
- server/routing/forward-events.rb
|
671
|
+
- server/routing/forward-votes.pid
|
666
672
|
- server/routing/forward-votes.rb
|
673
|
+
- server/routing/persist.pid
|
667
674
|
- server/routing/persist.rb
|
668
675
|
- server/server.conf
|
669
676
|
- server/server.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
https://cpee.org/flow/engine/542
|
@@ -1 +0,0 @@
|
|
1
|
-
692f7da6-a212-4876-9e72-dd8fc242651d
|
@@ -1 +0,0 @@
|
|
1
|
-
https://cpee.org/flow/engine/613
|
@@ -1 +0,0 @@
|
|
1
|
-
ffbc55c8-0759-42f8-955e-30ebf9c086a6
|