cpee 1.3.164 → 1.3.166

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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +5 -12
  3. data/cockpit/index.html +4 -4
  4. data/cockpit/js/instance.js +34 -14
  5. data/cockpit/js/wfadaptor.cpee.js +5 -5
  6. data/cockpit/testsets/CPEE.xml +16 -0
  7. data/cockpit/testsets/{Signavio Model Base.xml → Signavio.xml} +0 -0
  8. data/cockpit/testsets/{index.xml → testsets.xml} +0 -0
  9. data/cockpit/testsets/transformations.xml +4 -0
  10. data/cpee.gemspec +1 -1
  11. data/lib/cpee/processtransformation/bpmn2.rb +12 -14
  12. data/lib/cpee/processtransformation/cpee.rb +3 -22
  13. data/lib/cpee/processtransformation/structures.rb +27 -41
  14. data/lib/cpee/processtransformation/target.rb +48 -0
  15. data/server/instances/13/notifications/4ff0cde5161c44dae49b263cbc12eaf8/consumer-secret +1 -0
  16. data/server/instances/13/notifications/4ff0cde5161c44dae49b263cbc12eaf8/producer-secret +1 -0
  17. data/server/instances/13/notifications/4ff0cde5161c44dae49b263cbc12eaf8/subscription.xml +23 -0
  18. data/server/instances/13/properties.xml +146 -0
  19. data/server/instances/14/properties.xml +332 -0
  20. data/server/instances/15/notifications/a73954a6728b0f086d1ea50245027fbf/consumer-secret +1 -0
  21. data/server/instances/15/notifications/a73954a6728b0f086d1ea50245027fbf/producer-secret +1 -0
  22. data/server/instances/{12/notifications/b0a0abbb8ad6fb81c579c4e97829d681 → 15/notifications/a73954a6728b0f086d1ea50245027fbf}/subscription.xml +3 -0
  23. data/server/instances/15/properties.xml +330 -0
  24. data/server/resources/transformation_dslx.xsl +3 -3
  25. metadata +16 -7
  26. data/server/instances/12/notifications/b0a0abbb8ad6fb81c579c4e97829d681/consumer-secret +0 -1
  27. data/server/instances/12/notifications/b0a0abbb8ad6fb81c579c4e97829d681/producer-secret +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9e39c003d6c60ea476a8befe15a93e3eeda0499
4
- data.tar.gz: c362d7d34ad999b76ce606069d6b01b779b64f3d
3
+ metadata.gz: 198b8bcfa733ead864fc0e454c7ac32b17a8c9e5
4
+ data.tar.gz: 5908f1709219d3e4acd55c0d199fb3288bf1bf72
5
5
  SHA512:
