cpee 1.3.187 → 1.3.188
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/js/instance.js +2 -2
- data/cockpit/themes/default/theme.js +6 -1
- data/cpee.gemspec +2 -2
- data/lib/cpee/controller.rb +68 -68
- data/server/handlerwrappers/log.rb +13 -9
- data/server/instances/39/log.xes +137 -0
- data/server/instances/39/properties.xml +176 -0
- data/server/instances/40/properties.xml +44 -0
- data/server/instances/41/log.xes +138 -0
- data/server/instances/41/properties.xml +176 -0
- data/server/instances/42/log.xes +138 -0
- data/server/instances/42/properties.xml +176 -0
- data/server/instances/43/log.xes +138 -0
- data/server/instances/43/notifications/f66c804e47c37eac47c5891e66e4e52d/consumer-secret +1 -0
- data/server/instances/43/notifications/f66c804e47c37eac47c5891e66e4e52d/producer-secret +1 -0
- data/server/instances/{38/notifications/b1c2a4fd87a36e2b663faf2c601499a3 → 43/notifications/f66c804e47c37eac47c5891e66e4e52d}/subscription.xml +0 -0
- data/server/instances/43/properties.xml +176 -0
- data/server/resources/transformation_dslx.xsl +39 -42
- metadata +15 -7
- data/server/instances/38/notifications/b1c2a4fd87a36e2b663faf2c601499a3/consumer-secret +0 -1
- data/server/instances/38/notifications/b1c2a4fd87a36e2b663faf2c601499a3/producer-secret +0 -1
- data/server/server.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0945c717914907e42fc04e35d1c7abbb7ced2bc6'
|
4
|
+
data.tar.gz: 584bf95746c861682ddaf116bb55fd74f374df5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f4160c8856b0dffc7fab55faf5480c4d0f83e4e2459f0cf6585e8b27d3af4be5ee39617732a4893c916859c17363f2790b962eab9da02e0793ad7d7c1dfd5c4
|
7
|
+
data.tar.gz: a3f92e0823d40f34c4802df8ed2e0d21269490e0ab4315259b53e6fe2167ab9552b132e6e8c87230dd4a7638e4dacfca35fceef8af6774dc1bd06afff58b39cd
|
data/cockpit/js/instance.js
CHANGED
@@ -532,7 +532,7 @@ function save_testset() {// {{{
|
|
532
532
|
var pars = $X('<description/>');
|
533
533
|
pars.append($(res.documentElement));
|
534
534
|
testset.append(pars);
|
535
|
-
pars = $X(
|
535
|
+
pars = $X("<transformation><description type='copy'/><dataelements type='none'/><endpoints type='none'/></transformation>");
|
536
536
|
testset.append(pars);
|
537
537
|
$.ajax({
|
538
538
|
type: "GET",
|
@@ -543,7 +543,7 @@ function save_testset() {// {{{
|
|
543
543
|
pars.append($(res.documentElement).children());
|
544
544
|
testset.append(pars);
|
545
545
|
$('#savetestset').attr('download',name + '.xml');
|
546
|
-
$('#savetestset').attr('href','data:application/xml;charset=utf-8;base64,' + window.btoa(testset.
|
546
|
+
$('#savetestset').attr('href','data:application/xml;charset=utf-8;base64,' + window.btoa(testset.serializePrettyXML()));
|
547
547
|
document.getElementById('savetestset').click();
|
548
548
|
},
|
549
549
|
error: report_failure
|
@@ -9,7 +9,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
9
9
|
this.source = function(rng) {
|
10
10
|
$('#relaxngworker').empty();
|
11
11
|
var rngw = new RelaxNGui(rng,$('#relaxngworker'),self.adaptor.description.context_eval);
|
12
|
-
|
12
|
+
var nnew = $(rngw.save().documentElement);
|
13
|
+
nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
|
14
|
+
var ntxt = nnew.serializeXML();
|
15
|
+
ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
|
16
|
+
|
17
|
+
return($X(ntxt));
|
13
18
|
};
|
14
19
|
|
15
20
|
// Events
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "1.3.
|
3
|
+
s.version = "1.3.188"
|
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). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.extra_rdoc_files = ['README']
|
13
13
|
s.test_files = Dir['{test/*,test/*/tc_*.rb}']
|
14
14
|
|
15
|
-
s.required_ruby_version = '>=
|
15
|
+
s.required_ruby_version = '>=2.0.0'
|
16
16
|
|
17
17
|
s.authors = ['Juergen eTM Mangler','Ralph Vigne','Gerhard Stuermer','Florian Stertz']
|
18
18
|
|
data/lib/cpee/controller.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# This file is part of CPEE.
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# CPEE is free software: you can redistribute it and/or modify it under the terms
|
4
4
|
# of the GNU General Public License as published by the Free Software Foundation,
|
5
5
|
# either version 3 of the License, or (at your option) any later version.
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
8
8
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
9
9
|
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# You should have received a copy of the GNU General Public License along with
|
12
12
|
# CPEE (file COPYING in the main directory). If not, see
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
@@ -29,7 +29,7 @@ module CPEE
|
|
29
29
|
JSON::generate(value)
|
30
30
|
elsif value.respond_to?(:to_s)
|
31
31
|
value.to_s
|
32
|
-
end
|
32
|
+
end
|
33
33
|
end
|
34
34
|
|
35
35
|
def self::parse(value)
|
@@ -40,13 +40,13 @@ module CPEE
|
|
40
40
|
false
|
41
41
|
when 'nil', 'null'
|
42
42
|
nil
|
43
|
-
else
|
43
|
+
else
|
44
44
|
begin
|
45
45
|
JSON::parse(value)
|
46
46
|
rescue
|
47
47
|
(Integer value rescue nil) || (Float value rescue nil) || value.to_s rescue nil || ''
|
48
48
|
end
|
49
|
-
end
|
49
|
+
end
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -67,7 +67,7 @@ module CPEE
|
|
67
67
|
@mutex = Mutex.new
|
68
68
|
@opts = opts
|
69
69
|
|
70
|
-
@properties = Riddl::Utils::Properties::Backend.new(
|
70
|
+
@properties = Riddl::Utils::Properties::Backend.new(
|
71
71
|
{
|
72
72
|
:inactive => opts[:properties_schema_inactive],
|
73
73
|
:active => opts[:properties_schema_active],
|
@@ -87,7 +87,7 @@ module CPEE
|
|
87
87
|
unless ['stopped','ready','finished'].include?(@properties.data.find("string(/p:properties/p:state)"))
|
88
88
|
@properties.modify do |doc|
|
89
89
|
doc.find("/p:properties/p:state").first.text = 'stopped'
|
90
|
-
end
|
90
|
+
end
|
91
91
|
end
|
92
92
|
unserialize_handlerwrapper!
|
93
93
|
unserialize_dataelements!
|
@@ -104,19 +104,19 @@ module CPEE
|
|
104
104
|
attr_reader :mutex
|
105
105
|
attr_reader :attributes
|
106
106
|
|
107
|
-
def base_url
|
107
|
+
def base_url
|
108
108
|
@opts[:url]
|
109
109
|
end
|
110
110
|
def base_jid
|
111
111
|
@opts[:jid]
|
112
112
|
end
|
113
|
-
def instance_url
|
113
|
+
def instance_url
|
114
114
|
"#{@opts[:url]}/#{@id}"
|
115
115
|
end
|
116
116
|
def instance_jid
|
117
117
|
"#{@opts[:jid]}/#{@id}"
|
118
118
|
end
|
119
|
-
def xmpp
|
119
|
+
def xmpp
|
120
120
|
@opts[:xmpp]
|
121
121
|
end
|
122
122
|
def base
|
@@ -125,7 +125,7 @@ module CPEE
|
|
125
125
|
def instance
|
126
126
|
@opts[:jid] ? instance_url + "," + instance_jid : instance_url
|
127
127
|
end
|
128
|
-
|
128
|
+
|
129
129
|
def sim # {{{
|
130
130
|
@thread.join if !@thread.nil? && @thread.alive?
|
131
131
|
@thread = @instance.sim
|
@@ -142,16 +142,16 @@ module CPEE
|
|
142
142
|
def stop # {{{
|
143
143
|
t = @instance.stop
|
144
144
|
t.run
|
145
|
-
@callbacks.delete_if do |k,c|
|
145
|
+
@callbacks.delete_if do |k,c|
|
146
146
|
# only remove vote_callbacks, the other stuff is removed by
|
147
147
|
# the instance stopping cleanup
|
148
148
|
if c.method == :vote_callback
|
149
149
|
c.callback
|
150
150
|
true
|
151
|
-
else
|
151
|
+
else
|
152
152
|
false
|
153
153
|
end
|
154
|
-
end
|
154
|
+
end
|
155
155
|
@thread.join if !@thread.nil? && @thread.alive?
|
156
156
|
@callback = [] # everything should be empty now
|
157
157
|
end # }}}
|
@@ -186,8 +186,8 @@ module CPEE
|
|
186
186
|
@properties.modify do |doc|
|
187
187
|
node = doc.find("/p:properties/p:state").first
|
188
188
|
node.text = @instance.state
|
189
|
-
end
|
190
|
-
end
|
189
|
+
end
|
190
|
+
end
|
191
191
|
end # }}}
|
192
192
|
def serialize_positions! # {{{
|
193
193
|
@properties.modify do |doc|
|
@@ -212,22 +212,22 @@ module CPEE
|
|
212
212
|
case op
|
213
213
|
when :del
|
214
214
|
@notifications.subscriptions[key].delete if @notifications.subscriptions.include?(key)
|
215
|
-
|
215
|
+
|
216
216
|
@communication[key].io.close_connection if @communication[key].class == Riddl::Utils::Notifications::Producer::WS
|
217
217
|
@communication.delete(key)
|
218
218
|
|
219
219
|
@events.each do |eve,keys|
|
220
220
|
keys.delete_if{|k,v| key == k}
|
221
|
-
end
|
221
|
+
end
|
222
222
|
@votes.each do |eve,keys|
|
223
223
|
keys.delete_if do |k,v|
|
224
224
|
if key == k
|
225
225
|
@callbacks.each{|voteid,cb|cb.delete_if!(eve,k)}
|
226
226
|
true
|
227
|
-
end
|
227
|
+
end
|
228
228
|
end
|
229
|
-
end
|
230
|
-
when :upd
|
229
|
+
end
|
230
|
+
when :upd
|
231
231
|
if @notifications.subscriptions.include?(key)
|
232
232
|
url = @communication[key]
|
233
233
|
evs = []
|
@@ -235,7 +235,7 @@ module CPEE
|
|
235
235
|
@events.each { |e,v| evs << e }
|
236
236
|
@votes.each { |e,v| vos << e }
|
237
237
|
@notifications.subscriptions[key].read do |doc|
|
238
|
-
turl = doc.find('string(/n:subscription/@url)')
|
238
|
+
turl = doc.find('string(/n:subscription/@url)')
|
239
239
|
url = turl == '' ? url : turl
|
240
240
|
@communication[key] = url
|
241
241
|
doc.find('/n:subscription/n:topic').each do |t|
|
@@ -252,14 +252,14 @@ module CPEE
|
|
252
252
|
end
|
253
253
|
end
|
254
254
|
evs.each { |e| @events[e].delete(key) if @events[e] }
|
255
|
-
vos.each do |e|
|
255
|
+
vos.each do |e|
|
256
256
|
@callbacks.each{|voteid,cb|cb.delete_if!(e,key)}
|
257
257
|
@votes[e].delete(key) if @votes[e]
|
258
|
-
end
|
259
|
-
end
|
258
|
+
end
|
259
|
+
end
|
260
260
|
when :cre
|
261
261
|
@notifications.subscriptions[key].read do |doc|
|
262
|
-
turl = doc.find('string(/n:subscription/@url)')
|
262
|
+
turl = doc.find('string(/n:subscription/@url)')
|
263
263
|
url = turl == '' ? nil : turl
|
264
264
|
@communication[key] = url
|
265
265
|
doc.find('/n:subscription/n:topic').each do |t|
|
@@ -272,10 +272,10 @@ module CPEE
|
|
272
272
|
@votes["#{t.attributes['id']}/#{e}"][key] = url
|
273
273
|
end
|
274
274
|
end
|
275
|
-
end
|
276
|
-
end
|
277
|
-
end # }}}
|
278
|
-
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end # }}}
|
278
|
+
|
279
279
|
def unserialize_attributes! #{{{
|
280
280
|
@attributes = {}
|
281
281
|
@properties.data.find("/p:properties/p:attributes/p:*").map do |ele|
|
@@ -294,7 +294,7 @@ module CPEE
|
|
294
294
|
@instance.endpoints[e.qname.to_sym] = e.text
|
295
295
|
end
|
296
296
|
end #}}}
|
297
|
-
def unserialize_state! #{{{
|
297
|
+
def unserialize_state! #{{{
|
298
298
|
state = @properties.data.find("string(/p:properties/p:state)")
|
299
299
|
if call_vote("state/change", :instance => @id, :info => info, :state => state)
|
300
300
|
case state
|
@@ -302,7 +302,7 @@ module CPEE
|
|
302
302
|
stop
|
303
303
|
when 'running'
|
304
304
|
start
|
305
|
-
when 'simulating'
|
305
|
+
when 'simulating'
|
306
306
|
sim
|
307
307
|
when 'ready'
|
308
308
|
@instance.state_signal
|
@@ -318,14 +318,14 @@ module CPEE
|
|
318
318
|
begin
|
319
319
|
hw = eval(@properties.data.find("string(/p:properties/p:handlerwrapper)"))
|
320
320
|
@instance.handlerwrapper = hw
|
321
|
-
rescue => e
|
321
|
+
rescue => e
|
322
322
|
@instance.handlerwrapper = DefaultHandlerWrapper
|
323
|
-
end
|
323
|
+
end
|
324
324
|
if hw != @instance.handlerwrapper
|
325
325
|
@properties.modify do |doc|
|
326
326
|
node = doc.find("/p:properties/p:handlerwrapper").first
|
327
327
|
node.text = @instance.handlerwrapper.to_s
|
328
|
-
end
|
328
|
+
end
|
329
329
|
end
|
330
330
|
end #}}}
|
331
331
|
def unserialize_positions! #{{{
|
@@ -356,7 +356,7 @@ module CPEE
|
|
356
356
|
|
357
357
|
if desc.children.empty?
|
358
358
|
tdesctype = tdatatype = tendptype = 'clean'
|
359
|
-
end
|
359
|
+
end
|
360
360
|
|
361
361
|
### description transformation, including dslx to dsl
|
362
362
|
addit = if tdesctype == 'copy' || tdesc.empty?
|
@@ -367,17 +367,17 @@ module CPEE
|
|
367
367
|
Riddl::Parameter::Complex.new("description","text/xml",desc.children.first.dump),
|
368
368
|
Riddl::Parameter::Simple.new("type","description")
|
369
369
|
]
|
370
|
-
if status >= 200 && status < 300
|
371
|
-
XML::Smart::string(res[0].value.read).root
|
372
|
-
else
|
373
|
-
raise 'Could not extract dslx'
|
374
|
-
end
|
370
|
+
if status >= 200 && status < 300
|
371
|
+
XML::Smart::string(res[0].value.read).root
|
372
|
+
else
|
373
|
+
raise 'Could not extract dslx'
|
374
|
+
end
|
375
375
|
elsif tdesctype == 'xslt' && !tdesc.empty?
|
376
376
|
trans = XML::Smart::open_unprotected(tdesc.text)
|
377
377
|
desc.children.first.to_doc.transform_with(trans).root
|
378
378
|
elsif tdesctype == 'clean'
|
379
379
|
XML::Smart::open_unprotected(@opts[:empty_dslx]).root
|
380
|
-
else
|
380
|
+
else
|
381
381
|
nil
|
382
382
|
end
|
383
383
|
unless addit.nil?
|
@@ -391,15 +391,15 @@ module CPEE
|
|
391
391
|
### dataelements extraction
|
392
392
|
addit = if tdatatype == 'rest' && !tdata.empty?
|
393
393
|
srv = Riddl::Client.interface(tdata.text,@opts[:transformation_service],:xmpp => @opts[:xmpp])
|
394
|
-
status, res = srv.post [
|
394
|
+
status, res = srv.post [
|
395
395
|
Riddl::Parameter::Complex.new("description","text/xml",desc.children.first.dump),
|
396
396
|
Riddl::Parameter::Simple.new("type","dataelements")
|
397
397
|
]
|
398
|
-
if status >= 200 && status < 300
|
398
|
+
if status >= 200 && status < 300
|
399
399
|
res
|
400
|
-
else
|
401
|
-
raise 'Could not extract dataelements'
|
402
|
-
end
|
400
|
+
else
|
401
|
+
raise 'Could not extract dataelements'
|
402
|
+
end
|
403
403
|
elsif tdatatype == 'xslt' && !tdata.empty?
|
404
404
|
trans = XML::Smart::open_unprotected(tdata.text)
|
405
405
|
desc.children.first.to_doc.transform_with(trans)
|
@@ -407,7 +407,7 @@ module CPEE
|
|
407
407
|
[]
|
408
408
|
else
|
409
409
|
nil
|
410
|
-
end
|
410
|
+
end
|
411
411
|
unless addit.nil?
|
412
412
|
node = doc.find("/p:properties/p:dataelements").first
|
413
413
|
node.children.delete_all!
|
@@ -415,22 +415,22 @@ module CPEE
|
|
415
415
|
addit.each_slice(2).each do |k,v|
|
416
416
|
@instance.data[k.value.to_sym] = ValueHelper::parse(v.value)
|
417
417
|
node.add(k.value,ValueHelper::generate(v.value))
|
418
|
-
end
|
418
|
+
end
|
419
419
|
nots << ["dataelements/change", {:instance => instance, :changed => JSON::generate(@instance.data)}]
|
420
|
-
end
|
420
|
+
end
|
421
421
|
|
422
422
|
### endpoints extraction
|
423
423
|
addit = if tendptype == 'rest' && !tdata.empty?
|
424
424
|
srv = Riddl::Client.interface(tendp.text,@opts[:transformation_service],:xmpp => @opts[:xmpp])
|
425
|
-
status, res = srv.post [
|
425
|
+
status, res = srv.post [
|
426
426
|
Riddl::Parameter::Complex.new("description","text/xml",desc.children.first.dump),
|
427
427
|
Riddl::Parameter::Simple.new("type","endpoints")
|
428
428
|
]
|
429
|
-
if status >= 200 && status < 300
|
429
|
+
if status >= 200 && status < 300
|
430
430
|
res
|
431
|
-
else
|
432
|
-
raise 'Could not extract endpoints'
|
433
|
-
end
|
431
|
+
else
|
432
|
+
raise 'Could not extract endpoints'
|
433
|
+
end
|
434
434
|
elsif tendptype == 'xslt' && !tdata.empty?
|
435
435
|
trans = XML::Smart::open_unprotected(tendp.text)
|
436
436
|
desc.children.first.to_doc.transform_with(trans)
|
@@ -438,7 +438,7 @@ module CPEE
|
|
438
438
|
[]
|
439
439
|
else
|
440
440
|
nil
|
441
|
-
end
|
441
|
+
end
|
442
442
|
unless addit.nil?
|
443
443
|
node = doc.find("/p:properties/p:endpoints").first
|
444
444
|
node.children.delete_all!
|
@@ -446,9 +446,9 @@ module CPEE
|
|
446
446
|
addit.each_slice(2).each do |k,v|
|
447
447
|
@instance.endpoints[k.value.to_sym] = ValueHelper::parse(v.value)
|
448
448
|
node.add(k.value,ValueHelper::generate(v.value))
|
449
|
-
end
|
449
|
+
end
|
450
450
|
nots << ["endpoints/change", {:instance => instance, :changed => JSON::generate(@instance.endpoints)}]
|
451
|
-
end
|
451
|
+
end
|
452
452
|
nots << ["description/change", { :instance => instance }]
|
453
453
|
rescue => err
|
454
454
|
nots << ["description/error", { :instance => instance, :message => err.message }]
|
@@ -475,7 +475,7 @@ module CPEE
|
|
475
475
|
e.root.add(k,v)
|
476
476
|
end
|
477
477
|
url.send(e.to_s) rescue nil
|
478
|
-
end
|
478
|
+
end
|
479
479
|
end
|
480
480
|
end
|
481
481
|
end
|
@@ -493,7 +493,7 @@ module CPEE
|
|
493
493
|
inum += 1
|
494
494
|
elsif url.class == Riddl::Utils::Notifications::Producer::WS
|
495
495
|
inum += 1 unless url.closed?
|
496
|
-
end
|
496
|
+
end
|
497
497
|
end
|
498
498
|
|
499
499
|
item.each do |key,url|
|
@@ -515,7 +515,7 @@ module CPEE
|
|
515
515
|
else
|
516
516
|
vote_callback(result,nil,continue,voteid,callback,inum)
|
517
517
|
end
|
518
|
-
end
|
518
|
+
end
|
519
519
|
elsif u.class == Riddl::Utils::Notifications::Producer::WS
|
520
520
|
@callbacks[callback] = Callback.new("vote #{notf.find{|a,b| a == 'notification'}[1]}", self, :vote_callback, what, k, :ws, continue, voteid, callback, inum)
|
521
521
|
e = XML::Smart::string("<vote/>")
|
@@ -530,7 +530,7 @@ module CPEE
|
|
530
530
|
continue.wait
|
531
531
|
|
532
532
|
!@votes_results.delete(voteid).include?(false)
|
533
|
-
else
|
533
|
+
else
|
534
534
|
true
|
535
535
|
end
|
536
536
|
end # }}}
|
@@ -541,10 +541,10 @@ module CPEE
|
|
541
541
|
@votes_results[voteid] << true
|
542
542
|
else
|
543
543
|
@votes_results[voteid] << (result && result[0] && result[0].value == 'true')
|
544
|
-
end
|
544
|
+
end
|
545
545
|
if (num == @votes_results[voteid].length)
|
546
546
|
continue.continue
|
547
|
-
end
|
547
|
+
end
|
548
548
|
end # }}}
|
549
549
|
|
550
550
|
def add_websocket(key,socket)# {{{
|
@@ -552,12 +552,12 @@ module CPEE
|
|
552
552
|
@events.each do |a|
|
553
553
|
if a[1].has_key?(key)
|
554
554
|
a[1][key] = socket
|
555
|
-
end
|
555
|
+
end
|
556
556
|
end
|
557
557
|
@votes.each do |a|
|
558
558
|
if a[1].has_key?(key)
|
559
559
|
a[1][key] = socket
|
560
|
-
end
|
560
|
+
end
|
561
561
|
end
|
562
562
|
end # }}}
|
563
563
|
|
@@ -576,4 +576,4 @@ module CPEE
|
|
576
576
|
|
577
577
|
end
|
578
578
|
|
579
|
-
end
|
579
|
+
end
|