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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +1 -1
  3. data/cockpit/edit.html +4 -1
  4. data/cockpit/js/details.js +4 -14
  5. data/cockpit/js/edit.js +3 -0
  6. data/cockpit/js/instance.js +15 -6
  7. data/cockpit/js/modifiers.js +4 -14
  8. data/cockpit/js/parameters.js +4 -10
  9. data/cockpit/templates/Coopis 2010.xml +8 -1
  10. data/cockpit/templates/Worklist.xml +6 -7
  11. data/cockpit/themes/compact/rngs/call.rng +3 -3
  12. data/cockpit/themes/compact/rngs/callmanipulate.rng +3 -3
  13. data/cockpit/themes/compact/rngs/parallel.rng +2 -2
  14. data/cockpit/themes/compact/rngs/start.rng +3 -3
  15. data/cockpit/themes/compact/theme.js +10 -0
  16. data/cockpit/themes/control/rngs/call.rng +3 -3
  17. data/cockpit/themes/control/rngs/callmanipulate.rng +3 -3
  18. data/cockpit/themes/control/rngs/parallel.rng +2 -2
  19. data/cockpit/themes/control/rngs/start.rng +3 -3
  20. data/cockpit/themes/control/theme.js +10 -0
  21. data/cockpit/themes/dataflow/rngs/call.rng +3 -3
  22. data/cockpit/themes/dataflow/rngs/callmanipulate.rng +3 -3
  23. data/cockpit/themes/dataflow/rngs/parallel.rng +2 -2
  24. data/cockpit/themes/dataflow/rngs/start.rng +3 -3
  25. data/cockpit/themes/dataflow/theme.js +13 -3
  26. data/cockpit/themes/default/rngs/call.rng +3 -3
  27. data/cockpit/themes/default/rngs/callmanipulate.rng +3 -3
  28. data/cockpit/themes/default/rngs/parallel.rng +2 -2
  29. data/cockpit/themes/default/rngs/start.rng +3 -3
  30. data/cockpit/themes/default/theme.js +11 -0
  31. data/cockpit/themes/extended/rngs/call.rng +3 -3
  32. data/cockpit/themes/extended/rngs/callmanipulate.rng +3 -3
  33. data/cockpit/themes/extended/rngs/parallel.rng +2 -2
  34. data/cockpit/themes/extended/rngs/start.rng +3 -3
  35. data/cockpit/themes/extended/theme.js +11 -0
  36. data/cockpit/themes/felix/rngs/alternative.rng +25 -0
  37. data/cockpit/themes/felix/rngs/call.rng +229 -0
  38. data/cockpit/themes/felix/rngs/callmanipulate.rng +259 -0
  39. data/cockpit/themes/felix/rngs/choose.rng +14 -0
  40. data/cockpit/themes/felix/rngs/closed_loop.rng +62 -0
  41. data/cockpit/themes/felix/rngs/closed_loop_cancel.rng +5 -0
  42. data/cockpit/themes/felix/rngs/closed_loop_control.rng +31 -0
  43. data/cockpit/themes/felix/rngs/closed_loop_measuring.rng +12 -0
  44. data/cockpit/themes/felix/rngs/critical.rng +5 -0
  45. data/cockpit/themes/felix/rngs/escape.rng +1 -0
  46. data/cockpit/themes/felix/rngs/group.rng +3 -0
  47. data/cockpit/themes/felix/rngs/loop.rng +22 -0
  48. data/cockpit/themes/felix/rngs/manipulate.rng +20 -0
  49. data/cockpit/themes/felix/rngs/otherwise.rng +22 -0
  50. data/cockpit/themes/felix/rngs/parallel.rng +27 -0
  51. data/cockpit/themes/felix/rngs/parallel_branch.rng +2 -0
  52. data/cockpit/themes/felix/rngs/scripts.rng +23 -0
  53. data/cockpit/themes/felix/rngs/start.rng +121 -0
  54. data/cockpit/themes/felix/rngs/stop.rng +5 -0
  55. data/cockpit/themes/felix/rngs/terminate.rng +1 -0
  56. data/cockpit/themes/felix/symbols/alternative.svg +5 -0
  57. data/cockpit/themes/felix/symbols/arrow.svg +3 -0
  58. data/cockpit/themes/felix/symbols/call.svg +6 -0
  59. data/cockpit/themes/felix/symbols/call_sensor.svg +9 -0
  60. data/cockpit/themes/felix/symbols/callmanipulate.svg +8 -0
  61. data/cockpit/themes/felix/symbols/callmanipulate_sensor.svg +11 -0
  62. data/cockpit/themes/felix/symbols/choose.svg +5 -0
  63. data/cockpit/themes/felix/symbols/choose_exclusive.svg +5 -0
  64. data/cockpit/themes/felix/symbols/choose_inclusive.svg +4 -0
  65. data/cockpit/themes/felix/symbols/closed_loop.svg +5 -0
  66. data/cockpit/themes/felix/symbols/closed_loop_cancel.svg +5 -0
  67. data/cockpit/themes/felix/symbols/closed_loop_control.svg +5 -0
  68. data/cockpit/themes/felix/symbols/closed_loop_measuring.svg +6 -0
  69. data/cockpit/themes/felix/symbols/complex.svg +8 -0
  70. data/cockpit/themes/felix/symbols/critical.svg +4 -0
  71. data/cockpit/themes/felix/symbols/delete.svg +4 -0
  72. data/cockpit/themes/felix/symbols/end.svg +3 -0
  73. data/cockpit/themes/felix/symbols/escape.svg +5 -0
  74. data/cockpit/themes/felix/symbols/event_end.svg +3 -0
  75. data/cockpit/themes/felix/symbols/loop.svg +5 -0
  76. data/cockpit/themes/felix/symbols/manipulate.svg +4 -0
  77. data/cockpit/themes/felix/symbols/otherwise.svg +5 -0
  78. data/cockpit/themes/felix/symbols/parallel.svg +5 -0
  79. data/cockpit/themes/felix/symbols/parallel_branch.svg +5 -0
  80. data/cockpit/themes/felix/symbols/parallel_branch_compact.svg +4 -0
  81. data/cockpit/themes/felix/symbols/parallel_branch_event.svg +14 -0
  82. data/cockpit/themes/felix/symbols/parallel_branch_normal.svg +5 -0
  83. data/cockpit/themes/felix/symbols/parallel_eventbased_exclusive.svg +9 -0
  84. data/cockpit/themes/felix/symbols/parallel_eventbased_parallel.svg +8 -0
  85. data/cockpit/themes/felix/symbols/scripts.svg +4 -0
  86. data/cockpit/themes/felix/symbols/start.svg +3 -0
  87. data/cockpit/themes/felix/symbols/start_event.svg +5 -0
  88. data/cockpit/themes/felix/symbols/stop.svg +5 -0
  89. data/cockpit/themes/felix/symbols/terminate.svg +4 -0
  90. data/cockpit/themes/felix/theme.js +1526 -0
  91. data/cockpit/themes/model/rngs/call.rng +10 -10
  92. data/cockpit/themes/model/rngs/callmanipulate.rng +10 -10
  93. data/cockpit/themes/model/theme.js +10 -0
  94. data/cockpit/themes/packed/rngs/call.rng +3 -3
  95. data/cockpit/themes/packed/rngs/callmanipulate.rng +3 -3
  96. data/cockpit/themes/packed/rngs/parallel.rng +2 -2
  97. data/cockpit/themes/packed/rngs/start.rng +3 -3
  98. data/cockpit/themes/packed/theme.js +10 -0
  99. data/cockpit/themes/preset/rngs/call.rng +3 -3
  100. data/cockpit/themes/preset/rngs/callmanipulate.rng +3 -3
  101. data/cockpit/themes/preset/rngs/parallel.rng +2 -2
  102. data/cockpit/themes/preset/rngs/start.rng +3 -3
  103. data/cockpit/themes/preset/theme.js +11 -0
  104. data/cpee.gemspec +1 -1
  105. data/lib/cpee/implementation.rb +1 -1
  106. data/lib/cpee/implementation_properties.rb +23 -13
  107. data/lib/properties/state.rng +0 -2
  108. data/lib/properties.xml +0 -1
  109. data/server/executionhandlers/ruby/connection.rb +25 -16
  110. data/server/executionhandlers/ruby/controller.rb +1 -1
  111. data/server/executionhandlers/ruby/dsl_to_dslx.xsl +71 -61
  112. data/server/resources/states.dot +0 -4
  113. data/server/resources/states.xml +0 -6
  114. metadata +57 -16
  115. data/cockpit/css/replay.css +0 -55
  116. data/cockpit/js/replay.js +0 -40
  117. data/cockpit/replay.html +0 -53
  118. data/cockpit/themes/compact/symbols/test.svg +0 -74
  119. data/cockpit/themes/control/symbols/test.svg +0 -74
  120. data/cockpit/themes/dataflow/symbols/test.svg +0 -74
  121. data/cockpit/themes/default/symbols/test.svg +0 -74
  122. data/cockpit/themes/extended/symbols/test.svg +0 -74
  123. data/cockpit/themes/model/symbols/test.svg +0 -74
  124. data/cockpit/themes/packed/symbols/test.svg +0 -74
  125. data/cockpit/themes/preset/symbols/test.svg +0 -74
  126. data/server/executionhandlers/ruby/desc.xml +0 -107
  127. data/server/resources/test.pdf +0 -0
  128. 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 id="machine">Machine Invocation</value>
