cpee 2.1.135 → 2.1.139

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 (206) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/cockpit/compliance-view.html +11 -19
  4. data/cockpit/compliance.html +11 -19
  5. data/cockpit/css/llm.css +3 -3
  6. data/cockpit/css/llmmodel.css +140 -0
  7. data/cockpit/css/model.css +0 -1
  8. data/cockpit/css/ui.css +13 -7
  9. data/cockpit/css/wfadaptor.css +15 -10
  10. data/cockpit/edit.html +11 -19
  11. data/cockpit/graph.html +8 -13
  12. data/cockpit/index.html +11 -19
  13. data/cockpit/js/details.js +27 -10
  14. data/cockpit/js/instance.js +219 -206
  15. data/cockpit/js/llm-ui-bubble.js +36 -0
  16. data/cockpit/js/llm-ui-status.js +34 -0
  17. data/cockpit/js/llm-ui.js +87 -0
  18. data/cockpit/js/llm.js +469 -121
  19. data/cockpit/js/parameters.js +45 -14
  20. data/cockpit/js/wfadaptor.js +402 -77
  21. data/cockpit/llm.html +16 -21
  22. data/cockpit/llmmodel.html +17 -23
  23. data/cockpit/model.html +8 -15
  24. data/cockpit/only_llm.html +14 -19
  25. data/cockpit/themes/THEMES.MD +4 -0
  26. data/cockpit/themes/base.js +1 -1
  27. data/cockpit/themes/packed/theme.js +3 -0
  28. data/cockpit/themes/presetlr/rngs/alternative.rng +28 -0
  29. data/cockpit/themes/presetlr/rngs/call.rng +249 -0
  30. data/cockpit/themes/presetlr/rngs/callmanipulate.rng +281 -0
  31. data/cockpit/themes/presetlr/rngs/choose.rng +27 -0
  32. data/cockpit/themes/presetlr/rngs/closed_loop.rng +62 -0
  33. data/cockpit/themes/presetlr/rngs/closed_loop_cancel.rng +5 -0
  34. data/cockpit/themes/presetlr/rngs/closed_loop_control.rng +31 -0
  35. data/cockpit/themes/presetlr/rngs/closed_loop_measuring.rng +12 -0
  36. data/cockpit/themes/presetlr/rngs/critical.rng +8 -0
  37. data/cockpit/themes/presetlr/rngs/escape.rng +5 -0
  38. data/cockpit/themes/presetlr/rngs/group.rng +3 -0
  39. data/cockpit/themes/presetlr/rngs/loop.rng +40 -0
  40. data/cockpit/themes/presetlr/rngs/manipulate.rng +76 -0
  41. data/cockpit/themes/presetlr/rngs/otherwise.rng +25 -0
  42. data/cockpit/themes/presetlr/rngs/parallel.rng +24 -0
  43. data/cockpit/themes/presetlr/rngs/parallel_branch.rng +5 -0
  44. data/cockpit/themes/presetlr/rngs/scripts.rng +23 -0
  45. data/cockpit/themes/presetlr/rngs/start.rng +143 -0
  46. data/cockpit/themes/presetlr/rngs/stop.rng +5 -0
  47. data/cockpit/themes/presetlr/rngs/terminate.rng +8 -0
  48. data/cockpit/themes/presetlr/rngs/wait_for_signal.rng +8 -0
  49. data/cockpit/themes/presetlr/symbols/alternative.svg +19 -0
  50. data/cockpit/themes/presetlr/symbols/arrow.svg +1 -0
  51. data/cockpit/themes/presetlr/symbols/call.svg +1 -0
  52. data/cockpit/themes/presetlr/symbols/call_sensor.svg +1 -0
  53. data/cockpit/themes/presetlr/symbols/callmanipulate.svg +1 -0
  54. data/cockpit/themes/presetlr/symbols/callmanipulate_sensor.svg +1 -0
  55. data/cockpit/themes/presetlr/symbols/callmanipulate_sensor_signal.svg +1 -0
  56. data/cockpit/themes/presetlr/symbols/callmanipulate_signal.svg +1 -0
  57. data/cockpit/themes/presetlr/symbols/choose.svg +15 -0
  58. data/cockpit/themes/presetlr/symbols/choose_exclusive.svg +15 -0
  59. data/cockpit/themes/presetlr/symbols/choose_exclusive_finish.svg +1 -0
  60. data/cockpit/themes/presetlr/symbols/choose_inclusive.svg +13 -0
  61. data/cockpit/themes/presetlr/symbols/choose_inclusive_finish.svg +1 -0
  62. data/cockpit/themes/presetlr/symbols/closed_loop.svg +1 -0
  63. data/cockpit/themes/presetlr/symbols/closed_loop_cancel.svg +1 -0
  64. data/cockpit/themes/presetlr/symbols/closed_loop_control.svg +1 -0
  65. data/cockpit/themes/presetlr/symbols/closed_loop_measuring.svg +1 -0
  66. data/cockpit/themes/presetlr/symbols/complex.svg +1 -0
  67. data/cockpit/themes/presetlr/symbols/critical.svg +1 -0
  68. data/cockpit/themes/presetlr/symbols/delete.svg +1 -0
  69. data/cockpit/themes/presetlr/symbols/end.svg +1 -0
  70. data/cockpit/themes/presetlr/symbols/escape.svg +1 -0
  71. data/cockpit/themes/presetlr/symbols/event_end.svg +1 -0
  72. data/cockpit/themes/presetlr/symbols/event_start.svg +1 -0
  73. data/cockpit/themes/presetlr/symbols/loop.svg +15 -0
  74. data/cockpit/themes/presetlr/symbols/loop_end.svg +15 -0
  75. data/cockpit/themes/presetlr/symbols/loop_end_pre.svg +15 -0
  76. data/cockpit/themes/presetlr/symbols/manipulate.svg +1 -0
  77. data/cockpit/themes/presetlr/symbols/mark.svg +1 -0
  78. data/cockpit/themes/presetlr/symbols/otherwise.svg +7 -0
  79. data/cockpit/themes/presetlr/symbols/parallel.svg +1 -0
  80. data/cockpit/themes/presetlr/symbols/parallel_branch.svg +7 -0
  81. data/cockpit/themes/presetlr/symbols/parallel_branch_event.svg +14 -0
  82. data/cockpit/themes/presetlr/symbols/parallel_branch_event_rev.svg +11 -0
  83. data/cockpit/themes/presetlr/symbols/parallel_branch_normal.svg +7 -0
  84. data/cockpit/themes/presetlr/symbols/parallel_eventbased_exclusive.svg +1 -0
  85. data/cockpit/themes/presetlr/symbols/parallel_eventbased_parallel.svg +1 -0
  86. data/cockpit/themes/presetlr/symbols/scripts.svg +1 -0
  87. data/cockpit/themes/presetlr/symbols/start.svg +1 -0
  88. data/cockpit/themes/presetlr/symbols/start_event.svg +1 -0
  89. data/cockpit/themes/presetlr/symbols/stop.svg +1 -0
  90. data/cockpit/themes/presetlr/symbols/terminate.svg +1 -0
  91. data/cockpit/themes/presetlr/symbols/wait_for_signal.svg +1 -0
  92. data/cockpit/themes/presetlr/theme.js +54 -0
  93. data/cockpit/themes/wellformed/rngs/alternative.rng +28 -0
  94. data/cockpit/themes/wellformed/rngs/call.rng +249 -0
  95. data/cockpit/themes/wellformed/rngs/callmanipulate.rng +281 -0
  96. data/cockpit/themes/wellformed/rngs/choose.rng +27 -0
  97. data/cockpit/themes/wellformed/rngs/closed_loop.rng +62 -0
  98. data/cockpit/themes/wellformed/rngs/closed_loop_cancel.rng +5 -0
  99. data/cockpit/themes/wellformed/rngs/closed_loop_control.rng +31 -0
  100. data/cockpit/themes/wellformed/rngs/closed_loop_measuring.rng +12 -0
  101. data/cockpit/themes/wellformed/rngs/critical.rng +8 -0
  102. data/cockpit/themes/wellformed/rngs/escape.rng +5 -0
  103. data/cockpit/themes/wellformed/rngs/group.rng +3 -0
  104. data/cockpit/themes/wellformed/rngs/loop.rng +40 -0
  105. data/cockpit/themes/wellformed/rngs/manipulate.rng +76 -0
  106. data/cockpit/themes/wellformed/rngs/otherwise.rng +25 -0
  107. data/cockpit/themes/wellformed/rngs/parallel.rng +24 -0
  108. data/cockpit/themes/wellformed/rngs/parallel_branch.rng +5 -0
  109. data/cockpit/themes/wellformed/rngs/scripts.rng +23 -0
  110. data/cockpit/themes/wellformed/rngs/start.rng +143 -0
  111. data/cockpit/themes/wellformed/rngs/stop.rng +5 -0
  112. data/cockpit/themes/wellformed/rngs/terminate.rng +8 -0
  113. data/cockpit/themes/wellformed/rngs/wait_for_signal.rng +8 -0
  114. data/cockpit/themes/wellformed/symbols/alternative.svg +1 -0
  115. data/cockpit/themes/wellformed/symbols/arrow.svg +1 -0
  116. data/cockpit/themes/wellformed/symbols/call.svg +1 -0
  117. data/cockpit/themes/wellformed/symbols/call_sensor.svg +1 -0
  118. data/cockpit/themes/wellformed/symbols/callmanipulate.svg +1 -0
  119. data/cockpit/themes/wellformed/symbols/callmanipulate_sensor.svg +1 -0
  120. data/cockpit/themes/wellformed/symbols/callmanipulate_sensor_signal.svg +1 -0
  121. data/cockpit/themes/wellformed/symbols/callmanipulate_signal.svg +1 -0
  122. data/cockpit/themes/wellformed/symbols/choose.svg +1 -0
  123. data/cockpit/themes/wellformed/symbols/choose_exclusive.svg +1 -0
  124. data/cockpit/themes/wellformed/symbols/choose_exclusive_finish.svg +1 -0
  125. data/cockpit/themes/wellformed/symbols/choose_inclusive.svg +1 -0
  126. data/cockpit/themes/wellformed/symbols/choose_inclusive_finish.svg +1 -0
  127. data/cockpit/themes/wellformed/symbols/closed_loop.svg +1 -0
  128. data/cockpit/themes/wellformed/symbols/closed_loop_cancel.svg +1 -0
  129. data/cockpit/themes/wellformed/symbols/closed_loop_control.svg +1 -0
  130. data/cockpit/themes/wellformed/symbols/closed_loop_measuring.svg +1 -0
  131. data/cockpit/themes/wellformed/symbols/complex.svg +1 -0
  132. data/cockpit/themes/wellformed/symbols/critical.svg +1 -0
  133. data/cockpit/themes/wellformed/symbols/delete.svg +1 -0
  134. data/cockpit/themes/wellformed/symbols/end.svg +1 -0
  135. data/cockpit/themes/wellformed/symbols/escape.svg +1 -0
  136. data/cockpit/themes/wellformed/symbols/event_end.svg +1 -0
  137. data/cockpit/themes/wellformed/symbols/event_start.svg +6 -0
  138. data/cockpit/themes/wellformed/symbols/loop.svg +1 -0
  139. data/cockpit/themes/wellformed/symbols/loop_end.svg +1 -0
  140. data/cockpit/themes/wellformed/symbols/manipulate.svg +1 -0
  141. data/cockpit/themes/wellformed/symbols/mark.svg +1 -0
  142. data/cockpit/themes/wellformed/symbols/otherwise.svg +1 -0
  143. data/cockpit/themes/wellformed/symbols/parallel.svg +1 -0
  144. data/cockpit/themes/wellformed/symbols/parallel_branch.svg +1 -0
  145. data/cockpit/themes/wellformed/symbols/parallel_branch_event.svg +1 -0
  146. data/cockpit/themes/wellformed/symbols/parallel_branch_event_rev.svg +11 -0
  147. data/cockpit/themes/wellformed/symbols/parallel_branch_normal.svg +1 -0
  148. data/cockpit/themes/wellformed/symbols/parallel_eventbased_exclusive.svg +1 -0
  149. data/cockpit/themes/wellformed/symbols/parallel_eventbased_parallel.svg +1 -0
  150. data/cockpit/themes/wellformed/symbols/scripts.svg +1 -0
  151. data/cockpit/themes/wellformed/symbols/start.svg +1 -0
  152. data/cockpit/themes/wellformed/symbols/start_event.svg +1 -0
  153. data/cockpit/themes/wellformed/symbols/stop.svg +1 -0
  154. data/cockpit/themes/wellformed/symbols/terminate.svg +1 -0
  155. data/cockpit/themes/wellformed/symbols/wait_for_signal.svg +1 -0
  156. data/cockpit/themes/wellformed/theme.js +32 -0
  157. data/cockpit/track.html +8 -13
  158. data/cpee.gemspec +3 -3
  159. data/lib/callbacks/callbacks.rng +4 -4
  160. data/lib/callbacks.xml +4 -4
  161. data/lib/cpee/constants.rb +4 -4
  162. data/lib/cpee/fail.rb +4 -4
  163. data/lib/cpee/implementation.rb +10 -4
  164. data/lib/cpee/implementation_callbacks.rb +6 -6
  165. data/lib/cpee/implementation_notifications.rb +8 -5
  166. data/lib/cpee/implementation_properties.rb +132 -12
  167. data/lib/cpee/json_pointer.rb +110 -0
  168. data/lib/cpee/message.rb +26 -6
  169. data/lib/cpee/persistence.rb +10 -4
  170. data/lib/cpee/redis.rb +12 -4
  171. data/lib/cpee/statemachine.rb +4 -4
  172. data/lib/cpee/value_helper.rb +4 -4
  173. data/lib/cpee.xml +4 -4
  174. data/lib/engine/executionhandler-list.rng +4 -4
  175. data/lib/engine/instance-info.rng +4 -4
  176. data/lib/engine/instances.rng +4 -4
  177. data/lib/engine.xml +4 -4
  178. data/lib/properties/t_dslx.rng +356 -0
  179. data/lib/properties/transformation.rng +14 -0
  180. data/lib/properties.xml +5 -4
  181. data/server/executionhandlers/eval/backend/opts.yaml +1 -1
  182. data/server/executionhandlers/eval/connection.rb +16 -7
  183. data/server/executionhandlers/eval/execution.rb +4 -4
  184. data/server/executionhandlers/ruby/backend/opts.yaml +1 -1
  185. data/server/executionhandlers/ruby/connection.rb +17 -9
  186. data/server/executionhandlers/ruby/controller.rb +21 -6
  187. data/server/executionhandlers/ruby/dsl_to_dslx.xsl +6 -2
  188. data/server/executionhandlers/ruby/execution.rb +4 -4
  189. data/server/resources/properties.empty +5 -4
  190. data/server/resources/properties.init +5 -4
  191. data/server/resources/topics.xml +4 -4
  192. data/server/routing/end.pid +1 -1
  193. data/server/routing/end.rb +4 -4
  194. data/server/routing/forward-events-00.pid +1 -1
  195. data/server/routing/forward-events.rb +34 -23
  196. data/server/routing/forward-votes.pid +1 -1
  197. data/server/routing/forward-votes.rb +60 -47
  198. data/server/routing/persist.pid +1 -1
  199. data/server/routing/persist.rb +53 -30
  200. data/tools/server/cpee +1 -1
  201. data/tools/server/resources/properties.init +4 -4
  202. metadata +142 -5
  203. data/cockpit/CPEE.xml +0 -8
  204. data/cockpit/Signavio.xml +0 -8
  205. data/cockpit/transformations.xml +0 -4
  206. /data/{COPYING → LICENSE} +0 -0
