cpee 2.1.52 → 2.1.54

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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/{resources.css → resources-label.css} +0 -7
  3. data/cockpit/css/resources-svg.css +20 -0
  4. data/cockpit/css/ui.css +0 -4
  5. data/cockpit/edit.html +5 -1
  6. data/cockpit/graph.html +4 -0
  7. data/cockpit/index.html +3 -2
  8. data/cockpit/js/details.js +4 -14
  9. data/cockpit/js/edit.js +3 -0
  10. data/cockpit/js/instance.js +129 -139
  11. data/cockpit/js/modifiers.js +4 -14
  12. data/cockpit/js/parameters.js +4 -10
  13. data/cockpit/js/wfadaptor.js +0 -27
  14. data/cockpit/model.html +2 -0
  15. data/cockpit/templates/Coopis 2010.xml +8 -1
  16. data/cockpit/templates/Worklist.xml +6 -7
  17. data/cockpit/themes/compact/rngs/call.rng +3 -3
  18. data/cockpit/themes/compact/rngs/callmanipulate.rng +3 -3
  19. data/cockpit/themes/compact/rngs/parallel.rng +2 -2
  20. data/cockpit/themes/compact/rngs/start.rng +3 -3
  21. data/cockpit/themes/compact/theme.js +38 -22
  22. data/cockpit/themes/control/rngs/call.rng +3 -3
  23. data/cockpit/themes/control/rngs/callmanipulate.rng +3 -3
  24. data/cockpit/themes/control/rngs/parallel.rng +2 -2
  25. data/cockpit/themes/control/rngs/start.rng +3 -3
  26. data/cockpit/themes/control/theme.js +76 -10
  27. data/cockpit/themes/dataflow/rngs/call.rng +3 -3
  28. data/cockpit/themes/dataflow/rngs/callmanipulate.rng +3 -3
  29. data/cockpit/themes/dataflow/rngs/parallel.rng +2 -2
  30. data/cockpit/themes/dataflow/rngs/start.rng +3 -3
  31. data/cockpit/themes/dataflow/theme.js +48 -32
  32. data/cockpit/themes/default/rngs/call.rng +3 -3
  33. data/cockpit/themes/default/rngs/callmanipulate.rng +3 -3
  34. data/cockpit/themes/default/rngs/parallel.rng +2 -2
  35. data/cockpit/themes/default/rngs/start.rng +3 -3
  36. data/cockpit/themes/default/theme.js +38 -22
  37. data/cockpit/themes/extended/rngs/call.rng +3 -3
  38. data/cockpit/themes/extended/rngs/callmanipulate.rng +3 -3
  39. data/cockpit/themes/extended/rngs/parallel.rng +2 -2
  40. data/cockpit/themes/extended/rngs/start.rng +3 -3
  41. data/cockpit/themes/extended/theme.js +38 -22
  42. data/cockpit/themes/felix/rngs/alternative.rng +25 -0
  43. data/cockpit/themes/felix/rngs/call.rng +229 -0
  44. data/cockpit/themes/felix/rngs/callmanipulate.rng +259 -0
  45. data/cockpit/themes/felix/rngs/choose.rng +14 -0
  46. data/cockpit/themes/felix/rngs/closed_loop.rng +62 -0
  47. data/cockpit/themes/felix/rngs/closed_loop_cancel.rng +5 -0
  48. data/cockpit/themes/felix/rngs/closed_loop_control.rng +31 -0
  49. data/cockpit/themes/felix/rngs/closed_loop_measuring.rng +12 -0
  50. data/cockpit/themes/felix/rngs/critical.rng +5 -0
  51. data/cockpit/themes/felix/rngs/escape.rng +1 -0
  52. data/cockpit/themes/felix/rngs/group.rng +3 -0
  53. data/cockpit/themes/felix/rngs/loop.rng +22 -0
  54. data/cockpit/themes/felix/rngs/manipulate.rng +20 -0
  55. data/cockpit/themes/felix/rngs/otherwise.rng +22 -0
  56. data/cockpit/themes/felix/rngs/parallel.rng +27 -0
  57. data/cockpit/themes/felix/rngs/parallel_branch.rng +2 -0
  58. data/cockpit/themes/felix/rngs/scripts.rng +23 -0
  59. data/cockpit/themes/felix/rngs/start.rng +121 -0
  60. data/cockpit/themes/felix/rngs/stop.rng +5 -0
  61. data/cockpit/themes/felix/rngs/terminate.rng +1 -0
  62. data/cockpit/themes/felix/symbols/alternative.svg +5 -0
  63. data/cockpit/themes/felix/symbols/arrow.svg +3 -0
  64. data/cockpit/themes/felix/symbols/call.svg +6 -0
  65. data/cockpit/themes/felix/symbols/call_sensor.svg +9 -0
  66. data/cockpit/themes/felix/symbols/callmanipulate.svg +8 -0
  67. data/cockpit/themes/felix/symbols/callmanipulate_sensor.svg +11 -0
  68. data/cockpit/themes/felix/symbols/choose.svg +5 -0
  69. data/cockpit/themes/felix/symbols/choose_exclusive.svg +5 -0
  70. data/cockpit/themes/felix/symbols/choose_inclusive.svg +4 -0
  71. data/cockpit/themes/felix/symbols/closed_loop.svg +5 -0
  72. data/cockpit/themes/felix/symbols/closed_loop_cancel.svg +5 -0
  73. data/cockpit/themes/felix/symbols/closed_loop_control.svg +5 -0
  74. data/cockpit/themes/felix/symbols/closed_loop_measuring.svg +6 -0
  75. data/cockpit/themes/felix/symbols/complex.svg +8 -0
  76. data/cockpit/themes/felix/symbols/critical.svg +4 -0
  77. data/cockpit/themes/felix/symbols/delete.svg +4 -0
  78. data/cockpit/themes/felix/symbols/end.svg +3 -0
  79. data/cockpit/themes/felix/symbols/escape.svg +5 -0
  80. data/cockpit/themes/felix/symbols/event_end.svg +3 -0
  81. data/cockpit/themes/felix/symbols/loop.svg +5 -0
  82. data/cockpit/themes/felix/symbols/manipulate.svg +4 -0
  83. data/cockpit/themes/felix/symbols/otherwise.svg +5 -0
  84. data/cockpit/themes/felix/symbols/parallel.svg +5 -0
  85. data/cockpit/themes/felix/symbols/parallel_branch.svg +5 -0
  86. data/cockpit/themes/felix/symbols/parallel_branch_compact.svg +4 -0
  87. data/cockpit/themes/felix/symbols/parallel_branch_event.svg +14 -0
  88. data/cockpit/themes/felix/symbols/parallel_branch_normal.svg +5 -0
  89. data/cockpit/themes/felix/symbols/parallel_eventbased_exclusive.svg +9 -0
  90. data/cockpit/themes/felix/symbols/parallel_eventbased_parallel.svg +8 -0
  91. data/cockpit/themes/felix/symbols/scripts.svg +4 -0
  92. data/cockpit/themes/felix/symbols/start.svg +3 -0
  93. data/cockpit/themes/felix/symbols/start_event.svg +5 -0
  94. data/cockpit/themes/felix/symbols/stop.svg +5 -0
  95. data/cockpit/themes/felix/symbols/terminate.svg +4 -0
  96. data/cockpit/themes/felix/theme.js +1531 -0
  97. data/cockpit/themes/model/rngs/call.rng +10 -10
  98. data/cockpit/themes/model/rngs/callmanipulate.rng +10 -10
  99. data/cockpit/themes/model/theme.js +14 -3
  100. data/cockpit/themes/packed/rngs/call.rng +3 -3
  101. data/cockpit/themes/packed/rngs/callmanipulate.rng +3 -3
  102. data/cockpit/themes/packed/rngs/parallel.rng +2 -2
  103. data/cockpit/themes/packed/rngs/start.rng +3 -3
  104. data/cockpit/themes/packed/theme.js +38 -22
  105. data/cockpit/themes/preset/rngs/call.rng +3 -3
  106. data/cockpit/themes/preset/rngs/callmanipulate.rng +3 -3
  107. data/cockpit/themes/preset/rngs/parallel.rng +2 -2
  108. data/cockpit/themes/preset/rngs/start.rng +3 -3
  109. data/cockpit/themes/preset/theme.js +38 -22
  110. data/cockpit/track.html +4 -0
  111. data/cpee.gemspec +1 -1
  112. data/lib/cpee/implementation.rb +1 -1
  113. data/lib/cpee/implementation_properties.rb +23 -13
  114. data/lib/properties/state.rng +0 -2
  115. data/lib/properties.xml +0 -1
  116. data/server/executionhandlers/ruby/connection.rb +25 -16
  117. data/server/executionhandlers/ruby/controller.rb +1 -1
  118. data/server/executionhandlers/ruby/dsl_to_dslx.xsl +71 -61
  119. data/server/resources/states.dot +0 -4
  120. data/server/resources/states.xml +0 -6
  121. data/server/routing/end.pid +1 -0
  122. data/server/routing/forward-events-00.pid +1 -0
  123. data/server/routing/forward-votes.pid +1 -0
  124. data/server/routing/persist.pid +1 -0
  125. metadata +63 -17
  126. data/cockpit/css/replay.css +0 -55
  127. data/cockpit/js/replay.js +0 -40
  128. data/cockpit/replay.html +0 -53
  129. data/cockpit/themes/compact/symbols/test.svg +0 -74
  130. data/cockpit/themes/control/symbols/test.svg +0 -74
  131. data/cockpit/themes/dataflow/symbols/test.svg +0 -74
  132. data/cockpit/themes/default/symbols/test.svg +0 -74
  133. data/cockpit/themes/extended/symbols/test.svg +0 -74
  134. data/cockpit/themes/model/symbols/test.svg +0 -74
  135. data/cockpit/themes/packed/symbols/test.svg +0 -74
  136. data/cockpit/themes/preset/symbols/test.svg +0 -74
  137. data/server/executionhandlers/ruby/desc.xml +0 -107
  138. data/server/resources/test.pdf +0 -0
  139. data/server/server.conf +0 -4