8
- <value id="sensor">Read From Sensor</value>
9
- <value id="human">Human Task</value>
10
- <value id="subprocess">Subprocess</value>
11
- <value id="robot">Robot Task</value>
12
- <value id="robot_subprocess">Robot Subprocess</value>
13
- <value id="plc">PLC</value>
14
- <value id="send">Send Message</value>
15
- <value id="receive">Receive Message</value>
16
- <value id="wait">Wait</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 id="machine">Machine Invocation</value>
8
- <value id="sensor">Read From Sensor</value>
9
- <value id="human">Human Task</value>
10
- <value id="subprocess">Subprocess</value>
11
- <value id="robot">Robot Task</value>
12
- <value id="robot_subprocess">Robot Subprocess</value>
13
- <value id="plc">PLC</value>
14
- <value id="send">Send Message</value>
15
- <value id="receive">Receive Message</value>
16
- <value id="wait">Wait</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 id='intrinsic'>Intrinsic</value>
102
- <value id='extrinsic'>Extrinsic</value>
103
- <value id='separate'>Separate</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 &amp; extrinsic data'>
@@ -122,9 +122,9 @@
122
122
  </element>
123
123
  <element name="extractor_type" rngui:label="Extractor Type">
124
124
  <choice>
125
- <value id='intrinsic'>Intrinsic</value>
126
- <value id='extrinsic'>Extrinsic</value>
127
- <value id='separate'>Separate</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 &amp; 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 id='last'>After Last Task in Branch</value>
8
- <value id='first'>After First Task in Branch (Event-Based Gateway)</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 id='intrinsic'>Intrinsic</value>
33
- <value id='extrinsic'>Extrinsic</value>
34
- <value id='separate'>Separate</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 &amp; 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 id='intrinsic'>Intrinsic</value>
102
- <value id='extrinsic'>Extrinsic</value>
103
- <value id='separate'>Separate</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 &amp; extrinsic data'>
@@ -122,9 +122,9 @@
122
122
  </element>