@@ -2,15 +2,15 @@
2
2
  This file is part of CPEE.
3
3
 
4
4
  CPEE is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
5
+ of the GNU Lesser General Public License as published by the Free Software Foundation,
6
6
  either version 3 of the License, or (at your option) any later version.
7
7
 
8
8
  CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
9
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
11
11
 
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE (file COPYING in the main directory). If not, see
12
+ You should have received a copy of the GNU Lesser General Public License along with
13
+ CPEE (file LICENSE in the main directory). If not, see
14
14
  <http://www.gnu.org/licenses/>.
15
15
  -->
16
16
 
@@ -2,15 +2,15 @@
2
2
  This file is part of CPEE.
3
3
 
4
4
  CPEE is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
5
+ of the GNU Lesser General Public License as published by the Free Software Foundation,
6
6
  either version 3 of the License, or (at your option) any later version.
7
7
 
8
8
  CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
9
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
11
11
 
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE (file COPYING in the main directory). If not, see
12
+ You should have received a copy of the GNU Lesser General Public License along with
13
+ CPEE (file LICENSE in the main directory). If not, see
14
14
  <http://www.gnu.org/licenses/>.
15
15
  -->
16
16
 
@@ -2,15 +2,15 @@
2
2
  This file is part of CPEE.
3
3
 
