cpee 2.1.53 → 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.
@@ -63,11 +63,7 @@ function WFAdaptorManifestation(adaptor) {
63
63
  //{{{ Render the details from rng (right hand side of graph tab)
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
- var focus_ele = $(':focus',tab);
67
- var focus_path = focus_ele.attr('data-relaxngui-path');
68
- var focus_pos = focus_ele.prop('selectionStart');
69
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
70
- tab.empty();
71
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
72
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
73
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -78,21 +74,16 @@ function WFAdaptorManifestation(adaptor) {
78
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
79
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
80
76
  }
81
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
82
77
  var nn = $X($(node).serializeXML());
83
78
  nn.removeAttr('svg-id');
84
79
  nn.removeAttr('svg-type');
85
80
  nn.removeAttr('svg-subtype');
86
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
87
85
  save['details'].content(nn);
88
- // only after setting content can we set the focus and position. It might loose some stuff nonetheless.
89
- if (focus_ele.length > 0) {
90
- var ele = $('[data-relaxngui-path="' + focus_path + '"]',tab)[0];
91
- ele.focus();
92
- if (ele.setSelectionRange) {
93
- ele.setSelectionRange(focus_pos,focus_pos);
94
- }
95
- }
86
+
96
87
  format_visual_forms();
97
88
  }
98
89
  }; //}}}
@@ -212,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
212
203
  $(nodes).each(function(key,str) {
213
204
  nodes[key] = $X(str);
214
205
  });
206
+ let svgids = [];
215
207
  $(nodes).each(function(key,node){
216
- 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);
217
217
  del_ui_pos(target)
218
218
  self.adaptor.description.remove(null,target);
219
219
  localStorage.removeItem('marked');
@@ -1269,28 +1269,33 @@ function WFAdaptorManifestation(adaptor) {
1269
1269
  return 'vertical';
1270
1270
  },
1271
1271
  'resolve_symbol': function(node) {
1272
+ let alist = []
1272
1273
  let plist = []
1273
- let dirty = false
1274
- $('*:not(:has(*))',node).each(function(i,n) {
1275
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1276
- for (const l of lines) {
1277
- if (l != null) {
1278
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1279
- if (m0 != null) {
1280
- plist.push(m0[1])
1281
- }
1282
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1283
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1284
- if (m1 != null && !plist.includes(m1[1])) {
1285
- dirty = true
1286
- }
1287
- if (m2 != null && !plist.includes(m2[1])) {
1288
- dirty = true
1289
- }
1290
- }
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); }
1291
1296
  }
1292
1297
  })
1293
- if (dirty) { return 'start_event'; }
1298
+ if (plist.length > 0) { return 'start_event'; }
1294
1299
  },
1295
1300
  'closing_symbol': 'end',
1296
1301
  'col_shift': function(node) {
@@ -63,11 +63,7 @@ function WFAdaptorManifestation(adaptor) {
63
63
  //{{{ Render the details from rng (right hand side of graph tab)
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
- var focus_ele = $(':focus',tab);
67
- var focus_path = focus_ele.attr('data-relaxngui-path');
68
- var focus_pos = focus_ele.prop('selectionStart');
69
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
70
- tab.empty();
71
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
72
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
73
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -78,20 +74,16 @@ function WFAdaptorManifestation(adaptor) {
78
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
79
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
80
76
  }
81
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
82
77
  var nn = $X($(node).serializeXML());
83
78
  nn.removeAttr('svg-id');
84
79
  nn.removeAttr('svg-type');
85
80
  nn.removeAttr('svg-subtype');
86
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
87
85
  save['details'].content(nn);
88
- if (focus_ele.length > 0) {
89
- var ele = $('[data-relaxngui-path="' + focus_path + '"]',tab)[0];
90
- ele.focus();
91
- if (ele.setSelectionRange) {
92
- ele.setSelectionRange(focus_pos,focus_pos);
93
- }
94
- }
86
+
95
87
  format_visual_forms();
96
88
  }
97
89
  }; //}}}
