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.
- checksums.yaml +4 -4
- data/cockpit/css/{resources.css → resources-label.css} +0 -7
- data/cockpit/css/resources-svg.css +20 -0
- data/cockpit/css/ui.css +0 -4
- data/cockpit/edit.html +5 -1
- data/cockpit/graph.html +4 -0
- data/cockpit/index.html +3 -2
- data/cockpit/js/details.js +4 -14
- data/cockpit/js/edit.js +3 -0
- data/cockpit/js/instance.js +129 -139
- data/cockpit/js/modifiers.js +4 -14
- data/cockpit/js/parameters.js +4 -10
- data/cockpit/js/wfadaptor.js +0 -27
- data/cockpit/model.html +2 -0
- data/cockpit/templates/Coopis 2010.xml +8 -1
- data/cockpit/templates/Worklist.xml +6 -7
- data/cockpit/themes/compact/rngs/call.rng +3 -3
- data/cockpit/themes/compact/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/compact/rngs/parallel.rng +2 -2
- data/cockpit/themes/compact/rngs/start.rng +3 -3
- data/cockpit/themes/compact/theme.js +38 -22
- data/cockpit/themes/control/rngs/call.rng +3 -3
- data/cockpit/themes/control/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/control/rngs/parallel.rng +2 -2
- data/cockpit/themes/control/rngs/start.rng +3 -3
- data/cockpit/themes/control/theme.js +76 -10
- data/cockpit/themes/dataflow/rngs/call.rng +3 -3
- data/cockpit/themes/dataflow/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/dataflow/rngs/parallel.rng +2 -2
- data/cockpit/themes/dataflow/rngs/start.rng +3 -3
- data/cockpit/themes/dataflow/theme.js +48 -32
- data/cockpit/themes/default/rngs/call.rng +3 -3
- data/cockpit/themes/default/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/default/rngs/parallel.rng +2 -2
- data/cockpit/themes/default/rngs/start.rng +3 -3
- data/cockpit/themes/default/theme.js +38 -22
- data/cockpit/themes/extended/rngs/call.rng +3 -3
- data/cockpit/themes/extended/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/extended/rngs/parallel.rng +2 -2
- data/cockpit/themes/extended/rngs/start.rng +3 -3
- data/cockpit/themes/extended/theme.js +38 -22
- data/cockpit/themes/felix/rngs/alternative.rng +25 -0
- data/cockpit/themes/felix/rngs/call.rng +229 -0
- data/cockpit/themes/felix/rngs/callmanipulate.rng +259 -0
- data/cockpit/themes/felix/rngs/choose.rng +14 -0
- data/cockpit/themes/felix/rngs/closed_loop.rng +62 -0
- data/cockpit/themes/felix/rngs/closed_loop_cancel.rng +5 -0
- data/cockpit/themes/felix/rngs/closed_loop_control.rng +31 -0
- data/cockpit/themes/felix/rngs/closed_loop_measuring.rng +12 -0
- data/cockpit/themes/felix/rngs/critical.rng +5 -0
- data/cockpit/themes/felix/rngs/escape.rng +1 -0
- data/cockpit/themes/felix/rngs/group.rng +3 -0
- data/cockpit/themes/felix/rngs/loop.rng +22 -0
- data/cockpit/themes/felix/rngs/manipulate.rng +20 -0
- data/cockpit/themes/felix/rngs/otherwise.rng +22 -0
- data/cockpit/themes/felix/rngs/parallel.rng +27 -0
- data/cockpit/themes/felix/rngs/parallel_branch.rng +2 -0
- data/cockpit/themes/felix/rngs/scripts.rng +23 -0
- data/cockpit/themes/felix/rngs/start.rng +121 -0
- data/cockpit/themes/felix/rngs/stop.rng +5 -0
- data/cockpit/themes/felix/rngs/terminate.rng +1 -0
- data/cockpit/themes/felix/symbols/alternative.svg +5 -0
- data/cockpit/themes/felix/symbols/arrow.svg +3 -0
- data/cockpit/themes/felix/symbols/call.svg +6 -0
- data/cockpit/themes/felix/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/felix/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/felix/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/felix/symbols/choose.svg +5 -0
- data/cockpit/themes/felix/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/felix/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/felix/symbols/closed_loop.svg +5 -0
- data/cockpit/themes/felix/symbols/closed_loop_cancel.svg +5 -0
- data/cockpit/themes/felix/symbols/closed_loop_control.svg +5 -0
- data/cockpit/themes/felix/symbols/closed_loop_measuring.svg +6 -0
- data/cockpit/themes/felix/symbols/complex.svg +8 -0
- data/cockpit/themes/felix/symbols/critical.svg +4 -0
- data/cockpit/themes/felix/symbols/delete.svg +4 -0
- data/cockpit/themes/felix/symbols/end.svg +3 -0
- data/cockpit/themes/felix/symbols/escape.svg +5 -0
- data/cockpit/themes/felix/symbols/event_end.svg +3 -0
- data/cockpit/themes/felix/symbols/loop.svg +5 -0
- data/cockpit/themes/felix/symbols/manipulate.svg +4 -0
- data/cockpit/themes/felix/symbols/otherwise.svg +5 -0
- data/cockpit/themes/felix/symbols/parallel.svg +5 -0
- data/cockpit/themes/felix/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/felix/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/felix/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/felix/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/felix/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/felix/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/felix/symbols/scripts.svg +4 -0
- data/cockpit/themes/felix/symbols/start.svg +3 -0
- data/cockpit/themes/felix/symbols/start_event.svg +5 -0
- data/cockpit/themes/felix/symbols/stop.svg +5 -0
- data/cockpit/themes/felix/symbols/terminate.svg +4 -0
- data/cockpit/themes/felix/theme.js +1531 -0
- data/cockpit/themes/model/rngs/call.rng +10 -10
- data/cockpit/themes/model/rngs/callmanipulate.rng +10 -10
- data/cockpit/themes/model/theme.js +14 -3
- data/cockpit/themes/packed/rngs/call.rng +3 -3
- data/cockpit/themes/packed/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/packed/rngs/parallel.rng +2 -2
- data/cockpit/themes/packed/rngs/start.rng +3 -3
- data/cockpit/themes/packed/theme.js +38 -22
- data/cockpit/themes/preset/rngs/call.rng +3 -3
- data/cockpit/themes/preset/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/preset/rngs/parallel.rng +2 -2
- data/cockpit/themes/preset/rngs/start.rng +3 -3
- data/cockpit/themes/preset/theme.js +38 -22
- data/cockpit/track.html +4 -0
- data/cpee.gemspec +1 -1
- data/lib/cpee/implementation.rb +1 -1
- data/lib/cpee/implementation_properties.rb +23 -13
- data/lib/properties/state.rng +0 -2
- data/lib/properties.xml +0 -1
- data/server/executionhandlers/ruby/connection.rb +25 -16
- data/server/executionhandlers/ruby/controller.rb +1 -1
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +71 -61
- data/server/resources/states.dot +0 -4
- data/server/resources/states.xml +0 -6
- data/server/routing/end.pid +1 -0
- data/server/routing/forward-events-00.pid +1 -0
- data/server/routing/forward-votes.pid +1 -0
- data/server/routing/persist.pid +1 -0
- metadata +63 -17
- data/cockpit/css/replay.css +0 -55
- data/cockpit/js/replay.js +0 -40
- data/cockpit/replay.html +0 -53
- data/cockpit/themes/compact/symbols/test.svg +0 -74
- data/cockpit/themes/control/symbols/test.svg +0 -74
- data/cockpit/themes/dataflow/symbols/test.svg +0 -74
- data/cockpit/themes/default/symbols/test.svg +0 -74
- data/cockpit/themes/extended/symbols/test.svg +0 -74
- data/cockpit/themes/model/symbols/test.svg +0 -74
- data/cockpit/themes/packed/symbols/test.svg +0 -74
- data/cockpit/themes/preset/symbols/test.svg +0 -74
- data/server/executionhandlers/ruby/desc.xml +0 -107
- data/server/resources/test.pdf +0 -0
- 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
|
-
|
|
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
|
|
348
|
-
var reg_not_assi = /data
|
|
358
|
+
var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for >/< 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
|
|
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
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1311
|
+
|
|
1312
|
+
var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for >/< 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 (
|
|
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
|
|
102
|
-
<value
|
|
103
|
-
<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 & extrinsic data'>
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
</element>
|
|
123
123
|
<element name="extractor_type" rngui:label="Extractor Type">
|
|
124
124
|
<choice>
|
|
125
|
-
<value
|
|
126
|
-
<value
|
|
127
|
-
<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 & 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
|
|
8
|
-
<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
|
|
33
|
-
<value
|
|
34
|
-
<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 & 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
|
-
|
|
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
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1240
|
+
|
|
1241
|
+
var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for >/< 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 (
|
|
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
|
|
102
|
-
<value
|
|
103
|
-
<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 & extrinsic data'>
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
</element>
|
|
123
123
|
<element name="extractor_type" rngui:label="Extractor Type">
|
|
124
124
|
<choice>
|
|
125
|
-
<value
|
|
126
|
-
<value
|
|
127
|
-
<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 & 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
|
|
8
|
-
<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
|
|
33
|
-
<value
|
|
34
|
-
<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 & 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
|
-
|
|
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
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1274
|
+
|
|
1275
|
+
var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for >/< 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 (
|
|
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>
|