cpee 2.1.52 → 2.1.54
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -4,16 +4,16 @@
|
|
4
4
|
</attribute>
|
5
5
|
<attribute name="endpoint" rngui:label="Type">
|
6
6
|
<choice>
|
7
|
-
<value
|
8
|
-
<value
|
9
|
-
<value
|
10
|
-
<value
|
11
|
-
<value
|
12
|
-
<value
|
13
|
-
<value
|
14
|
-
<value
|
15
|
-
<value
|
16
|
-
<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
|
8
|
-
<value
|
9
|
-
<value
|
10
|
-
<value
|
11
|
-
<value
|
12
|
-
<value
|
13
|
-
<value
|
14
|
-
<value
|
15
|
-
<value
|
16
|
-
<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
|
-
|
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
|
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');
|
@@ -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
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1239
|
+
|
1240
|
+
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
|
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 (
|
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
|
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) {
|
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.
|
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."
|
data/lib/cpee/implementation.rb
CHANGED
@@ -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
|
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
|
-
|
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.
|
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)
|
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)
|
689
|
+
desc.transform_with(trans)
|
680
690
|
elsif tdesctype == 'clean'
|
681
|
-
XML::Smart::open_unprotected(opts[:empty_dslx])
|
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
|
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
|
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")
|
data/lib/properties/state.rng
CHANGED
@@ -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>
|