@@ -211,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
211
203
  $(nodes).each(function(key,str) {
212
204
  nodes[key] = $X(str);
213
205
  });
206
+ let svgids = [];
214
207
  $(nodes).each(function(key,node){
215
- 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);
216
217
  del_ui_pos(target)
217
218
  self.adaptor.description.remove(null,target);
218
219
  localStorage.removeItem('marked');
@@ -63,11 +63,7 @@ function WFAdaptorManifestation(adaptor) {
63
63
  //{{{ Render the details from rng (right hand side of graph tab)
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
- var focus_ele = $(':focus',tab);
67
- var focus_path = focus_ele.attr('data-relaxngui-path');
68
- var focus_pos = focus_ele.prop('selectionStart');
69
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
70
- tab.empty();
71
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
72
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
73
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -78,20 +74,16 @@ function WFAdaptorManifestation(adaptor) {
78
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
79
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
80
76
  }
81
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
82
77
  var nn = $X($(node).serializeXML());
83
78
  nn.removeAttr('svg-id');
84
79
  nn.removeAttr('svg-type');
85
80
  nn.removeAttr('svg-subtype');
86
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
87
85
  save['details'].content(nn);
88
- if (focus_ele.length > 0) {
89
- var ele = $('[data-relaxngui-path="' + focus_path + '"]',tab)[0];
90
- ele.focus();
91
- if (ele.setSelectionRange) {
92
- ele.setSelectionRange(focus_pos,focus_pos);
93
- }
94
- }
86
+
95
87
  format_visual_forms();
96
88
  }
97
89
  }; //}}}
@@ -211,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
211
203
  $(nodes).each(function(key,str) {
212
204
  nodes[key] = $X(str);
213
205
  });
206
+ let svgids = [];
214
207
  $(nodes).each(function(key,node){
215
- 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);
216
217
  del_ui_pos(target)
217
218
  self.adaptor.description.remove(null,target);
218
219
  localStorage.removeItem('marked');
@@ -1233,28 +1234,33 @@ function WFAdaptorManifestation(adaptor) {
1233
1234
  return 'vertical';
1234
1235
  },
1235
1236
  'resolve_symbol': function(node) {
1237
+ let alist = []
1236
1238
  let plist = []
1237
- let dirty = false
1238
- $('*:not(:has(*))',node).each(function(i,n) {
1239
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1240
- for (const l of lines) {
1241
- if (l != null) {
1242
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1243
- if (m0 != null) {
1244
- plist.push(m0[1])
1245
- }
1246
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1247
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1248
- if (m1 != null && !plist.includes(m1[1])) {
1249
- dirty = true
1250
- }
1251
- if (m2 != null && !plist.includes(m2[1])) {
1252
- dirty = true
1253
- }
1254
- }
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); }
1255
1261
  }
1256
1262
  })
1257
- if (dirty) { return 'start_event'; }
1263
+ if (plist.length > 0) { return 'start_event'; }
1258
1264
  },
1259
1265
  'closing_symbol': 'end',
