cpee 1.3.221 → 1.3.222
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/js/details.js +2 -2
- data/cpee.gemspec +1 -1
- data/lib/cpee/processtransformation/bpmn2.rb +34 -29
- data/lib/cpee/processtransformation/cpee.rb +5 -1
- data/lib/cpee/processtransformation/structures.rb +40 -29
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3cb661f17cc471a5d31bc342379814800f3b14c
|
4
|
+
data.tar.gz: 0350166c37455dcc58d739137bfdaf35dcd9858c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ebeee1e5d632161e6f0213d85a229c7f0e0f9802dcd4552ff47951e0680767c1710fc75703c24827f629959a7b7444e992556be0b5caab7865d9328a1fab363
|
7
|
+
data.tar.gz: 6deba5a57f9e189dcf7624acb0189407210de3ad80dfcd629a03265e8e88ac9e811782b85d89f9d12b6cf232b1d0df7d5996989bb896c00553a145e8ae173cd9
|
data/cockpit/js/details.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$(document).ready(function() {
|
2
2
|
var timer;
|
3
3
|
|
4
|
-
$(document).on('input','#dat_details input, #dat_details textarea',function(e){
|
4
|
+
$(document).on('input','#dat_details input, #dat_details textarea, #dat_details [contenteditable]',function(e){
|
5
5
|
clearTimeout(timer);
|
6
6
|
timer = setTimeout(do_main_save, 5000);
|
7
7
|
});
|
@@ -9,7 +9,7 @@ $(document).ready(function() {
|
|
9
9
|
clearTimeout(timer);
|
10
10
|
do_main_save();
|
11
11
|
});
|
12
|
-
$(document).on('blur','#dat_details input, #dat_details textarea',function(e){
|
12
|
+
$(document).on('blur','#dat_details input, #dat_details textarea, #dat_details [contenteditable]',function(e){
|
13
13
|
clearTimeout(timer);
|
14
14
|
do_main_save();
|
15
15
|
});
|
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.222"
|
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"
|
@@ -3,15 +3,15 @@
|
|
3
3
|
# This file is part of CPEE.
|
4
4
|
#
|
5
5
|
# Apache License, Version 2.0
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# Copyright (c) 2013 Juergen Mangler
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
10
|
# you may not use this file except in compliance with the License.
|
11
11
|
# You may obtain a copy of the License at
|
12
|
-
#
|
12
|
+
#
|
13
13
|
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
#
|
14
|
+
#
|
15
15
|
# Unless required by applicable law or agreed to in writing, software
|
16
16
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
17
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@@ -38,7 +38,7 @@ module CPEE
|
|
38
38
|
@start = nil
|
39
39
|
|
40
40
|
doc = XML::Smart.string(xml)
|
41
|
-
doc.register_namespace 'bm', "http://www.omg.org/spec/BPMN/20100524/MODEL"
|
41
|
+
doc.register_namespace 'bm', "http://www.omg.org/spec/BPMN/20100524/MODEL"
|
42
42
|
|
43
43
|
@dataelements = {}
|
44
44
|
@endpoints = {}
|
@@ -51,27 +51,27 @@ module CPEE
|
|
51
51
|
@traces = Traces.new [[@start]]
|
52
52
|
end #}}}
|
53
53
|
|
54
|
-
def extract_dataelements(doc)
|
54
|
+
def extract_dataelements(doc) #{{{
|
55
55
|
doc.find("/bm:definitions/bm:process/bm:property[bm:dataState/@name='cpee:dataelement']").each do |ref|
|
56
56
|
if ref.attributes['itemSubjectRef']
|
57
57
|
doc.find("/bm:definitions/bm:itemDefinition[@id=\"" + ref.attributes['itemSubjectRef'] + "\"]").each do |sref|
|
58
58
|
@dataelements[ref.attributes['name']] = sref.attributes['structureRef'].to_s
|
59
|
-
end
|
59
|
+
end
|
60
60
|
else
|
61
61
|
@dataelements[ref.attributes['name']] = ''
|
62
|
-
end
|
62
|
+
end
|
63
63
|
end
|
64
|
-
end
|
64
|
+
end #}}}
|
65
65
|
|
66
|
-
def extract_endpoints(doc)
|
66
|
+
def extract_endpoints(doc) #{{{
|
67
67
|
doc.find("/bm:definitions/bm:process/bm:property[bm:dataState/@name='cpee:endpoint']/@itemSubjectRef").each do |ref|
|
68
68
|
doc.find("/bm:definitions/bm:itemDefinition[@id=\"" + ref.value + "\"]/@structureRef").each do |sref|
|
69
69
|
@endpoints[ref.value] = sref.value
|
70
|
-
end
|
70
|
+
end
|
71
71
|
end
|
72
|
-
end
|
72
|
+
end #}}}
|
73
73
|
|
74
|
-
def extract_nodelink(doc)
|
74
|
+
def extract_nodelink(doc) #{{{
|
75
75
|
doc.find("/bm:definitions/bm:process/bm:*[@id and @name and not(@itemSubjectRef) and not(name()='sequenceFlow')]").each do |e|
|
76
76
|
n = Node.new(self.object_id,e.attributes['id'],e.qname.name.to_sym,e.attributes['name'].strip,e.find('count(bm:incoming)'),e.find('count(bm:outgoing)'))
|
77
77
|
|
@@ -94,7 +94,7 @@ module CPEE
|
|
94
94
|
value = a.attributes['itemSubjectRef']
|
95
95
|
if @dataelements.keys.include?(value)
|
96
96
|
n.parameters[name] = 'data.' + value
|
97
|
-
else
|
97
|
+
else
|
98
98
|
n.parameters[name] = value
|
99
99
|
end
|
100
100
|
end
|
@@ -127,9 +127,9 @@ module CPEE
|
|
127
127
|
true
|
128
128
|
else
|
129
129
|
false
|
130
|
-
end
|
130
|
+
end
|
131
131
|
end
|
132
|
-
end
|
132
|
+
end #}}}
|
133
133
|
|
134
134
|
def build_traces #{{{
|
135
135
|
build_extraces @traces, @start
|
@@ -140,14 +140,14 @@ module CPEE
|
|
140
140
|
debug_print debug, 'Tree finished'
|
141
141
|
@tree
|
142
142
|
end #}}}
|
143
|
-
|
143
|
+
|
144
144
|
def build_extraces(traces, node) #{{{
|
145
145
|
dupt = traces.last.dup
|
146
146
|
@graph.next_nodes(node).each_with_index do |n,i|
|
147
147
|
traces << dupt.dup if i > 0
|
148
148
|
if traces.last.include?(n)
|
149
149
|
traces.last << n
|
150
|
-
else
|
150
|
+
else
|
151
151
|
traces.last << n
|
152
152
|
build_extraces(traces,n)
|
153
153
|
end
|
@@ -199,12 +199,12 @@ module CPEE
|
|
199
199
|
if branch.condition?
|
200
200
|
branch.condition << li.condition unless li.condition.nil?
|
201
201
|
branch.condition_type = "text/javascript"
|
202
|
-
end
|
202
|
+
end
|
203
203
|
if branch.respond_to?(:attributes)
|
204
|
-
branch.attributes.merge!(li.attributes)
|
204
|
+
branch.attributes.merge!(li.attributes)
|
205
205
|
li.attributes.delete_if{true}
|
206
|
-
end
|
207
|
-
end
|
206
|
+
end
|
207
|
+
end
|
208
208
|
end
|
209
209
|
if node == enode
|
210
210
|
traces.shift_all
|
@@ -228,13 +228,17 @@ module CPEE
|
|
228
228
|
### if there is non (tail controlled, remove the loop target (last)
|
229
229
|
if node.type == :exclusiveGateway
|
230
230
|
loops.shift_all
|
231
|
-
traces.shift_all
|
231
|
+
traces.shift_all
|
232
232
|
else
|
233
233
|
loops.pop_all
|
234
234
|
end
|
235
235
|
### add the blank conditional to get a break
|
236
236
|
puts '--> down head_loop to ' + (down + 1).to_s if debug
|
237
|
-
|
237
|
+
if loops.same_first
|
238
|
+
build_ttree branch.last.new_branch, loops, nil, debug, down + 1
|
239
|
+
else
|
240
|
+
build_ttree branch, loops, nil, debug, down + 1
|
241
|
+
end
|
238
242
|
puts '--> up head_loop from ' + (down + 1).to_s if debug
|
239
243
|
else
|
240
244
|
### throw away the loop traces, remove loop traces from front of all other traces
|
@@ -252,19 +256,20 @@ module CPEE
|
|
252
256
|
puts "--> endnode #{endnode.nil? ? 'nil' : endnode.niceid}" if debug
|
253
257
|
tracesgroup, endnode = traces.segment_by endnode
|
254
258
|
tracesgroup.each do |trcs|
|
259
|
+
next unless branch.last.respond_to?(:new_branch)
|
255
260
|
nb = branch.last.new_branch
|
256
261
|
unless trcs.finished?
|
257
262
|
puts '--> branch down to ' + (down + 1).to_s if debug
|
258
263
|
build_ttree nb, trcs, endnode, debug, down + 1
|
259
264
|
puts '--> branch up from ' + (down + 1).to_s if debug
|
260
|
-
end
|
265
|
+
end
|
261
266
|
end
|
262
267
|
# remove all traces that don't start with endnode to account for loops
|
263
268
|
if endnode.nil?
|
264
269
|
traces.empty!
|
265
|
-
else
|
270
|
+
else
|
266
271
|
traces.remove_by_endnode(endnode)
|
267
|
-
end
|
272
|
+
end
|
268
273
|
end
|
269
274
|
end
|
270
275
|
end
|
@@ -275,7 +280,7 @@ module CPEE
|
|
275
280
|
puts '-' * @hl.output_cols, @tree.to_s
|
276
281
|
puts traces.to_s
|
277
282
|
@hl.ask('Continue ... '){ |q| q.echo = false }
|
278
|
-
end
|
283
|
+
end
|
279
284
|
end #}}}
|
280
285
|
private :debug_print
|
281
286
|
|
@@ -283,7 +288,7 @@ module CPEE
|
|
283
288
|
formater.new(@tree).generate
|
284
289
|
end #}}}
|
285
290
|
|
286
|
-
end
|
291
|
+
end
|
287
292
|
|
288
293
|
end
|
289
294
|
|
@@ -47,7 +47,11 @@ module CPEE
|
|
47
47
|
generate_for_list(node.sub[0],s1)
|
48
48
|
else
|
49
49
|
s1 = res.add('loop', 'mode' => 'pre_test', 'condition' => 'true')
|
50
|
-
|
50
|
+
if node.sub.length == 1
|
51
|
+
generate_for_list(node.sub[0],s1)
|
52
|
+
else
|
53
|
+
print_Conditional(node,s1)
|
54
|
+
end
|
51
55
|
end
|
52
56
|
s1
|
53
57
|
end
|
@@ -3,15 +3,15 @@
|
|
3
3
|
# This file is part of CPEE.
|
4
4
|
#
|
5
5
|
# Apache License, Version 2.0
|
6
|
-
#
|
6
|
+
#
|
7
7
|
# Copyright (c) 2013 Juergen Mangler
|
8
|
-
#
|
8
|
+
#
|
9
9
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
10
|
# you may not use this file except in compliance with the License.
|
11
11
|
# You may obtain a copy of the License at
|
12
|
-
#
|
12
|
+
#
|
13
13
|
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
#
|
14
|
+
#
|
15
15
|
# Unless required by applicable law or agreed to in writing, software
|
16
16
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
17
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@@ -33,10 +33,10 @@ module CPEE
|
|
33
33
|
end
|
34
34
|
def length
|
35
35
|
@sub.length
|
36
|
-
end
|
36
|
+
end
|
37
37
|
end #}}}
|
38
38
|
|
39
|
-
class Node #{{{
|
39
|
+
class Node #{{{
|
40
40
|
include Container
|
41
41
|
@@niceid = {}
|
42
42
|
attr_reader :id, :label, :niceid
|
@@ -59,7 +59,7 @@ module CPEE
|
|
59
59
|
@outgoing = outgoing
|
60
60
|
@attributes = {}
|
61
61
|
end
|
62
|
-
end # }}}
|
62
|
+
end # }}}
|
63
63
|
class Link #{{{
|
64
64
|
attr_accessor :from, :to
|
65
65
|
attr_reader :condition, :attributes
|
@@ -116,7 +116,7 @@ module CPEE
|
|
116
116
|
@sub = []
|
117
117
|
@condition_type = nil
|
118
118
|
@attributes = {}
|
119
|
-
end
|
119
|
+
end
|
120
120
|
def new_branch
|
121
121
|
(@sub << Alternative.new(@id)).last
|
122
122
|
end
|
@@ -138,7 +138,7 @@ module CPEE
|
|
138
138
|
def new_branch
|
139
139
|
(@sub << Branch.new(@id)).last
|
140
140
|
end
|
141
|
-
end #}}}
|
141
|
+
end #}}}
|
142
142
|
|
143
143
|
class Conditional #{{{
|
144
144
|
include Container
|
@@ -155,7 +155,7 @@ module CPEE
|
|
155
155
|
@mode = mode
|
156
156
|
@type = type
|
157
157
|
@attributes = {}
|
158
|
-
end
|
158
|
+
end
|
159
159
|
def new_branch
|
160
160
|
(@sub << Alternative.new(@id)).last
|
161
161
|
end
|
@@ -182,7 +182,7 @@ module CPEE
|
|
182
182
|
selnodes.each do |n|
|
183
183
|
if n.incoming > 1 || n.outgoing > 1
|
184
184
|
raise "#{n.inspect} - not a simple node to remove"
|
185
|
-
end
|
185
|
+
end
|
186
186
|
to,from = nil
|
187
187
|
@links.each do |f|
|
188
188
|
to = f if f.to == n.id
|
@@ -194,7 +194,7 @@ module CPEE
|
|
194
194
|
@nodes.delete(n.id)
|
195
195
|
else
|
196
196
|
raise "#{n.inspect} - could not remove flow"
|
197
|
-
end
|
197
|
+
end
|
198
198
|
end
|
199
199
|
end
|
200
200
|
|
@@ -204,7 +204,7 @@ module CPEE
|
|
204
204
|
|
205
205
|
def add_node(n)
|
206
206
|
@nodes[n.id] = n
|
207
|
-
end
|
207
|
+
end
|
208
208
|
|
209
209
|
def link(f,t)
|
210
210
|
@links.find{ |x| x.from == f && x.to == t }
|
@@ -224,7 +224,7 @@ module CPEE
|
|
224
224
|
nodes.first
|
225
225
|
else
|
226
226
|
raise "#{from.inspect} - multiple outgoing connections"
|
227
|
-
end
|
227
|
+
end
|
228
228
|
end
|
229
229
|
end #}}}
|
230
230
|
|
@@ -263,11 +263,11 @@ module CPEE
|
|
263
263
|
def remove(trcs)
|
264
264
|
trcs.each do |t|
|
265
265
|
self.delete(t)
|
266
|
-
end
|
266
|
+
end
|
267
267
|
end
|
268
268
|
def remove_by_endnode(enode)
|
269
269
|
self.delete_if do |t|
|
270
|
-
t[0] != enode
|
270
|
+
t[0] != enode
|
271
271
|
end
|
272
272
|
end
|
273
273
|
|
@@ -290,16 +290,27 @@ module CPEE
|
|
290
290
|
self.min_by{|e|e.length}
|
291
291
|
end
|
292
292
|
|
293
|
+
def legend
|
294
|
+
ret = "Legend:\n"
|
295
|
+
a = self.flatten.uniq
|
296
|
+
a.each {|n| ret << " " + n.niceid.to_s + ' ' + n.type.to_s + ' ' + n.label.to_s + "\n" }
|
297
|
+
ret
|
298
|
+
end
|
299
|
+
|
293
300
|
def to_s
|
294
301
|
"TRACES: " + self.collect { |t| t.empty? ? '∅' : t.collect{|n| "%2d" % n.niceid }.join('→ ') }.join("\n ")
|
295
302
|
end
|
296
303
|
|
297
304
|
def shift_all
|
298
305
|
self.each{ |tr| tr.shift }
|
299
|
-
end
|
300
|
-
def pop_all
|
301
|
-
|
302
|
-
|
306
|
+
end
|
307
|
+
def pop_all(what=nil)
|
308
|
+
if node.nil?
|
309
|
+
self.each{ |tr| tr.pop }
|
310
|
+
else
|
311
|
+
self.each{ |tr| tr.pop if tr.last == what }
|
312
|
+
end
|
313
|
+
end
|
303
314
|
|
304
315
|
def finished?
|
305
316
|
self.reduce(0){|sum,t| sum += t.length} == 0
|
@@ -314,13 +325,13 @@ module CPEE
|
|
314
325
|
self.each do |t|
|
315
326
|
break if t.length == 1
|
316
327
|
tcount += 1 if t.last == node
|
317
|
-
end
|
328
|
+
end
|
318
329
|
tcount
|
319
330
|
end
|
320
331
|
|
321
332
|
def include_in_all?(e)
|
322
333
|
num = 0
|
323
|
-
self.each{|n| num += 1 if n.include?(e)}
|
334
|
+
self.each{|n| num += 1 if n.include?(e)}
|
324
335
|
num == self.length
|
325
336
|
end
|
326
337
|
|
@@ -339,7 +350,7 @@ module CPEE
|
|
339
350
|
self.each do |t|
|
340
351
|
t << tb unless t.last == t.first ### an explicit break
|
341
352
|
end
|
342
|
-
end
|
353
|
+
end
|
343
354
|
end
|
344
355
|
|
345
356
|
def loops
|
@@ -365,7 +376,7 @@ module CPEE
|
|
365
376
|
if self[i][j] == self[i].last
|
366
377
|
loops << self[i].shift(self[i].length)
|
367
378
|
end
|
368
|
-
end
|
379
|
+
end
|
369
380
|
end
|
370
381
|
loops.uniq!
|
371
382
|
loops.remove_empty
|
@@ -403,9 +414,9 @@ module CPEE
|
|
403
414
|
if t.index(last) && t.index(max)
|
404
415
|
(t.index(last) + 1).upto(t.index(max)) do |i|
|
405
416
|
t << t[i]
|
406
|
-
end
|
417
|
+
end
|
407
418
|
end
|
408
|
-
end
|
419
|
+
end
|
409
420
|
end
|
410
421
|
|
411
422
|
max
|
@@ -424,11 +435,11 @@ module CPEE
|
|
424
435
|
if trcs.include_in_all?(n)
|
425
436
|
enode = n
|
426
437
|
break
|
427
|
-
end
|
438
|
+
end
|
428
439
|
end
|
429
|
-
end
|
440
|
+
end
|
430
441
|
enode
|
431
|
-
end
|
442
|
+
end
|
432
443
|
|
433
444
|
def segment_by(endnode)
|
434
445
|
# cut shit until common node, return the shit you cut away
|
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: 1.3.
|
4
|
+
version: 1.3.222
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: tools
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-01-
|
14
|
+
date: 2018-01-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: riddl
|