cpee 2.1.51 → 2.1.53
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 +42 -0
- data/cockpit/css/ui.css +4 -0
- data/cockpit/edit.html +4 -1
- data/cockpit/index.html +3 -0
- data/cockpit/js/details.js +9 -14
- data/cockpit/js/edit.js +3 -0
- data/cockpit/js/instance.js +264 -64
- data/cockpit/js/modifiers.js +12 -15
- data/cockpit/js/parameters.js +4 -10
- data/cockpit/js/resources.js +16 -0
- data/cockpit/js/wfadaptor.js +3 -3
- data/cockpit/templates/Coopis 2010.xml +15 -2
- data/cockpit/templates/Worklist.xml +6 -7
- data/cockpit/themes/compact/rngs/call.rng +6 -4
- data/cockpit/themes/compact/rngs/callmanipulate.rng +6 -4
- data/cockpit/themes/compact/rngs/parallel.rng +2 -2
- data/cockpit/themes/compact/rngs/start.rng +3 -3
- data/cockpit/themes/compact/theme.js +11 -1
- data/cockpit/themes/control/rngs/call.rng +6 -4
- data/cockpit/themes/control/rngs/callmanipulate.rng +6 -4
- data/cockpit/themes/control/rngs/parallel.rng +2 -2
- data/cockpit/themes/control/rngs/start.rng +3 -3
- data/cockpit/themes/control/theme.js +11 -1
- data/cockpit/themes/dataflow/rngs/alternative.rng +25 -0
- data/cockpit/themes/dataflow/rngs/call.rng +228 -0
- data/cockpit/themes/dataflow/rngs/callmanipulate.rng +257 -0
- data/cockpit/themes/dataflow/rngs/choose.rng +14 -0
- data/cockpit/themes/dataflow/rngs/closed_loop.rng +62 -0
- data/cockpit/themes/dataflow/rngs/closed_loop_cancel.rng +5 -0
- data/cockpit/themes/dataflow/rngs/closed_loop_control.rng +31 -0
- data/cockpit/themes/dataflow/rngs/closed_loop_measuring.rng +12 -0
- data/cockpit/themes/dataflow/rngs/critical.rng +5 -0
- data/cockpit/themes/dataflow/rngs/escape.rng +1 -0
- data/cockpit/themes/dataflow/rngs/group.rng +3 -0
- data/cockpit/themes/dataflow/rngs/loop.rng +22 -0
- data/cockpit/themes/dataflow/rngs/manipulate.rng +9 -0
- data/cockpit/themes/dataflow/rngs/otherwise.rng +22 -0
- data/cockpit/themes/dataflow/rngs/parallel.rng +27 -0
- data/cockpit/themes/dataflow/rngs/parallel_branch.rng +2 -0
- data/cockpit/themes/dataflow/rngs/scripts.rng +23 -0
- data/cockpit/themes/dataflow/rngs/start.rng +121 -0
- data/cockpit/themes/dataflow/rngs/stop.rng +5 -0
- data/cockpit/themes/dataflow/rngs/terminate.rng +1 -0
- data/cockpit/themes/dataflow/symbols/alternative.svg +5 -0
- data/cockpit/themes/dataflow/symbols/arrow.svg +3 -0
- data/cockpit/themes/dataflow/symbols/call.svg +6 -0
- data/cockpit/themes/dataflow/symbols/call_sensor.svg +9 -0
- data/cockpit/themes/dataflow/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/dataflow/symbols/callmanipulate_sensor.svg +11 -0
- data/cockpit/themes/dataflow/symbols/choose.svg +5 -0
- data/cockpit/themes/dataflow/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/dataflow/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/dataflow/symbols/closed_loop.svg +5 -0
- data/cockpit/themes/dataflow/symbols/closed_loop_cancel.svg +5 -0
- data/cockpit/themes/dataflow/symbols/closed_loop_control.svg +5 -0
- data/cockpit/themes/dataflow/symbols/closed_loop_measuring.svg +6 -0
- data/cockpit/themes/dataflow/symbols/complex.svg +8 -0
- data/cockpit/themes/dataflow/symbols/critical.svg +4 -0
- data/cockpit/themes/dataflow/symbols/delete.svg +4 -0
- data/cockpit/themes/dataflow/symbols/end.svg +3 -0
- data/cockpit/themes/dataflow/symbols/escape.svg +5 -0
- data/cockpit/themes/dataflow/symbols/event_end.svg +3 -0
- data/cockpit/themes/dataflow/symbols/loop.svg +5 -0
- data/cockpit/themes/dataflow/symbols/manipulate.svg +4 -0
- data/cockpit/themes/dataflow/symbols/otherwise.svg +5 -0
- data/cockpit/themes/dataflow/symbols/parallel.svg +5 -0
- data/cockpit/themes/dataflow/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/dataflow/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/dataflow/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/dataflow/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/dataflow/symbols/parallel_eventbased_exclusive.svg +9 -0
- data/cockpit/themes/dataflow/symbols/parallel_eventbased_parallel.svg +8 -0
- data/cockpit/themes/dataflow/symbols/scripts.svg +4 -0
- data/cockpit/themes/dataflow/symbols/start.svg +3 -0
- data/cockpit/themes/dataflow/symbols/start_event.svg +5 -0
- data/cockpit/themes/dataflow/symbols/stop.svg +5 -0
- data/cockpit/themes/dataflow/symbols/terminate.svg +4 -0
- data/cockpit/themes/dataflow/theme.js +1566 -0
- data/cockpit/themes/default/rngs/call.rng +6 -4
- data/cockpit/themes/default/rngs/callmanipulate.rng +6 -4
- data/cockpit/themes/default/rngs/parallel.rng +2 -2
- data/cockpit/themes/default/rngs/start.rng +3 -3
- data/cockpit/themes/default/theme.js +12 -1
- data/cockpit/themes/extended/rngs/call.rng +6 -4
- data/cockpit/themes/extended/rngs/callmanipulate.rng +6 -4
- data/cockpit/themes/extended/rngs/parallel.rng +2 -2
- data/cockpit/themes/extended/rngs/start.rng +3 -3
- data/cockpit/themes/extended/theme.js +12 -1
- 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 +1526 -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 +11 -1
- data/cockpit/themes/packed/rngs/call.rng +6 -4
- data/cockpit/themes/packed/rngs/callmanipulate.rng +6 -4
- data/cockpit/themes/packed/rngs/parallel.rng +2 -2
- data/cockpit/themes/packed/rngs/start.rng +3 -3
- data/cockpit/themes/packed/theme.js +11 -1
- data/cockpit/themes/preset/rngs/call.rng +6 -4
- data/cockpit/themes/preset/rngs/callmanipulate.rng +6 -4
- data/cockpit/themes/preset/rngs/parallel.rng +2 -2
- data/cockpit/themes/preset/rngs/start.rng +3 -3
- data/cockpit/themes/preset/theme.js +12 -1
- data/cpee.gemspec +2 -2
- data/lib/cpee/implementation.rb +1 -1
- data/lib/cpee/implementation_properties.rb +23 -13
- data/lib/cpee/message.rb +20 -8
- data/lib/cpee/persistence.rb +12 -0
- data/lib/properties/state.rng +0 -2
- data/lib/properties.xml +1 -2
- data/server/executionhandlers/ruby/connection.rb +49 -13
- 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/tools/cpee +32 -1
- metadata +116 -21
- 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/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/routing/end.pid +0 -1
- data/server/routing/forward-events-00.pid +0 -1
- data/server/routing/forward-votes.pid +0 -1
- data/server/routing/persist.pid +0 -1
- 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">
|
@@ -63,6 +63,9 @@ 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');
|
66
69
|
var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
|
67
70
|
tab.empty();
|
68
71
|
if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
|
@@ -82,6 +85,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
82
85
|
nn.removeAttr('svg-subtype');
|
83
86
|
nn.removeAttr('svg-label');
|
84
87
|
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
|
+
}
|
85
95
|
format_visual_forms();
|
86
96
|
}
|
87
97
|
}; //}}}
|
@@ -1375,7 +1385,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
1375
1385
|
this.elements.parallel_event_one = { /*{{{*/
|
1376
1386
|
'parent': 'parallel_finish',
|
1377
1387
|
'illustrator': {//{{{
|
1378
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
1388
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1379
1389
|
}//}}}
|
1380
1390
|
}; /*}}}*/
|
1381
1391
|
this.elements.parallel_branch_normal = { /*{{{*/
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<data type="string" rngui:readonly="true"/>
|
4
4
|
</attribute>
|
5
5
|
<attribute name="endpoint" rngui:label="Endpoint">
|
6
|
-
<data type="string"
|
6
|
+
<data type="string">
|
7
|
+
<param name="pattern">^[a-z_][a-zA-Z0-9_]*$</param>
|
8
|
+
</data>
|
7
9
|
</attribute>
|
8
10
|
<element name="parameters" rngui:header="Properties">
|
9
11
|
<element name="label" rngui:label="Label">
|
@@ -96,9 +98,9 @@
|
|
96
98
|
</element>
|
97
99
|
<element name="extractor_type" rngui:label="Extractor Type">
|
98
100
|
<choice>
|
99
|
-
<value
|
100
|
-
<value
|
101
|
-
<value
|
101
|
+
<value rngui:label='Intrinsic'>intrinsic</value>
|
102
|
+
<value rngui:label='Extrinsic'>extrinsic</value>
|
103
|
+
<value rngui:label='Separate'>separate</value>
|
102
104
|
</choice>
|
103
105
|
</element>
|
104
106
|
<element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic & extrinsic data'>
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<data type="string" rngui:readonly="true"/>
|
4
4
|
</attribute>
|
5
5
|
<attribute name="endpoint" rngui:label="Endpoint">
|
6
|
-
<data type="string"
|
6
|
+
<data type="string">
|
7
|
+
<param name="pattern">^[a-z_][a-zA-Z0-9_]*$</param>
|
8
|
+
</data>
|
7
9
|
</attribute>
|
8
10
|
<element name="parameters" rngui:header="Properties">
|
9
11
|
<element name="label" rngui:label="Label">
|
@@ -120,9 +122,9 @@
|
|
120
122
|
</element>
|
121
123
|
<element name="extractor_type" rngui:label="Extractor Type">
|
122
124
|
<choice>
|
123
|
-
<value
|
124
|
-
<value
|
125
|
-
<value
|
125
|
+
<value rngui:label='Intrinsic'>intrinsic</value>
|
126
|
+
<value rngui:label='Extrinsic'>extrinsic</value>
|
127
|
+
<value rngui:label='Separate'>separate</value>
|
126
128
|
</choice>
|
127
129
|
</element>
|
128
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'>
|
@@ -63,6 +63,9 @@ 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');
|
66
69
|
var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
|
67
70
|
tab.empty();
|
68
71
|
if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
|
@@ -82,6 +85,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
82
85
|
nn.removeAttr('svg-subtype');
|
83
86
|
nn.removeAttr('svg-label');
|
84
87
|
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
|
+
}
|
85
95
|
format_visual_forms();
|
86
96
|
}
|
87
97
|
}; //}}}
|
@@ -1443,7 +1453,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
1443
1453
|
this.elements.parallel_event_one = { /*{{{*/
|
1444
1454
|
'parent': 'parallel_finish',
|
1445
1455
|
'illustrator': {//{{{
|
1446
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
1456
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1447
1457
|
}//}}}
|
1448
1458
|
}; /*}}}*/
|
1449
1459
|
this.elements.parallel_branch_normal = { /*{{{*/
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<data type="string" rngui:readonly="true"/>
|
4
4
|
</attribute>
|
5
5
|
<attribute name="endpoint" rngui:label="Endpoint">
|
6
|
-
<data type="string"
|
6
|
+
<data type="string">
|
7
|
+
<param name="pattern">^[a-z_][a-zA-Z0-9_]*$</param>
|
8
|
+
</data>
|
7
9
|
</attribute>
|
8
10
|
<element name="parameters" rngui:header="Properties">
|
9
11
|
<element name="label" rngui:label="Label">
|
@@ -96,9 +98,9 @@
|
|
96
98
|
</element>
|
97
99
|
<element name="extractor_type" rngui:label="Extractor Type">
|
98
100
|
<choice>
|
99
|
-
<value
|
100
|
-
<value
|
101
|
-
<value
|
101
|
+
<value rngui:label='Intrinsic'>intrinsic</value>
|
102
|
+
<value rngui:label='Extrinsic'>extrinsic</value>
|
103
|
+
<value rngui:label='Separate'>separate</value>
|
102
104
|
</choice>
|
103
105
|
</element>
|
104
106
|
<element name="extractor_code" rngui:label="Extractor Code" rngui:hint='For intrinsic & extrinsic data'>
|
@@ -3,7 +3,9 @@
|
|
3
3
|
<data type="string" rngui:readonly="true"/>
|
4
4
|
</attribute>
|
5
5
|
<attribute name="endpoint" rngui:label="Endpoint">
|
6
|
-
<data type="string"
|
6
|
+
<data type="string">
|
7
|
+
<param name="pattern">^[a-z_][a-zA-Z0-9_]*$</param>
|
8
|
+
</data>
|
7
9
|
</attribute>
|
8
10
|
<element name="parameters" rngui:header="Properties">
|
9
11
|
<element name="label" rngui:label="Label">
|
@@ -120,9 +122,9 @@
|
|
120
122
|
</element>
|
121
123
|
<element name="extractor_type" rngui:label="Extractor Type">
|
122
124
|
<choice>
|
123
|
-
<value
|
124
|
-
<value
|
125
|
-
<value
|
125
|
+
<value rngui:label='Intrinsic'>intrinsic</value>
|
126
|
+
<value rngui:label='Extrinsic'>extrinsic</value>
|
127
|
+
<value rngui:label='Separate'>separate</value>
|
126
128
|
</choice>
|
127
129
|
</element>
|
128
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'>
|
@@ -63,6 +63,9 @@ 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');
|
66
69
|
var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
|
67
70
|
tab.empty();
|
68
71
|
if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
|
@@ -82,6 +85,14 @@ function WFAdaptorManifestation(adaptor) {
|
|
82
85
|
nn.removeAttr('svg-subtype');
|
83
86
|
nn.removeAttr('svg-label');
|
84
87
|
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
|
+
}
|
85
96
|
format_visual_forms();
|
86
97
|
}
|
87
98
|
}; //}}}
|
@@ -1444,7 +1455,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
1444
1455
|
this.elements.parallel_event_one = { /*{{{*/
|
1445
1456
|
'parent': 'parallel_finish',
|
1446
1457
|
'illustrator': {//{{{
|
1447
|
-
'svg': self.adaptor.theme_dir + 'symbols/
|
1458
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1448
1459
|
}//}}}
|
1449
1460
|
}; /*}}}*/
|
1450
1461
|
this.elements.parallel_branch_normal = { /*{{{*/
|
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.53"
|
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."
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.email = 'juergen.mangler@gmail.com'
|
22
22
|
s.homepage = 'http://cpee.org/'
|
23
23
|
|
24
|
-
s.add_runtime_dependency 'riddl', '~> 0
|
24
|
+
s.add_runtime_dependency 'riddl', '~> 1.0'
|
25
25
|
s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.111'
|
26
26
|
s.add_runtime_dependency 'highline', '~> 2.0'
|
27
27
|
s.add_runtime_dependency 'redis', '~> 5.0'
|
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/cpee/message.rb
CHANGED
@@ -15,8 +15,20 @@
|
|
15
15
|
module CPEE
|
16
16
|
|
17
17
|
module Message
|
18
|
-
|
19
|
-
|
18
|
+
@@who = 'cpee'
|
19
|
+
@@type = 'instance'
|
20
|
+
def self::who #{{{
|
21
|
+
@@who
|
22
|
+
end #}}}
|
23
|
+
def self::who=(it) #{{{
|
24
|
+
@@who = it
|
25
|
+
end #}}}
|
26
|
+
def self::type #{{{
|
27
|
+
@@type
|
28
|
+
end #}}}
|
29
|
+
def self::type=(it) #{{{
|
30
|
+
@@type = it
|
31
|
+
end #}}}
|
20
32
|
|
21
33
|
def self::set_workers(workers)
|
22
34
|
@@tworkers = (workers < 1 && workers > 99 ? 1 : workers).freeze
|
@@ -32,17 +44,17 @@ module CPEE
|
|
32
44
|
topic = ::File::dirname(event)
|
33
45
|
name = ::File::basename(event)
|
34
46
|
payload = {
|
35
|
-
|
36
|
-
|
37
|
-
|
47
|
+
@@who => cpee,
|
48
|
+
@@type + '-url' => File.join(cpee,instance.to_s),
|
49
|
+
@@type => instance,
|
38
50
|
'topic' => topic,
|
39
51
|
'type' => type,
|
40
52
|
'name' => name,
|
41
53
|
'timestamp' => Time.now.xmlschema(3),
|
42
54
|
'content' => content
|
43
55
|
}
|
44
|
-
payload[
|
45
|
-
payload[
|
56
|
+
payload[@@type + '-uuid'] = instance_uuid if instance_uuid
|
57
|
+
payload[@@type + '-name'] = instance_name if instance_name
|
46
58
|
|
47
59
|
backend.publish(type.to_s + ':' + target + ':' + event.to_s,
|
48
60
|
instance.to_s + ' ' +
|
@@ -55,7 +67,7 @@ module CPEE
|
|
55
67
|
topic = ::File::dirname(event)
|
56
68
|
name = ::File::basename(event)
|
57
69
|
payload = {
|
58
|
-
|
70
|
+
@@who => cpee,
|
59
71
|
'topic' => topic,
|
60
72
|
'type' => type,
|
61
73
|
'name' => name,
|
data/lib/cpee/persistence.rb
CHANGED
@@ -19,6 +19,9 @@ module CPEE
|
|
19
19
|
def self::obj #{{{
|
20
20
|
@@obj
|
21
21
|
end #}}}
|
22
|
+
def self::obj=(it) #{{{
|
23
|
+
@@obj = it
|
24
|
+
end #}}}
|
22
25
|
|
23
26
|
def self::set_list(id,opts,item,values,deleted=[]) #{{{
|
24
27
|
ah = AttributesHelper.new
|
@@ -81,6 +84,15 @@ module CPEE
|
|
81
84
|
end
|
82
85
|
end
|
83
86
|
|
87
|
+
def self::new_object(opts)
|
88
|
+
id = opts[:redis].zrevrange(@@obj + 's', 0, 0).first.to_i + 1
|
89
|
+
opts[:redis].zadd(@@obj + 's',id,id)
|
90
|
+
id
|
91
|
+
end
|
92
|
+
def self::new_static_object(id,opts)
|
93
|
+
opts[:redis].set(File.join(@@obj + ":#{id}",'state'),'')
|
94
|
+
nil
|
95
|
+
end
|
84
96
|
def self::new_object(opts)
|
85
97
|
id = opts[:redis].zrevrange(@@obj + 's', 0, 0).first.to_i + 1
|
86
98
|
opts[:redis].zadd(@@obj + 's',id,id)
|
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>
|
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>
|
@@ -133,7 +132,7 @@
|
|
133
132
|
<parameter name="dslx" mimetype="*/xml"/>
|
134
133
|
</message> <!--}}}-->
|
135
134
|
<message name="description"> <!--{{{-->
|
136
|
-
<parameter name="description" mimetype="
|
135
|
+
<parameter name="description" mimetype="*"/>
|
137
136
|
</message> <!--}}}-->
|
138
137
|
|
139
138
|
<message name="transformation"> <!--{{{-->
|
@@ -42,8 +42,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
42
42
|
end# }}}
|
43
43
|
def self::inform_connectionwrapper_error(arguments,err) # {{{
|
44
44
|
controller = arguments[0]
|
45
|
-
|
46
|
-
|
45
|
+
puts err.message
|
46
|
+
puts err.backtrace
|
47
47
|
controller.notify("executionhandler/error", :message => err.backtrace[0].gsub(/([\w -_]+):(\d+):in.*/,'\\1, Line \2: ') + err.message)
|
48
48
|
end # }}}
|
49
49
|
def self::inform_position_change(arguments,ipc={}) # {{{
|
@@ -64,11 +64,11 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
64
64
|
@guard_items = []
|
65
65
|
end # }}}
|
66
66
|
|
67
|
-
def prepare(readonly, endpoints, parameters
|
67
|
+
def prepare(readonly, endpoints, parameters) #{{{
|
68
68
|
@handler_endpoint = endpoints.is_a?(Array) ? endpoints.map{ |ep| readonly.endpoints[ep] }.compact : readonly.endpoints[endpoints]
|
69
|
-
if @controller.attributes['
|
69
|
+
if @controller.attributes['twin_engine']
|
70
70
|
@handler_endpoint_orig = @handler_endpoint
|
71
|
-
@handler_endpoint = @controller.attributes['
|
71
|
+
@handler_endpoint = @controller.attributes['twin_engine'].to_s + '?original_endpoint=' + Riddl::Protocols::Utils::escape(@handler_endpoint)
|
72
72
|
end
|
73
73
|
params = parameters.dup
|
74
74
|
params[:arguments] = params[:arguments].dup if params[:arguments]
|
@@ -127,7 +127,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
127
127
|
params << Riddl::Header.new("CPEE-CALLBACK-ID",callback)
|
128
128
|
params << Riddl::Header.new("CPEE-ACTIVITY",@handler_position)
|
129
129
|
params << Riddl::Header.new("CPEE-LABEL",@label||'')
|
130
|
-
params << Riddl::Header.new("CPEE-
|
130
|
+
params << Riddl::Header.new("CPEE-TWIN-TARGET",@controller.attributes['twin_target']) if @controller.attributes['twin_target']
|
131
131
|
@controller.attributes.each do |key,value|
|
132
132
|
params << Riddl::Header.new("CPEE-ATTR-#{key.to_s.gsub(/_/,'-')}",value)
|
133
133
|
end
|
@@ -142,19 +142,55 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
142
142
|
@handler_passthrough = callback
|
143
143
|
@controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
144
144
|
|
145
|
+
pp params
|
146
|
+
|
145
147
|
status, result, headers = client.request type => params
|
146
148
|
@guard_files += result
|
147
149
|
|
148
150
|
if status == 561
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
if
|
153
|
-
|
154
|
-
|
155
|
-
|
151
|
+
if @controller.attributes['twin_translate']
|
152
|
+
gettrans = Riddl::Client.new(@controller.attributes['twin_translate'])
|
153
|
+
gtstatus, gtresult, gtheaders = gettrans.get
|
154
|
+
if gtstatus >= 200 && gtstatus < 300
|
155
|
+
transwhat = case headers['CPEE-TWIN-TASKTYPE']
|
156
|
+
when 'i'; 'instantiation'
|
157
|
+
when 'ir'; 'ipc-receive'
|
158
|
+
when 'is'; 'ipc-send'
|
159
|
+
else
|
160
|
+
'instantiation'
|
161
|
+
end
|
162
|
+
JSON::parse(gtresult.first.value.read).each do |e|
|
163
|
+
if e['type'] == transwhat
|
164
|
+
@handler_endpoint = e['endpoint'] if e['endpoint']
|
165
|
+
e['arguments']&.each do |k,a|
|
166
|
+
if a.is_a? String
|
167
|
+
hname = a.gsub(/-/,'_')
|
168
|
+
a = headers[hname] if headers[hname]
|
169
|
+
elsif a.is_a? Hash
|
170
|
+
a.each do |k_ht, a_ht|
|
171
|
+
hname = a_ht.gsub(/-/,'_')
|
172
|
+
a[k_ht] = headers[hname] if headers[hname]
|
173
|
+
end
|
174
|
+
end
|
175
|
+
params.each do |p|
|
176
|
+
if p.name == k
|
177
|
+
if a.is_a? String
|
178
|
+
p.value = a
|
179
|
+
elsif a.is_a? Hash
|
180
|
+
ohash = JSON::parse(p.value) rescue {}
|
181
|
+
ohash.merge!(a)
|
182
|
+
p.value = JSON.generate(ohash)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
156
189
|
end
|
190
|
+
else
|
191
|
+
@handler_endpoint = @handler_endpoint_orig
|
157
192
|
end
|
193
|
+
params.delete_if { |p| p.name == 'original_endpoint' }
|
158
194
|
end
|
159
195
|
end while status == 561
|
160
196
|
|