cpee 2.1.52 → 2.1.53
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/ui.css +1 -1
- data/cockpit/edit.html +4 -1
- data/cockpit/js/details.js +4 -14
- data/cockpit/js/edit.js +3 -0
- data/cockpit/js/instance.js +15 -6
- data/cockpit/js/modifiers.js +4 -14
- data/cockpit/js/parameters.js +4 -10
- 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 +10 -0
- 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 +10 -0
- 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 +13 -3
- 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 +11 -0
- 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 +11 -0
- 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 +10 -0
- 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 +10 -0
- 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 +11 -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
- metadata +57 -16
- 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">
|
|
@@ -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
|
}; //}}}
|
|
@@ -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'>
|
|
@@ -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
|
}; //}}}
|
|
@@ -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'>
|
|
@@ -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
|
}; //}}}
|
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."
|
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>
|
data/lib/properties.xml
CHANGED
|
@@ -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,7 +64,7 @@ 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
69
|
if @controller.attributes['twin_engine']
|
|
70
70
|
@handler_endpoint_orig = @handler_endpoint
|
|
@@ -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,6 +142,8 @@ 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
|
|
|
@@ -157,12 +159,29 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
|
157
159
|
else
|
|
158
160
|
'instantiation'
|
|
159
161
|
end
|
|
160
|
-
JSON::parse(gtresult.value.read).each do |e|
|
|
162
|
+
JSON::parse(gtresult.first.value.read).each do |e|
|
|
161
163
|
if e['type'] == transwhat
|
|
162
164
|
@handler_endpoint = e['endpoint'] if e['endpoint']
|
|
163
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
|
|
164
175
|
params.each do |p|
|
|
165
|
-
|
|
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
|
|
166
185
|
end
|
|
167
186
|
end
|
|
168
187
|
end
|
|
@@ -172,16 +191,6 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
|
172
191
|
@handler_endpoint = @handler_endpoint_orig
|
|
173
192
|
end
|
|
174
193
|
params.delete_if { |p| p.name == 'original_endpoint' }
|
|
175
|
-
params.each do |p|
|
|
176
|
-
if p.name == 'attributes'
|
|
177
|
-
t = JSON::parse(p.value) rescue {}
|
|
178
|
-
t['twin_engine'] = @controller.attributes['twin_engine'] if @controller.attributes['twin_engine']
|
|
179
|
-
t['twin_target'] = @controller.attributes['twin_target'] if @controller.attributes['twin_target']
|
|
180
|
-
t['twin_translate'] = @controller.attributes['twin_engine'] if @controller.attributes['twin_translate']
|
|
181
|
-
p.value = t.to_json
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
pp params
|
|
185
194
|
end
|
|
186
195
|
end while status == 561
|
|
187
196
|
|
|
@@ -290,6 +290,14 @@
|
|
|
290
290
|
</xsl:with-param>
|
|
291
291
|
</xsl:call-template>
|
|
292
292
|
<xsl:text>choose </xsl:text>
|
|
293
|
+
<xsl:choose>
|
|
294
|
+
<xsl:when test="@mode='exclusive'">
|
|
295
|
+
<xsl:text>:exclusive</xsl:text>
|
|
296
|
+
</xsl:when>
|
|
297
|
+
<xsl:otherwise>
|
|
298
|
+
<xsl:text>:inclusive</xsl:text>
|
|
299
|
+
</xsl:otherwise>
|
|
300
|
+
</xsl:choose>
|
|
293
301
|
<xsl:text> do</xsl:text>
|
|
294
302
|
<xsl:call-template name="print-newline"/>
|
|
295
303
|
<xsl:apply-templates>
|
|
@@ -594,67 +602,69 @@
|
|
|
594
602
|
</xsl:choose>
|
|
595
603
|
</xsl:template>
|
|
596
604
|
<xsl:template match="d:*" mode="sub">
|
|
597
|
-
<xsl:if test="
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
<xsl:
|
|
602
|
-
<xsl:
|
|
603
|
-
<xsl:
|
|
604
|
-
<xsl:
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
<xsl:
|
|
610
|
-
<xsl:
|
|
611
|
-
<xsl:
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
<xsl:
|
|
619
|
-
<xsl:
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
<xsl:
|
|
625
|
-
<xsl:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
<xsl:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
<xsl:
|
|
638
|
-
<xsl:
|
|
639
|
-
<xsl:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
<xsl:
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
<xsl:
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
605
|
+
<xsl:if test="not(@rngui-nonfunctional)">
|
|
606
|
+
<xsl:if test="count(preceding-sibling::*[not(@rngui-nonfunctional)]) > 0">, </xsl:if>
|
|
607
|
+
<xsl:text>⭐(</xsl:text>
|
|
608
|
+
<xsl:text>:name => :</xsl:text>
|
|
609
|
+
<xsl:choose>
|
|
610
|
+
<xsl:when test="substring(name(),1,1) = '_'">
|
|
611
|
+
<xsl:call-template name="format-name">
|
|
612
|
+
<xsl:with-param name="tname">
|
|
613
|
+
<xsl:value-of select="substring(name(),2)"/>
|
|
614
|
+
</xsl:with-param>
|
|
615
|
+
</xsl:call-template>
|
|
616
|
+
</xsl:when>
|
|
617
|
+
<xsl:otherwise>
|
|
618
|
+
<xsl:call-template name="format-name">
|
|
619
|
+
<xsl:with-param name="tname">
|
|
620
|
+
<xsl:value-of select="name()"/>
|
|
621
|
+
</xsl:with-param>
|
|
622
|
+
</xsl:call-template>
|
|
623
|
+
</xsl:otherwise>
|
|
624
|
+
</xsl:choose>
|
|
625
|
+
<xsl:text>, :value => ->{ </xsl:text>
|
|
626
|
+
<xsl:choose>
|
|
627
|
+
<xsl:when test="not(node())">
|
|
628
|
+
<xsl:text>nil</xsl:text>
|
|
629
|
+
</xsl:when>
|
|
630
|
+
<xsl:when test="child::node()[not(self::text())]">
|
|
631
|
+
<!-- FUUUU, there is probably much more TODO. Updated Matthias und Juergen, we tested for ing-opcua/execute -->
|
|
632
|
+
<xsl:choose>
|
|
633
|
+
<xsl:when test="child::* and name(child::*)=concat(name(.),'_item') and count(child::*[not(name()=name(../child::*[1]))])=0">
|
|
634
|
+
<xsl:text>"[ </xsl:text>
|
|
635
|
+
<xsl:apply-templates select="*" mode="JSONArrayItem"/>
|
|
636
|
+
<xsl:text>]"</xsl:text>
|
|
637
|
+
</xsl:when>
|
|
638
|
+
<xsl:otherwise>
|
|
639
|
+
<xsl:text>"{ </xsl:text>
|
|
640
|
+
<xsl:apply-templates select="*" mode="JSONSUB"/>
|
|
641
|
+
<xsl:text>}"</xsl:text>
|
|
642
|
+
</xsl:otherwise>
|
|
643
|
+
</xsl:choose>
|
|
644
|
+
</xsl:when>
|
|
645
|
+
<xsl:otherwise>
|
|
646
|
+
<xsl:choose>
|
|
647
|
+
<xsl:when test="substring(text(),1,1) = '!'">
|
|
648
|
+
<xsl:value-of select="substring(text(),2)"/>
|
|
649
|
+
</xsl:when>
|
|
650
|
+
<xsl:otherwise>
|
|
651
|
+
<xsl:text>"</xsl:text>
|
|
652
|
+
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
|
653
|
+
<xsl:text>"</xsl:text>
|
|
654
|
+
</xsl:otherwise>
|
|
655
|
+
</xsl:choose>
|
|
656
|
+
</xsl:otherwise>
|
|
657
|
+
</xsl:choose>
|
|
658
|
+
<xsl:text> }</xsl:text>
|
|
659
|
+
<xsl:for-each select="@*">
|
|
660
|
+
<xsl:text>, :</xsl:text>
|
|
661
|
+
<xsl:value-of select="name()"/>
|
|
662
|
+
<xsl:text> => "</xsl:text>
|
|
663
|
+
<xsl:value-of select="string(.)"/>
|
|
664
|
+
<xsl:text>"</xsl:text>
|
|
665
|
+
</xsl:for-each>
|
|
666
|
+
<xsl:text>)</xsl:text>
|
|
667
|
+
</xsl:if>
|
|
658
668
|
</xsl:template>
|
|
659
669
|
|
|
660
670
|
<xsl:template match="d:finalize | d:update | d:prepare | d:rescue" mode="part-of-call">
|