1260
1266
  'col_shift': function(node) {
@@ -63,11 +63,7 @@ function WFAdaptorManifestation(adaptor) {
63
63
  //{{{ Render the details from rng (right hand side of graph tab)
64
64
  this.update_details = function(svgid){
65
65
  var tab = $('#dat_details');
66
- var focus_ele = $(':focus',tab);
67
- var focus_path = focus_ele.attr('data-relaxngui-path');
68
- var focus_pos = focus_ele.prop('selectionStart');
69
66
  var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
70
- tab.empty();
71
67
  if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
72
68
  save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
73
69
  var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
@@ -78,21 +74,16 @@ function WFAdaptorManifestation(adaptor) {
78
74
  if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
79
75
  $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
80
76
  }
81
- save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
82
77
  var nn = $X($(node).serializeXML());
83
78
  nn.removeAttr('svg-id');
84
79
  nn.removeAttr('svg-type');
85
80
  nn.removeAttr('svg-subtype');
86
81
  nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
87
85
  save['details'].content(nn);
88
- // only after setting content can we set the focus and position. It might loose some stuff nonetheless.
89
- if (focus_ele.length > 0) {
90
- var ele = $('[data-relaxngui-path="' + focus_path + '"]',tab)[0];
91
- ele.focus();
92
- if (ele.setSelectionRange) {
93
- ele.setSelectionRange(focus_pos,focus_pos);
94
- }
95
- }
86
+
96
87
  format_visual_forms();
97
88
  }
98
89
  }; //}}}
@@ -212,8 +203,17 @@ function WFAdaptorManifestation(adaptor) {
212
203
  $(nodes).each(function(key,str) {
213
204
  nodes[key] = $X(str);
214
205
  });
206
+ let svgids = [];
215
207
  $(nodes).each(function(key,node){
216
- 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);
217
217
  del_ui_pos(target)
218
218
  self.adaptor.description.remove(null,target);
219
219
  localStorage.removeItem('marked');
@@ -1235,28 +1235,33 @@ function WFAdaptorManifestation(adaptor) {
1235
1235
  return 'vertical';
1236
1236
  },
1237
1237
  'resolve_symbol': function(node) {
1238
+ let alist = []
1238
1239
  let plist = []
1239
- let dirty = false
1240
- $('*:not(:has(*))',node).each(function(i,n) {
1241
- let lines = n.textContent.split(/(\r\n)|\n|;/)
1242
- for (const l of lines) {
1243
- if (l != null) {
1244
- let m0 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*=/)
1245
- if (m0 != null) {
1246
- plist.push(m0[1])
1247
- }
1248
- let m1 = l.match(/=[^=].*data\.([a-z0-9A-Z_]+)/)
1249
- let m2 = l.match(/^[^=]*data\.([a-z0-9A-Z_]+)[^=]*$/)
1250
- if (m1 != null && !plist.includes(m1[1])) {
1251
- dirty = true
1252
- }
1253
- if (m2 != null && !plist.includes(m2[1])) {
1254
- dirty = true
1255
- }
1256
- }
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); }
1257
1262
  }
1258
1263
  })
1259
- if (dirty) { return 'start_event'; }
1264
+ if (plist.length > 0) { return 'start_event'; }
1260
1265
  },
1261
1266
  'closing_symbol': 'end',
1262
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.53"
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."
@@ -0,0 +1 @@
1
+ 1109498
@@ -0,0 +1 @@
1
+ 1109507
@@ -0,0 +1 @@
1
+ 1109504
@@ -0,0 +1 @@
1
+ 1109501
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: 2.1.53
4
+ version: 2.1.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: tools
12
12
  cert_chain: []
13
- date: 2024-03-11 00:00:00.000000000 Z
13
+ date: 2024-03-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -171,7 +171,8 @@ files:
171
171
  - cockpit/contrib/tree_example.svg
172
172
  - cockpit/css/graph.css
173
173
  - cockpit/css/model.css
174
- - cockpit/css/resources.css
174
+ - cockpit/css/resources-label.css
175
+ - cockpit/css/resources-svg.css
175
176
  - cockpit/css/track.css
176
177
  - cockpit/css/ui.css
177
178
  - cockpit/css/wfadaptor.css
@@ -815,9 +816,13 @@ files:
815
816
  - server/resources/states.xml
816
817
  - server/resources/topics.xml
817
818
  - server/resources/transformation.xml
819
+ - server/routing/end.pid
818
820
  - server/routing/end.rb
821
+ - server/routing/forward-events-00.pid
819
822
  - server/routing/forward-events.rb
823
+ - server/routing/forward-votes.pid
820
824
  - server/routing/forward-votes.rb
825
+ - server/routing/persist.pid
821
826
  - server/routing/persist.rb
822
827
  - server/server.pid
823
828
  - server/server.rb