4
4
  CPEE is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
5
+ of the GNU Lesser General Public License as published by the Free Software Foundation,
6
6
  either version 3 of the License, or (at your option) any later version.
7
7
 
8
8
  CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
9
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
11
11
 
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE (file COPYING in the main directory). If not, see
12
+ You should have received a copy of the GNU Lesser General Public License along with
13
+ CPEE (file LICENSE in the main directory). If not, see
14
14
  <http://www.gnu.org/licenses/>.
15
15
  -->
16
16
 
data/lib/engine.xml CHANGED
@@ -2,15 +2,15 @@
2
2
  This file is part of CPEE.
3
3
 
4
4
  CPEE is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
5
+ of the GNU Lesser General Public License as published by the Free Software Foundation,
6
6
  either version 3 of the License, or (at your option) any later version.
7
7
 
8
8
  CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
9
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
11
11
 
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE (file COPYING in the main directory). If not, see
12
+ You should have received a copy of the GNU Lesser General Public License along with
13
+ CPEE (file LICENSE in the main directory). If not, see
14
14
  <http://www.gnu.org/licenses/>.
15
15
  -->
16
16
 
@@ -0,0 +1,356 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <!-- intentionally loose: the constructs, their attributes and where they may
3
+ occur are checked. all other elements (annotations, documentation,
4
+ _probability, ...) and attributes from other namespaces are passed
5
+ through. -->
6
+ <include href="arbitrary.rng"/>
7
+
8
+ <start>
9
+ <element name="description">
10
+ <optional> <!-- layout direction of the theme, e.g. for the bpmn export -->
11
+ <attribute name="dir">
12
+ <choice>
13
+ <value>td</value>
14
+ <value>lr</value>
15
+ </choice>
16
+ </attribute>
17
+ </optional>
18
+ <zeroOrMore>
19
+ <attribute><anyName><except><name ns="">dir</name></except></anyName></attribute>
20
+ </zeroOrMore>
21
+ <ref name="dslx_block"/>
22
+ </element>
23
+ </start>
24
+
25
+ <define name="dslx_attributes">
26
+ <zeroOrMore>
27
+ <attribute><anyName/></attribute>
28
+ </zeroOrMore>
29
+ </define>
30
+ <!-- attributes of constructs are explicit, only other namespaces are free -->
31
+ <define name="dslx_foreign_attributes">
32
+ <zeroOrMore>
33
+ <attribute><anyName><except><nsName ns=""/></except></anyName></attribute>
34
+ </zeroOrMore>
35
+ </define>
36
+ <define name="dslx_eid">
37
+ <optional><attribute name="eid"/></optional>
38
+ </define>
39
+ <define name="dslx_language">
40
+ <optional><attribute name="language"/></optional>
41
+ </define>
42
+
43
+ <!-- everything that is not a construct -->
44
+ <define name="dslx_extra">
45
+ <element>
46
+ <anyName>
47
+ <except>
48
+ <name>call</name>
49
+ <name>manipulate</name>
50
+ <name>stop</name>
51
+ <name>terminate</name>
52
+ <name>escape</name>
53
+ <name>wait_for_signal</name>
54
+ <name>parallel</name>
55
+ <name>parallel_branch</name>
56
+ <name>loop</name>
57
+ <name>choose</name>
58
+ <name>alternative</name>
59
+ <name>otherwise</name>
60
+ <name>critical</name>
61
+ <name>group</name>
62
+ <name>closed_loop</name>
63
+ <name>closed_loop_measuring</name>
64
+ <name>closed_loop_control</name>
65
+ <name>closed_loop_cancel</name>
66
+ </except>
67
+ </anyName>
68
+ <ref name="dslx_attributes"/>
69
+ <ref name="arbitrary"/>
70
+ </element>
71
+ </define>
72
+
73
+ <define name="dslx_block">
74
+ <zeroOrMore>
75
+ <choice>
76
+ <ref name="dslx_call"/>
77
+ <ref name="dslx_manipulate"/>
78
+ <ref name="dslx_stop"/>
79
+ <ref name="dslx_terminate"/>
80
+ <ref name="dslx_escape"/>
81
+ <ref name="dslx_wait_for_signal"/>
82
+ <ref name="dslx_parallel"/>
83
+ <ref name="dslx_parallel_branch"/> <!-- not only directly in parallel, e.g. parallel > loop > parallel_branch -->
84
+ <ref name="dslx_loop"/>
85
+ <ref name="dslx_choose"/>
86
+ <ref name="dslx_critical"/>
87
+ <ref name="dslx_group"/>
88
+ <ref name="dslx_closed_loop"/>
89
+ <ref name="dslx_extra"/>
90
+ </choice>
91
+ </zeroOrMore>
92
+ </define>
93
+
94
+ <!-- tasks -->
95
+ <define name="dslx_call">
96
+ <element name="call">
97
+ <attribute name="id"/>
98
+ <optional><attribute name="endpoint"/></optional>
99
+ <ref name="dslx_foreign_attributes"/>
100
+ <interleave>
101
+ <element name="parameters">
102
+ <ref name="dslx_attributes"/>
103
+ <interleave>
104
+ <element name="label"><ref name="dslx_attributes"/><text/></element>
105
+ <optional><element name="color"><ref name="dslx_attributes"/><text/></element></optional>
106
+ <optional><element name="method"><ref name="dslx_attributes"/><text/></element></optional>
107
+ <optional>
108
+ <element name="arguments">
109
+ <ref name="dslx_attributes"/>
110
+ <zeroOrMore><ref name="any"/></zeroOrMore>
111
+ </element>
112
+ </optional>
113
+ <zeroOrMore>
114
+ <element>
115
+ <anyName>
116
+ <except>
117
+ <name>label</name>
118
+ <name>color</name>
119
+ <name>method</name>
120
+ <name>arguments</name>
121
+ </except>
122
+ </anyName>
123
+ <ref name="dslx_attributes"/>
124
+ <ref name="arbitrary"/>
125
+ </element>
126
+ </zeroOrMore>
127
+ </interleave>
128
+ </element>
129
+ <optional>
130
+ <element name="code">
131
+ <ref name="dslx_attributes"/>
132
+ <interleave>
133
+ <optional><element name="prepare"><ref name="dslx_script_attributes"/><text/></element></optional>
134
+ <optional><element name="finalize"><ref name="dslx_script_attributes"/><text/></element></optional>
135
+ <optional><element name="update"><ref name="dslx_script_attributes"/><text/></element></optional>
136
+ <optional><element name="rescue"><ref name="dslx_script_attributes"/><text/></element></optional>
137
+ <optional><element name="signal"><text/></element></optional>
138
+ </interleave>
139
+ </element>
140
+ </optional>
141
+ <zeroOrMore>
142
+ <element>
143
+ <anyName>
144
+ <except>
145
+ <name>parameters</name>
146
+ <name>code</name>
147
+ <!-- old style, without surrounding code element, not allowed -->
148
+ <name>prepare</name>
149
+ <name>finalize</name>
150
+ <name>update</name>
151
+ <name>rescue</name>
152
+ </except>
153
+ </anyName>
154
+ <ref name="dslx_attributes"/>
155
+ <ref name="arbitrary"/>
156
+ </element>
157
+ </zeroOrMore>
158
+ </interleave>
159
+ </element>
160
+ </define>
161
+
162
+ <define name="dslx_script_attributes">
163
+ <optional><attribute name="output"/></optional>
164
+ <ref name="dslx_language"/>
165
+ <ref name="dslx_foreign_attributes"/>
166
+ </define>
167
+
168
+ <define name="dslx_manipulate">
169
+ <element name="manipulate">
170
+ <attribute name="id"/>
171
+ <attribute name="label"/>
172
+ <optional><attribute name="color"/></optional>
173
+ <optional><attribute name="output"/></optional>
174
+ <ref name="dslx_language"/>
175
+ <ref name="dslx_foreign_attributes"/>
176
+ <interleave>
177
+ <optional><element name="code"><ref name="dslx_attributes"/><text/></element></optional>
178
+ <zeroOrMore>
179
+ <element>
180
+ <anyName>
181
+ <except>
182
+ <name>code</name>
183
+ </except>
184
+ </anyName>
185
+ <ref name="dslx_attributes"/>
186
+ <ref name="arbitrary"/>
187
+ </element>
188
+ </zeroOrMore>
189
+ </interleave>
190
+ </element>
191
+ </define>
192
+
193
+ <define name="dslx_stop">
194
+ <element name="stop">
195
+ <attribute name="id"/>
196
+ <ref name="dslx_foreign_attributes"/>
197
+ <zeroOrMore><ref name="dslx_extra"/></zeroOrMore>
198
+ </element>
199
+ </define>
200
+
201
+ <define name="dslx_terminate">
202
+ <element name="terminate">
203
+ <ref name="dslx_eid"/>
204
+ <optional><attribute name="abandon"><data type="boolean"/></attribute></optional> <!-- default: finish -->
205
+
206
+ <ref name="dslx_foreign_attributes"/>
207
+ <zeroOrMore><ref name="dslx_extra"/></zeroOrMore>
208
+ </element>
209
+ </define>
210
+
211
+ <define name="dslx_escape">
212
+ <element name="escape">
213
+ <ref name="dslx_eid"/>
214
+ <ref name="dslx_foreign_attributes"/>
215
+ <zeroOrMore><ref name="dslx_extra"/></zeroOrMore>
216
+ </element>
217
+ </define>
218
+
219
+ <define name="dslx_wait_for_signal">
220
+ <element name="wait_for_signal">
221
+ <attribute name="id"/>
222
+ <ref name="dslx_foreign_attributes"/>
223
+ <zeroOrMore><ref name="dslx_extra"/></zeroOrMore>
224
+ </element>
225
+ </define>
226
+
227
+ <!-- gateways and blocks -->
228
+ <define name="dslx_parallel">
229
+ <element name="parallel">
230
+ <ref name="dslx_eid"/>
231
+ <attribute name="wait"><data type="integer"/></attribute>
232
+ <attribute name="cancel">
233
+ <choice>
234
+ <value>last</value>
235
+ <value>first</value>
236
+ </choice>
237
+ </attribute>
238
+ <ref name="dslx_foreign_attributes"/>
239
+ <ref name="dslx_block"/>
240
+ </element>
241
+ </define>
242
+
243
+ <define name="dslx_parallel_branch">
244
+ <element name="parallel_branch">
245
+ <ref name="dslx_eid"/>
246
+ <ref name="dslx_foreign_attributes"/>
247
+ <ref name="dslx_block"/>
248
+ </element>
249
+ </define>
250
+
251
+ <define name="dslx_loop">
252
+ <element name="loop">
253
+ <ref name="dslx_eid"/>
254
+ <attribute name="mode">
255
+ <choice>
256
+ <value>pre_test</value>
257
+ <value>post_test</value>
258
+ </choice>
259
+ </attribute>
260
+ <attribute name="condition"/>
261
+ <ref name="dslx_language"/>
262
+ <ref name="dslx_foreign_attributes"/>
263
+ <ref name="dslx_block"/>
264
+ </element>
265
+ </define>
266
+
267
+ <define name="dslx_choose">
268
+ <element name="choose">
269
+ <ref name="dslx_eid"/>
270
+ <attribute name="mode">
271
+ <choice>
272
+ <value>exclusive</value>
273
+ <value>inclusive</value>
274
+ </choice>
275
+ </attribute>
276
+ <optional><attribute name="label"/></optional>
277
+ <ref name="dslx_foreign_attributes"/>
278
+ <interleave>
279
+ <zeroOrMore>
280
+ <element name="alternative">
281
+ <ref name="dslx_eid"/>
282
+ <optional><attribute name="condition"/></optional>
283
+ <ref name="dslx_language"/>
284
+ <ref name="dslx_foreign_attributes"/>
285
+ <ref name="dslx_block"/>
286
+ </element>
287
+ </zeroOrMore>
288
+ <optional>
289
+ <element name="otherwise">
290
+ <ref name="dslx_eid"/>
291
+ <ref name="dslx_foreign_attributes"/>
292
+ <ref name="dslx_block"/>
293
+ </element>
294
+ </optional>
295
+ <zeroOrMore><ref name="dslx_extra"/></zeroOrMore>
296
+ </interleave>
297
+ </element>
298
+ </define>
299
+
300
+ <define name="dslx_critical">
301
+ <element name="critical">
302
+ <ref name="dslx_eid"/>
303
+ <attribute name="sid"/>
304
+ <ref name="dslx_foreign_attributes"/>
305
+ <ref name="dslx_block"/>
306
+ </element>
307
+ </define>
308
+
309
+ <define name="dslx_group">
310
+ <element name="group">
311
+ <ref name="dslx_foreign_attributes"/>
312
+ <ref name="dslx_block"/>
313
+ </element>
314
+ </define>
315
+
316
+ <define name="dslx_closed_loop">
317
+ <element name="closed_loop">
318
+ <attribute name="overrun">
319
+ <choice>
320
+ <value>wait</value>
321
+ <value>cancel</value>
322
+ </choice>
323
+ </attribute>
324
+ <attribute name="execution">
325
+ <choice>
326
+ <value>sequential</value>
327
+ <value>parallel</value>
328
+ </choice>
329
+ </attribute>
330
+ <ref name="dslx_foreign_attributes"/>
331
+ <zeroOrMore>
332
+ <choice>
333
+ <element name="closed_loop_measuring">
334
+ <optional><attribute name="ctime"/></optional>
335
+ <optional><attribute name="frequency"/></optional>
336
+ <ref name="dslx_foreign_attributes"/>
337
+ <ref name="dslx_block"/>
338
+ </element>
339
+ <element name="closed_loop_control">
340
+ <optional><attribute name="ctime"/></optional>
341
+ <optional><attribute name="frequency"/></optional>
342
+ <ref name="dslx_foreign_attributes"/>
343
+ <ref name="dslx_block"/>
344
+ </element>
345
+ <element name="closed_loop_cancel">
346
+ <attribute name="condition"/>
347
+ <ref name="dslx_language"/>
348
+ <ref name="dslx_foreign_attributes"/>
349
+ <zeroOrMore><ref name="dslx_extra"/></zeroOrMore>
350
+ </element>
351
+ <ref name="dslx_extra"/>
352
+ </choice>
353
+ </zeroOrMore>
354
+ </element>
355
+ </define>
356
+ </grammar>
@@ -35,6 +35,20 @@
35
35
  </attribute>