123
123
  <element name="extractor_type" rngui:label="Extractor Type">
124
124
  <choice>
125
- <value id='intrinsic'>Intrinsic</value>
126
- <value id='extrinsic'>Extrinsic</value>
127
- <value id='separate'>Separate</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 &amp; 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 id='last'>After Last Task in Branch</value>
8
- <value id='first'>After First Task in Branch (Event-Based Gateway)</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 id='intrinsic'>Intrinsic</value>
33
- <value id='extrinsic'>Extrinsic</value>
34
- <value id='separate'>Separate</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 &amp; 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.52"
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."
@@ -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 replaying finishing stopping abandoned finished} do |id|
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
- doc.find('/p:properties/p:description').first.add XML::Smart::string(val).root rescue nil
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.register_namespace 'p', 'http://cpee.org/ns/description/1.0'
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).root
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).root
689
+ desc.transform_with(trans)
680
690
  elsif tdesctype == 'clean'
681
- XML::Smart::open_unprotected(opts[:empty_dslx]).root
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,@opts[:transformation_service])
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,@opts[:transformation_service])
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")
@@ -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>
@@ -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
- p err.message
46
- p err.backtrace
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, replay=false) #{{{
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-REPLAY",@controller.attributes['replayer_target']) if @controller.attributes[:replayer] && @controller.attributes['replayer_target']
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
- p.value = a if p.name == k
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
 
