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
@@ -4,16 +4,16 @@
4
4
  </attribute>
5
5
  <attribute name="endpoint" rngui:label="Type">
6
6
  <choice>
7
- <value id="machine">Machine Invocation</value>
8
- <value id="sensor">Read From Sensor</value>
9
- <value id="human">Human Task</value>
10
- <value id="subprocess">Subprocess</value>
11
- <value id="robot">Robot Task</value>
12
- <value id="robot_subprocess">Robot Subprocess</value>
13
- <value id="plc">PLC</value>
14
- <value id="send">Send Message</value>
15
- <value id="receive">Receive Message</value>
16
- <value id="wait">Wait</value>
7
+ <value rngui:label="Machine Invocation">machine</value>
8
+ <value rngui:label="Read From Sensor">sensor</value>
9
+ <value rngui:label="Human Task">human</value>
10
+ <value rngui:label="Subprocess">subprocess</value>
11
+ <value rngui:label="Robot Task">robot</value>
12
+ <value rngui:label="Robot Subprocess">robot_subprocess</value>
13
+ <value rngui:label="PLC">plc</value>
14
+ <value rngui:label="Send Message">send</value>
15
+ <value rngui:label="Receive Message">receive</value>
16
+ <value rngui:label="Wait">wait</value>
17
17
  </choice>
18
18
  </attribute>
19
19
  <element name="parameters" rngui:header="Properties">
@@ -4,16 +4,16 @@
4
4
  </attribute>
5
5
  <attribute name="endpoint" rngui:label="Type">
6
6
  <choice>
7
- <value id="machine">Machine Invocation</value>
8
- <value id="sensor">Read From Sensor</value>
9
- <value id="human">Human Task</value>
10
- <value id="subprocess">Subprocess</value>
11
- <value id="robot">Robot Task</value>
12
- <value id="robot_subprocess">Robot Subprocess</value>
13
- <value id="plc">PLC</value>
14
- <value id="send">Send Message</value>
15
- <value id="receive">Receive Message</value>
16
- <value id="wait">Wait</value>
7
+ <value rngui:label="Machine Invocation">machine</value>
8
+ <value rngui:label="Read From Sensor">sensor</value>
9
+ <value rngui:label="Human Task">human</value>
10
+ <value rngui:label="Subprocess">subprocess</value>
11
+ <value rngui:label="Robot Task">robot</value>
12
+ <value rngui:label="Robot Subprocess">robot_subprocess</value>
13
+ <value rngui:label="PLC">plc</value>
14
+ <value rngui:label="Send Message">send</value>
15
+ <value rngui:label="Receive Message">receive</value>
16
+ <value rngui:label="Wait">wait</value>
17
17
  </choice>
18
18
  </attribute>
19
19
  <element name="parameters" rngui:header="Properties">
@@ -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');
@@ -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');
@@ -1223,28 +1234,33 @@ function WFAdaptorManifestation(adaptor) {
1223
1234
  return 'vertical';
1224
1235
  },