6
- metadata.gz: 183a69191898278d48bb3eeb4bb83b002d32d1c3fef44474fec400c0dcd5b2412e58fc481c8c3096c5e320dfb64da86675158de6c29e5443a175b8435708e015
7
- data.tar.gz: 7a560160ba66231876b568f043aae90793342464c8f6f0ee7e344bdbc2d65b8cbcd1681a61cf7a91210254c66d7449cad21c1f50c51bd11d41e27803e9a942fd
6
+ metadata.gz: 4f3b1b70935400d609579ba813b6facede85f666ef2cbf7ea35a7f829d85183f2341856c78512a565f690cc4f0a3e96a728610ba3a9ca0657854709f9f22df5a
7
+ data.tar.gz: 4857693b77b788378610c44317e6aba7f1a440bd8555498a6bb2abfc10eb1f78f3132113dd17e63a6140bfba92bc34da88c3c732e0501a7106b7850f8597b424
@@ -37,23 +37,16 @@ button.highlight { background-color: #cc0000; }
37
37
  #areainstance select { width: 18em; }
38
38
  #areainstance input[type=file] { width: 18em; }
39
39
 
40
- #areainstance table.compact { width: 100% }
41
40
 
42
41
  #areainstance table.compact tbody.loadsave td:nth-child(2) { padding-right: 0.5em; }
43
42
  #areainstance table.compact tbody.loadsave td:nth-child(3) { padding: 0 0.5em; border-left: 1px solid ButtonShadow; }
44
- #areainstance table.compact tbody.loadsave td:nth-child(3) button { height: 5em; width: 15ex; }
43
+ #areainstance table.compact tbody.loadsave td:nth-child(3) button { height: 5em; }
45
44
  #areainstance table.compact tbody.loadsave td:nth-child(4) { padding: 0 0.5em; border-left: 1px solid ButtonShadow; }
46
- #areainstance table.compact tbody.loadsave td:nth-child(4) button { height: 5em; width: 15ex; }
45
+ #areainstance table.compact tbody.loadsave td:nth-child(4) button { height: 5em; }
47
46
 
48
- #areainstance table.compact button[name=loadtestsetfile] { width: 12em; }
49
- #areainstance table.compact button[name=loadtestset] { width: 12em; }
50
- #areainstance table.compact button[name=loadmodelfile] { width: 12em; }
51
-
52
- #areainstance table.compact:first-child tr td:nth-child(1) { width: 15ex; }
53
-
54
- #areainstance table.compact:last-child tr td:nth-child(1) { width: 18em; }
55
- #areainstance table.compact:last-child tr td:nth-child(2) { width: 12em; }
56
- #areainstance table.compact:last-child tr td:nth-child(3) { width: 15ex; }
47
+ #areainstance table.compact button[name=setmodeltype] { width: 10em; }
48
+ #areainstance table.compact button[name=loadtestset] { width: 10em; }
49
+ #areainstance table.compact button[name=loadmodelfile] { width: 10em; }
57
50
 
58
51
  #areaexecution { height: 7em; overflow: auto; }
59
52
  #areaexecution input { padding: 0; margin:0; }
@@ -192,14 +192,14 @@
192
192
  <table class='compact'>
193
193
  <tbody class='loadsave'>
194
194
  <tr>
195
- <td><select title='a testset includes various setting, subscriptions and a model' name="testset-names"></select></td>
196
- <td><button title='a testset includes various setting, subscriptions and a model' name="loadtestset">load from testset</button></td>
195
+ <td><input type='file' name='testsetfile' id='testsetfile' style='display:none'/><select title='a testset includes various setting, subscriptions and a model' name="testset-names"><optgroup label='Local Files'><option value='###'>Select file ...</option></optgroup><optgroup label='Predefined examples'></optgroup></select></td>
196
+ <td><button title='a testset includes various setting, subscriptions and a model' name="loadtestset">load testset</button></td>
197
197
  <td rowspan='3'><button title='a testset includes various setting, subscriptions and a model' name="savetestset">save testset</button><a id="savetestset" href="" download=""></a></td>
198
198
  <td rowspan='3'><button title='a testset includes various setting, subscriptions and a model' name="savesvg">save svg graph</button><a id="savesvg" href="" download=""></a></td>
199
199
  </tr>
200
200
  <tr>
201
- <td><input title='a testset includes various setting, subscriptions and a model' type='file' id='testsetfile'/></td>
202
- <td><button title='a testset includes various setting, subscriptions and a model' name="loadtestsetfile">load from testset</button></td>
201
+ <td><select title='the model type affects the transformation property of an instance' name="transformation-names"></select></td>
202
+ <td><button title='a testset includes various setting, subscriptions and a model' name="setmodeltype">set model type</button></td>
203
203
  </tr>
204
204
  <tr>
205
205
  <td><input title='a standalone process model is only loadable if the currently loaded testset sucessfully prepared the current instance for the type of model' type='file' id='modelfile'/></td>
@@ -50,23 +50,23 @@ $(document).ready(function() {// {{{
50
50
  $("button[name=base]").click(function(){ create_instance(null); });
51
51
  $("button[name=instance]").click(function(){ ui_tab_click("#tabinstance"); monitor_instance(false); });
52
52
  $("button[name=loadtestset]").click(load_testset);
53
- $("button[name=loadtestsetfile]").click(load_testsetfile);
54
53
  $("button[name=loadmodelfile]").click(load_modelfile);
55
54
  $("button[name=savetestset]").click(function(){ save_testset(); });
56
55
  $("button[name=savesvg]").click(function(){ save_svg(); });
57
56
  $("input[name=votecontinue]").click(check_subscription);
58
-
57
+ $("input[name=testsetfile]").change(load_testsetfile);
59
58
 
60
59
  $.ajax({
61
- url: "testsets/index.xml",
60
+ url: "testsets/testsets.xml",
62
61
  dataType: 'xml',
63
62
  success: function(res){
64
63
  $('testset',res).each(function(){
65
64
  var ts = $(this).text();
66
- $('select[name=testset-names]').append(
65
+ $('select[name=testset-names] optgroup:last-child').append(
67
66
  $("<option></option>").attr("value",ts).text(ts)
68
67
  );
69
68
  });
69
+ $('select[name=testset-names] optgroup:last-child option:first-child').attr('selected','selected');
70
70
  var q = $.parseQuery();
71
71
  if (q.monitor && q.load) {
72
72
  $("input[name=instance-url]").val(q.monitor);
@@ -85,6 +85,18 @@ $(document).ready(function() {// {{{
85
85
  }
86
86
  }
87
87
  });
88
+ $.ajax({
89
+ url: "testsets/transformations.xml",
90
+ dataType: 'xml',
91
+ success: function(res){
92
+ $('transformation',res).each(function(){
93
+ var ts = $(this).text();
94
+ $('select[name=transformation-names]').append(
95
+ $("<option></option>").attr("value",ts).text(ts)
96
+ );
97
+ });
98
+ }
99
+ });
88
100
  });// }}}
89
101
 
90
102
  function check_subscription() { // {{{
@@ -621,6 +633,7 @@ function set_testset(testset) {// {{{
621
633
  }// }}}
622
634
  function load_testsetfile() { //{{{
623
635
  if (running) return;
636
+ running = true;
624
637
  if (typeof window.FileReader !== 'function') {
625
638
  alert('FileReader not yet supportet');
626
639
  return;
@@ -662,16 +675,23 @@ function load_testset() {// {{{
662
675
 
663
676
  var name = $("select[name=testset-names]").val();
664
677
 
665
- $.ajax({
666
- cache: false,
667
- dataType: 'xml',
668
- url: "testsets/" + name + ".xml",
669
- success: function(res){
670
- document.title = name;
671
- set_testset(res);
672
- }
673
- });
674
- running = false;
678
+ if (name == '###') {
679
+ running = false;
680
+ document.getElementById('testsetfile').click();
681
+ } else {
682
+ $.ajax({
683
+ cache: false,
684
+ dataType: 'xml',
685
+ url: "testsets/" + name + ".xml",
686
+ success: function(res){
687
+ document.title = name;
688
+ set_testset(res);
689
+ },
690
+ complete: function() {
691
+ running = false;
692
+ }
693
+ });
694
+ }
675
695
  }// }}}
676
696
 
677
697
  function load_des(url,model) { //{{{
@@ -217,7 +217,7 @@ function CPEE(adaptor) {
217
217
  'description' : {//{{{
218
218
  'create': function(target) {
219
219
  var node = null;
220
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
220
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
221
221
  return node;
222
222
  },
223
223
  'permissible_children': function(node) {
@@ -253,7 +253,7 @@ function CPEE(adaptor) {
253
253
  'description' : {//{{{
254
254
  'create': function(target) {
255
255
  var node = null;
256
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="correlation" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
256
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="correlation" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
257
257
  return node;
258
258
  },
259
259
  'permissible_children': function(node) {
@@ -289,7 +289,7 @@ function CPEE(adaptor) {
289
289
  'description' : {//{{{
290
290
  'create': function(target) {
291
291
  var node = null;
292
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="instantiate" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
292
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="instantiate" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
293
293
  return node;
294
294
  },
295
295
  'permissible_children': function(node) {
@@ -325,7 +325,7 @@ function CPEE(adaptor) {
325
325
  'description' : {//{{{
326
326
  'create': function(target) {
327
327
  var node = null;
328
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
328
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
329
329
  return node;
330
330
  },
331
331
  'permissible_children': function(node) {
@@ -398,7 +398,7 @@ function CPEE(adaptor) {
398
398
  'description' : {//{{{
399
399
  'create': function(target) {
400
400
  var node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://cpee.org/ns/description/1.0"/>');
401
- node.append($X('<parameters xmlns="http://cpee.org/ns/description/1.0"><label></label><method>post</method><parameters/></parameters>'));
401
+ node.append($X('<parameters xmlns="http://cpee.org/ns/description/1.0"><label>""</label><method>:post</method><parameters/></parameters>'));
402
402
  return node;
403
403
  },
404
404
  'permissible_children': function(node) {
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0"?>
2
+ <testset>
3
+ <positions/>
4
+ <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
5
+ <dataelements/>
6
+ <handlers/>
7
+ <endpoints><!--{{{-->
8
+ <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout1.php</timeout>
9
+ </endpoints><!--}}}-->
10
+ <description/>
11
+ <transformation>
12
+ <description type='copy'/>
13
+ <dataelements type='none'/>
14
+ <endpoints type='none'/>
15
+ </transformation>
16
+ </testset>
@@ -0,0 +1,4 @@
1
+ <transformations>
2
+ <transformation>CPEE</transformation>
3
+ <transformation>Signavio</transformation>
4
+ </transformations>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.164"
3
+ s.version = "1.3.166"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
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"
@@ -216,32 +216,34 @@ module CPEE
216
216
  end
217
217
  else
218
218
  loops = traces.loops
219
- if node.type == :exclusiveGateway || traces.all_loops?
219
+ if node.type == :exclusiveGateway || traces.all_loops? # or (infinite loop[s])
220
+ traces.remove(loops)
221
+
220
222
  ### an infinite loop that can only be left by break is created
221
223
  ### at the output time it is decided wether this can be optimized
222
224
  branch << Loop.new(node.id)
223
225
  ### duplicate because we need it later to remove all the shit from traces
224
- lops = loops.dup
226
+ loops.add_breaks(self.object_id,node.type == :exclusiveGateway)
225
227
  ### remove the exclusive gateway because we no longer need it
226
- lops.add_breaks(self.object_id,node.type == :exclusiveGateway)
227
- traces.remove(loops)
228
+ ### if there is non (tail controlled, remove the loop target (last)
228
229
  if node.type == :exclusiveGateway
229
- lops.shift_all
230
+ loops.shift_all
230
231
  traces.shift_all
231
232
  else
232
- lops.pop_all
233
+ loops.pop_all
233
234
  end
234
235
  ### add the blank conditional to get a break
235
236
  puts '--> down head_loop to ' + (down + 1).to_s if debug
236
- build_ttree branch, lops, nil, debug, down + 1
237
+ build_ttree branch, loops, nil, debug, down + 1
237
238
  puts '--> up head_loop from ' + (down + 1).to_s if debug
238
239
  else
239
240
  ### throw away the loop traces, remove loop traces from front of all other traces
240
- traces.segment_by_loops loops
241
+ traces.remove(loops)
242
+ traces.eliminate(loops)
243
+ loops.extend
241
244
  puts '--> down tail_loop to ' + (down + 1).to_s if debug
242
245
  build_ttree branch, loops.dup, nil, debug, down + 1
243
246
  puts '--> up tail_loop from ' + (down + 1).to_s if debug
244
- traces.remove(loops)
245
247
  end
246
248
  traces.remove_empty
247
249
  end
@@ -251,11 +253,7 @@ module CPEE
251
253
  tracesgroup, endnode = traces.segment_by endnode
252
254
  tracesgroup.each do |trcs|
253
255
  nb = branch.last.new_branch
254
- if trcs.finished?
255
- puts '--> branch down to ' + (down + 1).to_s if debug
256
- # build_ttree nb, Traces.new([[Break.new(self.object_id)]]), endnode, debug, down + 1
257
- puts '--> branch up from ' + (down + 1).to_s if debug
258
- else
256
+ unless trcs.finished?
259
257
  puts '--> branch down to ' + (down + 1).to_s if debug
260
258
  build_ttree nb, trcs, endnode, debug, down + 1
261
259
  puts '--> branch up from ' + (down + 1).to_s if debug
@@ -22,38 +22,19 @@ module CPEE
22
22
 
23
23
  module ProcessTransformation
24
24
 
25
- module Target
25
+ module Target
26
26
 
27
- class CPEE
28
- def initialize(tree)
29
- @tree = tree
30
- end
27
+ class CPEE < Default
31
28
  def generate
32
29
  res = XML::Smart.string("<description xmlns='http://cpee.org/ns/description/1.0'/>")
33
30
  res.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
34
- generate_for_list(@tree,res.root)
35
- res
36
- end
37
-
38
- def generate_for_list(list,res)
39
- list.each do |e|
40
- nam = e.class.name.gsub(/\w+:+/,'')
41
- send("print_#{nam}".to_sym,e,res)
42
- end
31
+ super.generate(res.root)
43
32
  end
44
- private :generate_for_list
45
33
 
46
34
  def print_Break(node,res)
47
35
  res.add('escape')
48
36
  end
49
37
 
50
- def print_InfiniteLoop(node,res)
51
- s1 = res.add('loop', 'pre_test' => 'true')
52
- node.attributes.each do |k,v|
53
- s1.attributes[k] = v
54
- end
55
- generate_for_list(node,s1)
56
- end
57
38
  def print_Loop_default(node,res)
58
39
  if node.sub.length == 2
59
40
  s1 = res.add('loop', 'pre_test' => node.sub[0].condition.empty? ? 'true' : node.sub[0].condition.join(' && '))
@@ -22,22 +22,19 @@ module CPEE
22
22
 
23
23
  module ProcessTransformation
24
24
 
25
- class Link #{{{
26
- attr_accessor :from, :to
27
- attr_reader :condition, :attributes
28
- def initialize(from,to,cond=nil)
29
- @from = from
30
- @to = to
31
- @condition = cond
32
- @attributes = {}
33
- end
34
- end #}}}
35
-
36
- module Container
25
+ module Container #{{{
37
26
  def container?
38
27
  @container || false
39
28
  end
40
- end
29
+ end #}}}
30
+ module Struct #{{{
31
+ def each(&a)
32
+ @sub.each{|s| a.call(s)}
33
+ end
34
+ def length
35
+ @sub.length
36
+ end
37
+ end #}}}
41
38
 
42
39
  class Node #{{{
43
40
  include Container
@@ -63,21 +60,21 @@ module CPEE
63
60
  @attributes = {}
64
61
  end
65
62
  end # }}}
66
-
67
- module Struct #{{{
68
- def each(&a)
69
- @sub.each{|s| a.call(s)}
63
+ class Link #{{{
64
+ attr_accessor :from, :to
65
+ attr_reader :condition, :attributes
66
+ def initialize(from,to,cond=nil)
67
+ @from = from
68
+ @to = to
69
+ @condition = cond
70
+ @attributes = {}
70
71
  end
71
- def length
72
- @sub.length
73
- end
74
72
  end #}}}
75
-
76
- class Break < Node
73
+ class Break < Node #{{{
77
74
  def initialize(context)
78
75
  super context, '-1', :break, 'BREAK', 1, []
79
76
  end
80
- end
77
+ end #}}}
81
78
 
82
79
  class Alternative < Array #{{{
83
80
  include Container
@@ -101,6 +98,7 @@ module CPEE
101
98
  @id = id
102
99
  end
103
100
  end #}}}
101
+
104
102
  class Loop #{{{
105
103
  include Container
106
104
  include Struct
@@ -233,22 +231,22 @@ module CPEE
233
231
  class Tree < Array #{{{
234
232
  def condition?; false; end
235
233
 
236
- def to_s
237
- "TREE:\n" << print_tree(self)
234
+ def to_s(verbose=true)
235
+ "TREE:\n" << print_tree(self,' ',verbose)
238
236
  end
239
237
 
240
- def print_tree(ele,indent=' ')
238
+ def print_tree(ele,indent=' ',verbose=true)
241
239
  ret = ''
242
240
  ele.each_with_index do |e,i|
243
241
  last = (i == ele.length - 1)
244
242
  pchar = last ? '└' : '├'
245
243
  if e.container?
246
244
  ret << indent + pchar + ' ' + e.class.to_s.gsub(/[^:]*::/,'') + "\n"
247
- ret << print_tree(e,indent + (last ? ' ' : '│ '))
248
- elsif e.is_a?(Break) &&
245
+ ret << print_tree(e,indent + (last ? ' ' : '│ '),verbose)
246
+ elsif e.is_a?(Break)
249
247
  ret << indent + pchar + ' ' + e.class.to_s.gsub(/[^:]*::/,'') + "\n"
250
248
  else
251
- ret << indent + pchar + ' ' + e.niceid.to_s + "\n"
249
+ ret << indent + pchar + ' ' + e.niceid.to_s + (verbose ? " (#{e.label})" : "") + "\n"
252
250
  end
253
251
  end
254
252
  ret
@@ -311,7 +309,6 @@ module CPEE
311
309
  (n = self.map{|t| t.first }.uniq).length == 1 ? n.first : nil
312
310
  end
313
311
 
314
- # future use
315
312
  def incoming(node)
316
313
  tcount = 1
317
314
  self.each do |t|
@@ -327,10 +324,6 @@ module CPEE
327
324
  num == self.length
328
325
  end
329
326
 
330
- def aaa
331
- puts 'rrr'
332
- end
333
-
334
327
  def all_loops?
335
328
  num = 0
336
329
  self.each{|n| num += 1 if n.first == n.last }
@@ -418,13 +411,6 @@ module CPEE
418
411
  max
419
412
  end
420
413
 
421
- def segment_by_loops(loops)
422
- # supress loops
423
- self.delete_if { |t| loops.include?(t) }
424
- self.eliminate(loops)
425
- loops.extend
426
- end
427
-
428
414
  def find_endnode
429
415
  # supress loops
430
416
  trcs = self.dup