@@ -75,7 +75,7 @@ class Controller
75
75
  end
76
76
  end
77
77
  @callback_keys[identifier].send(:callback,resp,m['content']['headers'])
78
- end
78
+ end
79
79
  end
80
80
  if pat == 'callback-end:*'
81
81
  _, worker, identifier = what.split(':')
@@ -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="count(preceding-sibling::*) &gt; 0">, </xsl:if>
598
- <xsl:text>⭐(</xsl:text>
599
- <xsl:text>:name =&gt; :</xsl:text>
600
- <xsl:choose>
601
- <xsl:when test="substring(name(),1,1) = '_'">
602
- <xsl:call-template name="format-name">
603
- <xsl:with-param name="tname">
604
- <xsl:value-of select="substring(name(),2)"/>
605
- </xsl:with-param>
606
- </xsl:call-template>
607
- </xsl:when>
608
- <xsl:otherwise>
609
- <xsl:call-template name="format-name">
610
- <xsl:with-param name="tname">
611
- <xsl:value-of select="name()"/>
612
- </xsl:with-param>
613
- </xsl:call-template>
614
- </xsl:otherwise>
615
- </xsl:choose>
616
- <xsl:text>, :value =&gt; -&gt;{ </xsl:text>
617
- <xsl:choose>
618
- <xsl:when test="not(node())">
619
- <xsl:text>nil</xsl:text>
620
- </xsl:when>
621
- <xsl:when test="child::node()[not(self::text())]">
622
- <!-- FUUUU, there is probably much more TODO. Updated Matthias und Juergen, we tested for ing-opcua/execute -->
623
- <xsl:choose>
624
- <xsl:when test="child::* and name(child::*)=concat(name(.),'_item') and count(child::*[not(name()=name(../child::*[1]))])=0">
625
- <xsl:text>"[ </xsl:text>
626
- <xsl:apply-templates select="*" mode="JSONArrayItem"/>
627
- <xsl:text>]"</xsl:text>
628
- </xsl:when>
629
- <xsl:otherwise>
630
- <xsl:text>"{ </xsl:text>
631
- <xsl:apply-templates select="*" mode="JSONSUB"/>
632
- <xsl:text>}"</xsl:text>
633
- </xsl:otherwise>
634
- </xsl:choose>
635
- </xsl:when>
636
- <xsl:otherwise>
637
- <xsl:choose>
638
- <xsl:when test="substring(text(),1,1) = '!'">
639
- <xsl:value-of select="substring(text(),2)"/>
640
- </xsl:when>
641
- <xsl:otherwise>
642
- <xsl:text>"</xsl:text>
643
- <xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'&quot;','\&quot;')"/>
644
- <xsl:text>"</xsl:text>
645
- </xsl:otherwise>
646
- </xsl:choose>
647
- </xsl:otherwise>
648
- </xsl:choose>
649
- <xsl:text> }</xsl:text>
650
- <xsl:for-each select="@*">
651
- <xsl:text>, :</xsl:text>
652
- <xsl:value-of select="name()"/>
653
- <xsl:text> =&gt; "</xsl:text>
654
- <xsl:value-of select="string(.)"/>
655
- <xsl:text>"</xsl:text>
656
- </xsl:for-each>
657
- <xsl:text>)</xsl:text>
605
+ <xsl:if test="not(@rngui-nonfunctional)">
606
+ <xsl:if test="count(preceding-sibling::*[not(@rngui-nonfunctional)]) &gt; 0">, </xsl:if>
607
+ <xsl:text>⭐(</xsl:text>
608
+ <xsl:text>:name =&gt; :</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 =&gt; -&gt;{ </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(),'\','\\'),'&quot;','\&quot;')"/>
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> =&gt; "</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">