@@ -64,7 +64,6 @@ function WFAdaptorManifestation(adaptor) {
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
67
- tab.empty();
68
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
69
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
70
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -75,13 +74,16 @@ function WFAdaptorManifestation(adaptor) {
75
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
76
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
77
76
  }
78
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
79
77
  var nn = $X($(node).serializeXML());
80
78
  nn.removeAttr('svg-id');
81
79
  nn.removeAttr('svg-type');
82
80
  nn.removeAttr('svg-subtype');
83
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
84
85
  save['details'].content(nn);
86
+
85
87
  format_visual_forms();
86
88
  }
87
89
  }; //}}}
@@ -201,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
201
203
  $(nodes).each(function(key,str) {
202
204
  nodes[key] = $X(str);
203
205
  });
206
+ let svgids = [];
204
207
  $(nodes).each(function(key,node){
205
- var target = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
208
+ svgids.push($(node).attr('svg-id'));
209
+ });
210
+ svgids.sort((a,b) => {
211
+ if (a > b) { return -1; }
212
+ else if (a < b) { return 1; }
213
+ else { return 0; }
214
+ });
215
+ svgids.forEach(svgid => {
216
+ var target = self.adaptor.description.get_node_by_svg_id(svgid);
206
217
  del_ui_pos(target)
207
218
  self.adaptor.description.remove(null,target);
208
219
  localStorage.removeItem('marked');
@@ -344,8 +355,8 @@ function WFAdaptorManifestation(adaptor) {
344
355
 
345
356
  function dataflow_extract(subject,mixed,extract) {
346
357
  let dict = {};
347
- var regassi = /data.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
348
- var reg_not_assi = /data.([a-zA-Z_]+)\s*/g;
358
+ var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
359
+ var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
349
360
 
350
361
  $(subject).each(function(_,ele){
351
362
  let item = extract(ele);
@@ -388,12 +399,12 @@ function WFAdaptorManifestation(adaptor) {
388
399
  var ret = [ { column: 'ID', value: $(node).attr('id') } ];
389
400
 
390
401
  // For Blue Points
391
- let dict1 = dataflow_extract($('arguments > *',$(node).children('parameters')),true,function(target){ return $(target).text(); });
402
+ let dict1 = dataflow_extract($('arguments *',$(node).children('parameters')),true,function(target){ return $(target).text(); });
392
403
  let dict2 = dataflow_extract($(node).children('code').children(),false,function(target){ return $(target).text(); });
393
404
  let dict = {...dict1,...dict2};
394
405
  ret.push({ column: 'Dataflow', value: dict, type: 'resource' });
395
406
  if (lab != '') {
396
- ret.unshift( { column: 'Label', value: lab } );
407
+ ret.unshift( { type: 'label', column: 'Label', value: lab } );
397
408
  }
398
409
  if (wait != '') {
399
410
  ret.push({ column: 'Wait', value: 'ω = ' + wait });
@@ -453,7 +464,7 @@ function WFAdaptorManifestation(adaptor) {
453
464
  'label': function(node){
454
465
  var lab = $(node).attr('label');
455
466
  if (lab) {
456
- return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') }, { column: 'ID', value: $(node).attr('id') } ];
467
+ return [ { type: 'label', column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') }, { column: 'ID', value: $(node).attr('id') } ];
457
468
  } else {
458
469
  return [ { column: 'ID', value: $(node).attr('id') } ];
459
470
  }
@@ -587,7 +598,7 @@ function WFAdaptorManifestation(adaptor) {
587
598
  'closeblock': true,
588
599
  'label': function(node){
589
600
  var avg = $('> _probability_avg',$(node).children('_probability')).text();
590
- var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
601
+ var ret = [ { type: 'label', column: 'Label', value: $(node).attr('condition') } ];
591
602
  if (avg != '') {
592
603
  ret.push({ column: 'Average', value: avg + 'x' });
593
604
  }
@@ -639,7 +650,7 @@ function WFAdaptorManifestation(adaptor) {
639
650
  this.elements.choose = { /*{{{*/
640
651
  'type': 'complex',
641
652
  'illustrator': {//{{{
642
- 'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
653
+ 'label': function(node){ return [ { type: 'label', column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
643
654
  'endnodes': 'aggregate',
644
655
  'closeblock': false,
645
656
  'closing_symbol': 'choose_finish',
@@ -792,7 +803,7 @@ function WFAdaptorManifestation(adaptor) {
792
803
  'illustrator': {//{{{
793
804
  'label': function(node){
794
805
  var avg = $('> _probability_avg',$(node).children('_probability')).text();
795
- var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
806
+ var ret = [ { type: 'label', column: 'Label', value: $(node).attr('condition') } ];
796
807
  if (avg != '') {
797
808
  ret.push({ column: 'Average', value: avg + '%' });
798
809
  }
@@ -1288,35 +1299,40 @@ function WFAdaptorManifestation(adaptor) {
1288
1299
  'type': 'description',
1289
1300
  'illustrator': {//{{{
1290
1301
  'endnodes': 'passthrough',
1291
- 'label': function(node){ return [ { column: 'ID' }, { column: 'Dataflow'}, { column: 'Label'}, { column: 'RP' }, { column: 'R#' } ]; },
1302
+ 'label': function(node){ return [ { column: 'ID' }, { column: 'Dataflow', type: 'resource' }, { column: 'Label', type: 'label' }, { column: 'RP' }, { column: 'R#' } ]; },
1292
1303
  'closeblock': false,
1293
1304
  'balance': true,
1294
1305
  'expansion': function(node) {
1295
1306
  return 'vertical';
1296
1307
  },
1297
1308
  'resolve_symbol': function(node) {
1309
+ let alist = []
1298
1310
  let plist = []
1299
- let dirty = false
1300
- $('*:not(:has(*))',node).each(function(i,n) {
1301
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1302
- for (const l of lines) {
1303
- if (l != null) {
1304
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1305
- if (m0 != null) {
1306
- plist.push(m0[1])
1307
- }
1308
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1309
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1310
- if (m1 != null && !plist.includes(m1[1])) {
1311
- dirty = true
1312
- }
1313
- if (m2 != null && !plist.includes(m2[1])) {
1314
- dirty = true
1315
- }
1316
- }
1311
+
1312
+ var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
1313
+ var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
1314
+ $ ('call > parameters > arguments > *, call > code > *, loop[condition], alternative[condition]',node).each(function(i,n) {
1315
+ let item;
1316
+ if (n.hasAttribute('condition')) {
1317
+ item = n.getAttribute('condition');
1318
+ } else {
1319
+ item = n.textContent;
1320
+ }
1321
+ if (n.parentNode.nodeName == 'arguments' && item.charAt(0) != '!' ) { return }
1322
+
1323
+ let indices = [];
1324
+
1325
+ for (const match of item.matchAll(regassi)) {
1326
+ indices.push(match.index);
1327
+ alist.push(match[1]);
1328
+ }
1329
+ for (const match of item.matchAll(reg_not_assi)) {
1330
+ const arg1 = match[1];
1331
+ if (indices.includes(match.index)) { continue; }
1332
+ if (!alist.includes(arg1)) { plist.push(arg1); }
1317
1333
  }
1318
1334
  })
1319
- if (dirty) { return 'start_event'; }
1335
+ if (plist.length > 0) { return 'start_event'; }
1320
1336
  },
1321
1337
  'closing_symbol': 'end',
1322
1338
  'col_shift': function(node) {
@@ -1424,7 +1440,7 @@ function WFAdaptorManifestation(adaptor) {
1424
1440
  'closeblock': true,
1425
1441
  'label': function(node){
1426
1442
  var avg = $('> _probability_avg',$(node).children('_probability')).text();
1427
- var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
1443
+ var ret = [ { type: 'label', column: 'Label', value: $(node).attr('condition') } ];
1428
1444
  if (avg != '') {
1429
1445
  ret.push({ column: 'Average', value: avg + 'x' });
1430
1446
  }
@@ -98,9 +98,9 @@
98
98
  </element>
99
99
  <element name="extractor_type" rngui:label="Extractor Type">
100
100
  <choice>
101
- <value id='intrinsic'>Intrinsic</value>
102
- <value id='extrinsic'>Extrinsic</value>
103
- <value id='separate'>Separate</value>
101
+ <value rngui:label='Intrinsic'>intrinsic</value>
102
+ <value rngui:label='Extrinsic'>extrinsic</value>
103
+ <value rngui:label='Separate'>separate</value>
104
104
  </choice>
105
105
  </element>
106
106
  <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
@@ -122,9 +122,9 @@
122
122
  </element>
123
123
  <element name="extractor_type" rngui:label="Extractor Type">
124
124
  <choice>
125
- <value id='intrinsic'>Intrinsic</value>
126
- <value id='extrinsic'>Extrinsic</value>
127
- <value id='separate'>Separate</value>
125
+ <value rngui:label='Intrinsic'>intrinsic</value>
126
+ <value rngui:label='Extrinsic'>extrinsic</value>
127
+ <value rngui:label='Separate'>separate</value>
128
128
  </choice>
129
129
  </element>
130
130
  <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
@@ -4,8 +4,8 @@
4
4
  </attribute>
5
5
  <attribute name="cancel" rngui:label="Cancel" rngui:default="last" rngui:hint="Set 'Wait' to 1 for standard Event-based Gateway.">
6
6
  <choice>
7
- <value id='last'>After Last Task in Branch</value>
8
- <value id='first'>After First Task in Branch (Event-Based Gateway)</value>
7
+ <value rngui:label='After Last Task in Branch'>last</value>
8
+ <value rngui:label='After First Task in Branch (Event-Based Gateway)'>first</value>
9
9
  </choice>
10
10
  </attribute>
11
11
  <element rngui:ignore="true" name="parallel_branch">
@@ -29,9 +29,9 @@
29
29
  </element>
30
30
  <element name="extractor_type" rngui:label="Extractor Type">
31
31
  <choice>
32
- <value id='intrinsic'>Intrinsic</value>
33
- <value id='extrinsic'>Extrinsic</value>
34
- <value id='separate'>Separate</value>
32
+ <value rngui:label='Intrinsic'>intrinsic</value>
33
+ <value rngui:label='Extrinsic'>extrinsic</value>
34
+ <value rngui:label='Separate'>separate</value>
35
35
  </choice>
36
36
  </element>
37
37
  <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
@@ -64,7 +64,6 @@ function WFAdaptorManifestation(adaptor) {
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
67
- tab.empty();
68
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
69
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
70
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -75,13 +74,16 @@ function WFAdaptorManifestation(adaptor) {
75
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
76
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
77
76
  }
78
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
79
77
  var nn = $X($(node).serializeXML());
80
78
  nn.removeAttr('svg-id');
81
79
  nn.removeAttr('svg-type');
82
80
  nn.removeAttr('svg-subtype');
83
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
84
85
  save['details'].content(nn);
86
+
85
87
  format_visual_forms();
86
88
  }
87
89
  }; //}}}
@@ -201,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
201
203
  $(nodes).each(function(key,str) {
202
204
  nodes[key] = $X(str);
203
205
  });
206
+ let svgids = [];
204
207
  $(nodes).each(function(key,node){
205
- var target = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
208
+ svgids.push($(node).attr('svg-id'));
209
+ });
210
+ svgids.sort((a,b) => {
211
+ if (a > b) { return -1; }
212
+ else if (a < b) { return 1; }
213
+ else { return 0; }
214
+ });
215
+ svgids.forEach(svgid => {
216
+ var target = self.adaptor.description.get_node_by_svg_id(svgid);
206
217
  del_ui_pos(target)
207
218
  self.adaptor.description.remove(null,target);
208
219
  localStorage.removeItem('marked');
@@ -1224,28 +1235,33 @@ function WFAdaptorManifestation(adaptor) {
1224
1235
  return 'vertical';
1225
1236
  },
1226
1237
  'resolve_symbol': function(node) {
1238
+ let alist = []
1227
1239
  let plist = []
1228
- let dirty = false
1229
- $('*:not(:has(*))',node).each(function(i,n) {
1230
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1231
- for (const l of lines) {
1232
- if (l != null) {
1233
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1234
- if (m0 != null) {
1235
- plist.push(m0[1])
1236
- }
1237
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1238
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1239
- if (m1 != null && !plist.includes(m1[1])) {
1240
- dirty = true
1241
- }
1242
- if (m2 != null && !plist.includes(m2[1])) {
1243
- dirty = true
1244
- }
1245
- }
1240
+
1241
+ var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
1242
+ var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
1243
+ $ ('call > parameters > arguments > *, call > code > *, loop[condition], alternative[condition]',node).each(function(i,n) {
1244
+ let item;
1245
+ if (n.hasAttribute('condition')) {
1246
+ item = n.getAttribute('condition');
1247
+ } else {
1248
+ item = n.textContent;
1249
+ }
1250
+ if (n.parentNode.nodeName == 'arguments' && item.charAt(0) != '!' ) { return }
1251
+
1252
+ let indices = [];
1253
+
1254
+ for (const match of item.matchAll(regassi)) {
1255
+ indices.push(match.index);
1256
+ alist.push(match[1]);
1257
+ }
1258
+ for (const match of item.matchAll(reg_not_assi)) {
1259
+ const arg1 = match[1];
1260
+ if (indices.includes(match.index)) { continue; }
1261
+ if (!alist.includes(arg1)) { plist.push(arg1); }
1246
1262
  }
1247
1263
  })
1248
- if (dirty) { return 'start_event'; }
1264
+ if (plist.length > 0) { return 'start_event'; }
1249
1265
  },
1250
1266
  'closing_symbol': 'end',
1251
1267
  'col_shift': function(node) {
@@ -98,9 +98,9 @@
98
98
  </element>
99
99
  <element name="extractor_type" rngui:label="Extractor Type">
100
100
  <choice>
101
- <value id='intrinsic'>Intrinsic</value>
102
- <value id='extrinsic'>Extrinsic</value>
103
- <value id='separate'>Separate</value>
101
+ <value rngui:label='Intrinsic'>intrinsic</value>
102
+ <value rngui:label='Extrinsic'>extrinsic</value>
103
+ <value rngui:label='Separate'>separate</value>
104
104
  </choice>
105
105
  </element>
106
106
  <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
@@ -122,9 +122,9 @@
122
122
  </element>
123
123
  <element name="extractor_type" rngui:label="Extractor Type">
124
124
  <choice>
125
- <value id='intrinsic'>Intrinsic</value>
126
- <value id='extrinsic'>Extrinsic</value>
127
- <value id='separate'>Separate</value>
125
+ <value rngui:label='Intrinsic'>intrinsic</value>
126
+ <value rngui:label='Extrinsic'>extrinsic</value>
127
+ <value rngui:label='Separate'>separate</value>
128
128
  </choice>
129
129
  </element>
130
130
  <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
@@ -4,8 +4,8 @@
4
4
  </attribute>
5
5
  <attribute name="cancel" rngui:label="Cancel" rngui:default="last" rngui:hint="Set 'Wait' to 1 for standard Event-based Gateway.">
6
6
  <choice>
7
- <value id='last'>After Last Task in Branch</value>
8
- <value id='first'>After First Task in Branch (Event-Based Gateway)</value>
7
+ <value rngui:label='After Last Task in Branch'>last</value>
8
+ <value rngui:label='After First Task in Branch (Event-Based Gateway)'>first</value>
9
9
  </choice>
10
10
  </attribute>
11
11
  <element rngui:ignore="true" name="parallel_branch">
@@ -29,9 +29,9 @@
29
29
  </element>
30
30
  <element name="extractor_type" rngui:label="Extractor Type">
31
31
  <choice>
32
- <value id='intrinsic'>Intrinsic</value>
33
- <value id='extrinsic'>Extrinsic</value>
34
- <value id='separate'>Separate</value>
32
+ <value rngui:label='Intrinsic'>intrinsic</value>
33
+ <value rngui:label='Extrinsic'>extrinsic</value>
34
+ <value rngui:label='Separate'>separate</value>
35
35
  </choice>
36
36
  </element>
37
37
  <element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic &amp; extrinsic data'>
@@ -64,7 +64,6 @@ function WFAdaptorManifestation(adaptor) {
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
67
- tab.empty();
68
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
69
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
70
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -75,13 +74,16 @@ function WFAdaptorManifestation(adaptor) {
75
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
76
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
77
76
  }
78
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
79
77
  var nn = $X($(node).serializeXML());
80
78
  nn.removeAttr('svg-id');
81
79
  nn.removeAttr('svg-type');
82
80
  nn.removeAttr('svg-subtype');
83
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
84
85
  save['details'].content(nn);
86
+
85
87
  format_visual_forms();
86
88
  }
87
89
  }; //}}}
@@ -201,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
201
203
  $(nodes).each(function(key,str) {
202
204
  nodes[key] = $X(str);
203
205
  });
206
+ let svgids = [];
204
207
  $(nodes).each(function(key,node){
205
- var target = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
208
+ svgids.push($(node).attr('svg-id'));
209
+ });
210
+ svgids.sort((a,b) => {
211
+ if (a > b) { return -1; }
212
+ else if (a < b) { return 1; }
213
+ else { return 0; }
214
+ });
215
+ svgids.forEach(svgid => {
216
+ var target = self.adaptor.description.get_node_by_svg_id(svgid);
206
217
  del_ui_pos(target)
207
218
  self.adaptor.description.remove(null,target);
208
219
  localStorage.removeItem('marked');
@@ -1258,28 +1269,33 @@ function WFAdaptorManifestation(adaptor) {
1258
1269
  return 'vertical';
1259
1270
  },
1260
1271
  'resolve_symbol': function(node) {
1272
+ let alist = []
1261
1273
  let plist = []
1262
- let dirty = false
1263
- $('*:not(:has(*))',node).each(function(i,n) {
1264
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1265
- for (const l of lines) {
1266
- if (l != null) {
1267
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1268
- if (m0 != null) {
1269
- plist.push(m0[1])
1270
- }
1271
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1272
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1273
- if (m1 != null && !plist.includes(m1[1])) {
1274
- dirty = true
1275
- }
1276
- if (m2 != null && !plist.includes(m2[1])) {
1277
- dirty = true
1278
- }
1279
- }
1274
+
1275
+ var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
1276
+ var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
1277
+ $ ('call > parameters > arguments > *, call > code > *, loop[condition], alternative[condition]',node).each(function(i,n) {
1278
+ let item;
1279
+ if (n.hasAttribute('condition')) {
1280
+ item = n.getAttribute('condition');
1281
+ } else {
1282
+ item = n.textContent;
1283
+ }
1284
+ if (n.parentNode.nodeName == 'arguments' && item.charAt(0) != '!' ) { return }
1285
+
1286
+ let indices = [];
1287
+
1288
+ for (const match of item.matchAll(regassi)) {
1289
+ indices.push(match.index);
1290
+ alist.push(match[1]);
1291
+ }
1292
+ for (const match of item.matchAll(reg_not_assi)) {
1293
+ const arg1 = match[1];
1294
+ if (indices.includes(match.index)) { continue; }
1295
+ if (!alist.includes(arg1)) { plist.push(arg1); }
1280
1296
  }
1281
1297
  })
1282
- if (dirty) { return 'start_event'; }
1298
+ if (plist.length > 0) { return 'start_event'; }
1283
1299
  },
1284
1300
  'closing_symbol': 'end',
1285
1301
  'col_shift': function(node) {
@@ -0,0 +1,25 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="alternative" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <attribute name="condition" rngui:label="Condition">
3
+ <data type="string" rngui:label="Condition"/>
4
+ </attribute>
5
+ <element name="_probability" rngui:mark="true" rngui:header="Execution Probability">
6
+ <element name="_probability_min" rngui:label="Min in %">
7
+ <data type="integer" rngui:label="Percent 0-100">
8
+ <param name="minInclusive">1</param>
9
+ <param name="maxInclusive">100</param>
10
+ </data>
11
+ </element>
12
+ <element name="_probability_max" rngui:label="Max in %">
13
+ <data type="integer" rngui:label="Percent 0-100">
14
+ <param name="minInclusive">1</param>
15
+ <param name="maxInclusive">100</param>
16
+ </data>
17
+ </element>
18
+ <element name="_probability_avg" rngui:label="Avg in %">
19
+ <data type="integer" rngui:label="Percent 0-100">
20
+ <param name="minInclusive">1</param>
21
+ <param name="maxInclusive">100</param>
22
+ </data>
23
+ </element>
24
+ </element>
25
+ </element>