1225
1236
  'resolve_symbol': function(node) {
1237
+ let alist = []
1226
1238
  let plist = []
1227
- let dirty = false
1228
- $('*:not(:has(*))',node).each(function(i,n) {
1229
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1230
- for (const l of lines) {
1231
- if (l != null) {
1232
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1233
- if (m0 != null) {
1234
- plist.push(m0[1])
1235
- }
1236
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1237
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1238
- if (m1 != null && !plist.includes(m1[1])) {
1239
- dirty = true
1240
- }
1241
- if (m2 != null && !plist.includes(m2[1])) {
1242
- dirty = true
1243
- }
1244
- }
1239
+
1240
+ 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
1241
+ var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
1242
+ $ ('call > parameters > arguments > *, call > code > *, loop[condition], alternative[condition]',node).each(function(i,n) {
1243
+ let item;
1244
+ if (n.hasAttribute('condition')) {
1245
+ item = n.getAttribute('condition');
1246
+ } else {
1247
+ item = n.textContent;
1248
+ }
1249
+ if (n.parentNode.nodeName == 'arguments' && item.charAt(0) != '!' ) { return }
1250
+
1251
+ let indices = [];
1252
+
1253
+ for (const match of item.matchAll(regassi)) {
1254
+ indices.push(match.index);
1255
+ alist.push(match[1]);
1256
+ }
1257
+ for (const match of item.matchAll(reg_not_assi)) {
1258
+ const arg1 = match[1];
1259
+ if (indices.includes(match.index)) { continue; }
1260
+ if (!alist.includes(arg1)) { plist.push(arg1); }
1245
1261
  }
1246
1262
  })
1247
- if (dirty) { return 'start_event'; }
1263
+ if (plist.length > 0) { return 'start_event'; }
1248
1264
  },
1249
1265
  'closing_symbol': 'end',
1250
1266
  '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');
@@ -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) {
data/cockpit/track.html CHANGED
@@ -56,7 +56,10 @@
56
56
  <script type="text/javascript" src="js/parameters.js"></script>
57
57
  <script type="text/javascript" src="js/track.js"></script>
58
58
  <script type="text/javascript" src="js/modifiers.js"></script>
59
+ <script type="text/javascript" src="js/resources.js"></script>
59
60
  <link rel="stylesheet" href="css/ui.css" type="text/css"/>
61
+ <link rel="stylesheet" href="css/resources-label.css" type="text/css"/>
62
+ <link rel="stylesheet" href="css/resources-svg.css" type="text/css" data-include-export="true"/>
60
63
  <link rel="stylesheet" href="css/track.css" type="text/css"/>
61
64
  </head>
62
65
  <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
@@ -126,6 +129,7 @@
126
129
  </div>
127
130
  </div>
128
131
  <div id='graphgrid'>
132
+ <div class="resource-label" style="display: none"></div>
129
133
  <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
130
134
  </div>
131
135
  </div>
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.1.52"
3
+ s.version = "2.1.54"
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.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -91,7 +91,7 @@ module CPEE
91
91
  opts[:sse_keepalive_frequency] ||= 10
92
92
  opts[:sse_connections] = {}
93
93
 
94
- opts[:statemachine] = CPEE::StateMachine.new opts[:states], %w{running simulating replaying finishing stopping abandoned finished} do |id|
94
+ opts[:statemachine] = CPEE::StateMachine.new opts[:states], %w{running simulating finishing stopping abandoned finished} do |id|
95
95
  CPEE::Persistence::extract_item(id,opts,"state")
96
96
  end
97
97
 
@@ -125,7 +125,12 @@ module CPEE
125
125
  doc.find('/p:properties/p:dslx').first.add XML::Smart::string(val).root rescue nil
126
126
  end #}}}
127
127
  if val = CPEE::Persistence::extract_item(id,opts,'description') #{{{
128
- doc.find('/p:properties/p:description').first.add XML::Smart::string(val).root rescue nil
128
+ d = XML::Smart::string(val).root rescue nil
129
+ if d.nil?
130
+ doc.find('/p:properties/p:description').first.text = val
131
+ else
132
+ doc.find('/p:properties/p:description').first.add d
133
+ end
129
134
  end #}}}
130
135
  doc.find('/p:properties/p:transformation/p:description').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/description')
131
136
  doc.find('/p:properties/p:transformation/p:dataelements').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dataelements')
@@ -648,21 +653,26 @@ module CPEE
648
653
 
649
654
  class PutDescription < Riddl::Implementation #{{{
650
655
  def self::transform(descxml,tdesc,tdesctype,tdata,tdatatype,tendp,tendptype,hw,opts) #{{{
651
- desc = XML::Smart::string(descxml)
652
- desc.register_namespace 'p', 'http://cpee.org/ns/description/1.0'
656
+ desc = XML::Smart::string(descxml) rescue nil
657
+ if desc.nil?
658
+ if descxml.empty?
659
+ tdesctype = tdatatype = tendptype = 'clean'
660
+ end
661
+ else
662
+ desc.register_namespace 'p', 'http://cpee.org/ns/description/1.0'
663
+ if desc.root.children.empty?
664
+ tdesctype = tdatatype = tendptype = 'clean'
665
+ end
666
+ end
653
667
 
654
668
  dslx = nil
655
669
  dsl = nil
656
670
  de = {}
657
671
  ep = {}
658
672
 
659
- if desc.root.children.empty?
660
- tdesctype = tdatatype = tendptype = 'clean'
661
- end
662
-
663
673
  ### description transformation, including dslx to dsl
664
674
  addit = if tdesctype == 'copy' || tdesc.empty?
665
- desc
675
+ desc || ''
666
676
  elsif tdesctype == 'rest' && !tdesc.empty?
667
677
  srv = Riddl::Client.interface(tdesc,opts[:transformation_service])
668
678
  status, res = srv.post [
@@ -670,15 +680,15 @@ module CPEE
670
680
  Riddl::Parameter::Simple.new("type","description")
671
681
  ]
672
682
  if status >= 200 && status < 300
673
- XML::Smart::string(res[0].value.read).root
683
+ XML::Smart::string(res[0].value.read)
674
684
  else
675
685
  raise 'Could not extract dslx'
676
686
  end
677
687
  elsif tdesctype == 'xslt' && !tdesc.empty?
678
688
  trans = XML::Smart::open_unprotected(tdesc)
679
- desc.transform_with(trans).root
689
+ desc.transform_with(trans)
680
690
  elsif tdesctype == 'clean'
681
- XML::Smart::open_unprotected(opts[:empty_dslx]).root
691
+ XML::Smart::open_unprotected(opts[:empty_dslx])
682
692
  else
683
693
  nil
684
694
  end
@@ -689,7 +699,7 @@ module CPEE
689
699
 
690
700
  ### dataelements extraction
691
701
  addit = if tdatatype == 'rest' && !tdata.empty?
692
- srv = Riddl::Client.interface(tdata,@opts[:transformation_service])
702
+ srv = Riddl::Client.interface(tdata,opts[:transformation_service])
693
703
  status, res = srv.post [
694
704
  Riddl::Parameter::Complex.new("description","text/xml",descxml),
695
705
  Riddl::Parameter::Simple.new("type","dataelements")
@@ -715,7 +725,7 @@ module CPEE
715
725
 
716
726
  ### endpoints extraction
717
727
  addit = if tendptype == 'rest' && !tdata.empty?
718
- srv = Riddl::Client.interface(tendp,@opts[:transformation_service])
728
+ srv = Riddl::Client.interface(tendp,opts[:transformation_service])
719
729
  status, res = srv.post [
720
730
  Riddl::Parameter::Complex.new("description","text/xml",descxml),
721
731
  Riddl::Parameter::Simple.new("type","endpoints")
@@ -8,7 +8,6 @@
8
8
  <value>ready</value>
9
9
  <value>running</value>
10
10
  <value>simulating</value>
11
- <value>replaying</value>
12
11
  <value>stopping</value>
13
12
  <value>stopped</value>
14
13
  <value>abandoned</value>
@@ -22,7 +21,6 @@
22
21
  <value>ready</value>
23
22
  <value>running</value>
24
23
  <value>simulating</value>
25
- <value>replaying</value>
26
24
  <value>stopping</value>
27
25
  <value>stopped</value>
28
26
  <value>abandoned</value>
data/lib/properties.xml CHANGED
@@ -38,7 +38,6 @@
38
38
  <value>ready</value>
39
39
  <value>running</value>
40
40
  <value>simulating</value>
41
- <value>replaying</value>
42
41
  <value>stopping</value>
43
42
  <value>stopped</value>
44
43
  <value>abandoned</value>