36
36
  <data type="anyURI"/>
37
37
  </element>
38
+ <optional>
39
+ <!-- backtransformation: description from a directly set dslx. missing means copy -->
40
+ <element name="dslx">
41
+ <attribute name="type">
42
+ <choice>
43
+ <value>copy</value>
44
+ <value>rest</value>
45
+ <value>xslt</value>
46
+ <value>none</value>
47
+ </choice>
48
+ </attribute>
49
+ <data type="anyURI"/>
50
+ </element>
51
+ </optional>
38
52
  </element>
39
53
  </define>
40
54
  </grammar>
data/lib/properties.xml CHANGED
@@ -2,15 +2,15 @@
2
2
  This file is part of CPEE.
3
3
 
4
4
  CPEE is free software: you can redistribute it and/or modify it under the terms
5
- of the GNU General Public License as published by the Free Software Foundation,
5
+ of the GNU Lesser General Public License as published by the Free Software Foundation,
6
6
  either version 3 of the License, or (at your option) any later version.
7
7
 
8
8
  CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
9
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
- PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
+ PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
11
11
 
12
- You should have received a copy of the GNU General Public License along with
13
- CPEE (file COPYING in the main directory). If not, see
12
+ You should have received a copy of the GNU Lesser General Public License along with
13
+ CPEE (file LICENSE in the main directory). If not, see
14
14
  <http://www.gnu.org/licenses/>.
15
15
  -->
16
16
 
@@ -141,6 +141,7 @@
141
141
  </message> <!--}}}-->
142
142
  <message name="dslx"> <!--{{{-->
143
143
  <parameter name="dslx" mimetype="*/xml"/>
144
+
144
145
  <zeroOrMore>
145
146
  <parameter name="exposition" mimetype="*"/>
146
147
  </zeroOrMore>
@@ -1,5 +1,5 @@
1
1
  :host: localhost
2
- :url: http://localhost:8298/
2
+ :url: http://localhost:9298/
3
3
  :redis_db: 1
4
4
  :executionhandlers: ../../executionhandlers/
5
5
  :executionhandler: eval
@@ -1,15 +1,15 @@
1
1
  # This file is part of CPEE.
2
2
  #
3
3
  # CPEE is free software: you can redistribute it and/or modify it under the terms
4
- # of the GNU General Public License as published by the Free Software Foundation,
4
+ # of the GNU Lesser General Public License as published by the Free Software Foundation,
5
5
  # either version 3 of the License, or (at your option) any later version.
6
6
  #
7
7
  # CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
8
8
  # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
9
- # PARTICULAR PURPOSE. See the GNU General Public License for more details.
9
+ # PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
10
10
  #
11
- # You should have received a copy of the GNU General Public License along with
12
- # CPEE (file COPYING in the main directory). If not, see
11
+ # You should have received a copy of the GNU Lesser General Public License along with
12
+ # CPEE (file LICENSE in the main directory). If not, see
13
13
  # <http://www.gnu.org/licenses/>.
14
14
 
15
15
  require 'charlock_holmes'
@@ -17,6 +17,7 @@ require 'mimemagic'
17
17
  require 'base64'
18
18
  require 'securerandom'
19
19
  require 'cpee-eval-ruby/translation'
20
+ require 'cpee/json_pointer'
20
21
 
21
22
  class ConnectionWrapper < WEEL::ConnectionWrapperBase
22
23
  def self::loop_guard(arguments,id,count) # {{{
@@ -288,7 +289,15 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
288
289
  @controller.vote("activity/syncing_after", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
289
290
  end # }}}
290
291
  def vote_sync_before(parameters=nil) # {{{
291
- @controller.vote("activity/syncing_before", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
292
+ @label = parameters[:label] if parameters.is_a?(Hash) && parameters[:label]
293
+ @controller.vote("activity/syncing_before", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters) do |changes|
294
+ next unless parameters.is_a?(Hash)
295
+ changes.each do |pointer,value|
296
+ CPEE::JSONPointer::set(parameters, pointer, value)
297
+ rescue => e
298
+ puts "vote change #{pointer} ignored: #{e.message}"
299
+ end
300
+ end
292
301
  end # }}}
293
302
 
294
303
  def callback(result=nil,options={}, dataelements) #{{{
@@ -388,13 +397,13 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
388
397
  end
389
398
  __params
390
399
  end #}}}
391
- def test_condition(__eid,__dataelements,__endpoints,__local,__additional,__code,__args={}) #{{{
400
+ def test_condition(__eid,__dataelements,__endpoints,__local,__additional,__code,__args={},__props={}) #{{{
392
401
  __struct = WEEL::ReadStructure.new(__dataelements,__endpoints,__local,__additional).instance_eval(__code,'Condition',1)
393
402
 
394
403
  __struct = 'false' unless __struct
395
404
  __struct = (__struct == 'false' || __struct == 'null' || __struct == 'nil' || __struct == false ? false : true)
396
405
 
397
- @controller.notify("gateway/decide", :eid => __eid, :instance_uuid => @controller.uuid, :code => __code, :condition => __struct)
406
+ @controller.notify("gateway/decide", :eid => __eid, :instance_uuid => @controller.uuid, :code => __code, :condition => __struct, **__props)
398
407
  @controller.notify("gateway/annotation", :eid => __eid, :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :annotations => {})
399
408
  __struct
400
409
  end #}}}
@@ -1,15 +1,15 @@
1
1
  # This file is part of CPEE.
2
2
  #
3
3
  # CPEE is free software: you can redistribute it and/or modify it under the terms
4
- # of the GNU General Public License as published by the Free Software Foundation,
4
+ # of the GNU Lesser General Public License as published by the Free Software Foundation,
5
5
  # either version 3 of the License, or (at your option) any later version.
6
6
  #
7
7
  # CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
8
8
  # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
9
- # PARTICULAR PURPOSE. See the GNU General Public License for more details.
9
+ # PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
10
10
  #
11
- # You should have received a copy of the GNU General Public License along with
12
- # CPEE (file COPYING in the main directory). If not, see
11
+ # You should have received a copy of the GNU Lesser General Public License along with
12
+ # CPEE (file LICENSE in the main directory). If not, see
13
13
  # <http://www.gnu.org/licenses/>.
14
14
 
15
15
  require 'net/ssh'
@@ -1,5 +1,5 @@
1
1
  :host: localhost
2
- :url: http://localhost:8298/
2
+ :url: http://localhost:9298/
3
3
  :redis_db: 1
4
4
  :executionhandlers: ../../executionhandlers/
5
5
  :executionhandler: ruby
@@ -1,15 +1,15 @@
1
1
  # This file is part of CPEE.
2
2
  #
3
3
  # CPEE is free software: you can redistribute it and/or modify it under the terms
4
- # of the GNU General Public License as published by the Free Software Foundation,
4
+ # of the GNU Lesser General Public License as published by the Free Software Foundation,
5
5
  # either version 3 of the License, or (at your option) any later version.
6
6
  #
7
7
  # CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
8
8
  # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
9
- # PARTICULAR PURPOSE. See the GNU General Public License for more details.
9
+ # PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
10
10
  #
11
- # You should have received a copy of the GNU General Public License along with
12
- # CPEE (file COPYING in the main directory). If not, see
11
+ # You should have received a copy of the GNU Lesser General Public License along with
12
+ # CPEE (file LICENSE in the main directory). If not, see
13
13
  # <http://www.gnu.org/licenses/>.
14
14
 
15
15
  require 'charlock_holmes'
@@ -17,6 +17,7 @@ require 'mimemagic'
17
17
  require 'base64'
18
18
  require 'securerandom'
19
19
  require 'cpee-eval-ruby/translation'
20
+ require 'cpee/json_pointer'
20
21
 
21
22
  class ConnectionWrapper < WEEL::ConnectionWrapperBase
22
23
  def self::loop_guard(arguments,id,count) # {{{
@@ -288,7 +289,15 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
288
289
  @controller.vote("activity/syncing_after", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
289
290
  end # }}}
290
291
  def vote_sync_before(parameters=nil) # {{{
291
- @controller.vote("activity/syncing_before", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
292
+ @label = parameters[:label] if parameters.is_a?(Hash) && parameters[:label]
293
+ @controller.vote("activity/syncing_before", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters) do |changes|
294
+ next unless parameters.is_a?(Hash)
295
+ changes.each do |pointer,value|
296
+ CPEE::JSONPointer::set(parameters, pointer, value)
297
+ rescue => e
298
+ puts "vote change #{pointer} ignored: #{e.message}"
299
+ end
300
+ end
292
301
  end # }}}
293
302
 
294
303
  def callback(result=nil,options={}, dataelements) #{{{
@@ -354,6 +363,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
354
363
  end #}}}
355
364
 
356
365
  def code_error_handling(ret,where,what=RuntimeError) #{{{
366
+ raise 'external script handler probably not running' if ret.empty?
357
367
  sig = ret.find{|e| e.name == "signal" }.value
358
368
  sigt = ret.find{|e| e.name == "signal_text" }.value
359
369
  case sig
@@ -364,8 +374,6 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
364
374
  else
365
375
  raise 'something bad happened, but we dont know what.'
366
376
  end
367
- rescue
368
- raise 'external script handler probably not running'
369
377
  end #}}}
370
378
 
371
379
  def argument_transform_value(obj, struct)
@@ -423,7 +431,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
423
431
  end
424
432
  __params
425
433
  end #}}}
426
- def test_condition(__eid,__dataelements,__endpoints,__local,__additional,__code,__args={}) #{{{
434
+ def test_condition(__eid,__dataelements,__endpoints,__local,__additional,__code,__args={},__props={}) #{{{
427
435
  send = []
428
436
  send.push Riddl::Parameter::Simple::new('code',__code)
429
437
  send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(__dataelements))
@@ -440,7 +448,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
440
448
  __struct = 'false' unless __struct
441
449
  __struct = (__struct == 'false' || __struct == 'null' || __struct == 'nil' || __struct == false ? false : true)
442
450
 
443
- @controller.notify("gateway/decide", :eid => __eid, :instance_uuid => @controller.uuid, :code => __code, :condition => __struct)
451
+ @controller.notify("gateway/decide", :eid => __eid, :instance_uuid => @controller.uuid, :code => __code, :condition => __struct, **__props)
444
452
  @controller.notify("gateway/annotation", :eid => __eid, :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :annotations => {})
445
453
  __struct
446
454
  end #}}}