cpee 2.0.30 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (351) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/config.json +1 -1
  3. data/cockpit/config.json.example +7 -0
  4. data/cockpit/js/instance.js +96 -26
  5. data/cockpit/js/wfadaptor.js +2 -0
  6. data/cockpit/templates.legacy/Async.xml +12 -12
  7. data/cockpit/templates.legacy/BCO.xml +9 -11
  8. data/cockpit/templates.legacy/BCS.xml +9 -11
  9. data/cockpit/templates.legacy/Centurio.xml +7 -7
  10. data/cockpit/templates.legacy/Concurrent.xml +7 -7
  11. data/cockpit/templates.legacy/Coopis Testset.xml +7 -7
  12. data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -7
  13. data/cockpit/templates.legacy/ICSOC Testset.xml +7 -7
  14. data/cockpit/templates.legacy/Infinity.xml +7 -7
  15. data/cockpit/templates.legacy/Lego Boxer.xml +13 -13
  16. data/cockpit/templates.legacy/Lego Conveyor.xml +13 -13
  17. data/cockpit/templates.legacy/Lego Crane.xml +16 -16
  18. data/cockpit/templates.legacy/Lego Ejector.xml +16 -16
  19. data/cockpit/templates.legacy/Lego Full.xml +12 -12
  20. data/cockpit/templates.legacy/Lego Liddy.xml +13 -13
  21. data/cockpit/templates.legacy/Lego Plate.xml +13 -13
  22. data/cockpit/templates.legacy/Lego Transporter.xml +14 -14
  23. data/cockpit/templates.legacy/Lego_Part_1.xml +12 -12
  24. data/cockpit/templates.legacy/LgLinear.xml +7 -10
  25. data/cockpit/templates.legacy/Linear.xml +11 -14
  26. data/cockpit/templates.legacy/Log.xml +11 -12
  27. data/cockpit/templates.legacy/Mangler 1.xml +7 -7
  28. data/cockpit/templates.legacy/Mangler 2.xml +7 -7
  29. data/cockpit/templates.legacy/Manuel Labels.xml +11 -11
  30. data/cockpit/templates.legacy/Promise.xml +30 -30
  31. data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +7 -7
  32. data/cockpit/templates.legacy/Subprocess.xml +15 -15
  33. data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
  34. data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
  35. data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
  36. data/cockpit/templates.legacy/Syncing P34.xml +8 -11
  37. data/cockpit/templates.legacy/TEST - Bad Loop.xml +7 -7
  38. data/cockpit/templates.legacy/TEST - Wrong Positions.xml +7 -7
  39. data/cockpit/templates.legacy/Take_5.xml +14 -14
  40. data/cockpit/templates.legacy/Update.xml +11 -11
  41. data/cockpit/templates.legacy/Worklist Parallel.xml +17 -17
  42. data/cockpit/templates.legacy/Worklist Test CPEE.xml +14 -14
  43. data/cockpit/templates.legacy/Worklist Test.xml +14 -14
  44. data/cockpit/templates.legacy/Worklist Test2.xml +14 -14
  45. data/cockpit/templates/Coopis 2010.xml +19 -11
  46. data/cockpit/templates/Coopis 2010.xml.active +1 -0
  47. data/cockpit/templates/Coopis 2010.xml.active-uuid +1 -0
  48. data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +13 -12
  49. data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +13 -12
  50. data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +13 -12
  51. data/cockpit/templates/Track Test Local.xml +3 -3
  52. data/cockpit/templates/Track Test.xml +2 -2
  53. data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +2 -2
  54. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +2 -2
  55. data/cockpit/templates/UR-VUE 2020 Solution NN.xml +2 -2
  56. data/cockpit/templates/UR-VUE 2020 Solution View.xml +2 -2
  57. data/cockpit/templates/UR-VUE 2020.xml +4 -2
  58. data/cockpit/templates/Worklist.xml +19 -14
  59. data/cockpit/templates/instantiate.local/Take_Sub.xml +2 -2
  60. data/cockpit/templates/instantiate/Take_Perf.xml +1 -1
  61. data/cockpit/templates/instantiate/Take_Sub.xml +2 -2
  62. data/cockpit/templates/instantiate/Take_X.xml +2 -2
  63. data/cockpit/themes/compact/rngs/call.rng +17 -8
  64. data/cockpit/themes/compact/rngs/callmanipulate.rng +18 -9
  65. data/cockpit/themes/compact/rngs/start.rng +83 -0
  66. data/cockpit/themes/compact/symbols/start.svg +1 -1
  67. data/cockpit/themes/compact/theme.js +1 -1
  68. data/cockpit/themes/control/rngs/call.rng +17 -8
  69. data/cockpit/themes/control/rngs/callmanipulate.rng +18 -9
  70. data/cockpit/themes/control/rngs/start.rng +83 -0
  71. data/cockpit/themes/control/symbols/start.svg +1 -1
  72. data/cockpit/themes/default/rngs/call.rng +17 -8
  73. data/cockpit/themes/default/rngs/callmanipulate.rng +18 -9
  74. data/cockpit/themes/default/rngs/start.rng +83 -0
  75. data/cockpit/themes/default/symbols/start.svg +1 -1
  76. data/cockpit/themes/default/theme.js +1 -1
  77. data/cockpit/themes/extended/rngs/call.rng +17 -8
  78. data/cockpit/themes/extended/rngs/callmanipulate.rng +18 -9
  79. data/cockpit/themes/extended/rngs/start.rng +83 -0
  80. data/cockpit/themes/extended/symbols/start.svg +1 -1
  81. data/cockpit/themes/extended/theme.js +1 -1
  82. data/cockpit/themes/model/symbols/start.svg +1 -1
  83. data/cockpit/themes/packed/rngs/call.rng +17 -8
  84. data/cockpit/themes/packed/rngs/callmanipulate.rng +18 -9
  85. data/cockpit/themes/packed/rngs/start.rng +83 -0
  86. data/cockpit/themes/packed/symbols/start.svg +1 -1
  87. data/cockpit/themes/packed/theme.js +1 -1
  88. data/cockpit/themes/preset/rngs/call.rng +17 -8
  89. data/cockpit/themes/preset/rngs/callmanipulate.rng +18 -9
  90. data/cockpit/themes/preset/rngs/start.rng +83 -0
  91. data/cockpit/themes/preset/symbols/start.svg +1 -1
  92. data/cockpit/themes/preset/theme.js +1 -1
  93. data/cpee.gemspec +3 -3
  94. data/lib/cpee/attributes_helper.rb +14 -0
  95. data/lib/cpee/implementation.rb +10 -8
  96. data/lib/cpee/implementation_callbacks.rb +14 -0
  97. data/lib/cpee/implementation_notifications.rb +19 -5
  98. data/lib/cpee/implementation_properties.rb +128 -24
  99. data/lib/cpee/persistence.rb +0 -27
  100. data/lib/cpee/statemachine.rb +14 -0
  101. data/lib/cpee/value_helper.rb +14 -0
  102. data/lib/properties.xml +4 -4
  103. data/lib/properties/{handlerwrapper.rng → executionhandler.rng} +3 -3
  104. data/lib/properties/properties.rng +2 -2
  105. data/lib/properties/set-properties.rng +2 -2
  106. data/lib/properties/set-some-properties.rng +2 -2
  107. data/server/{resources → executionhandlers/ruby}/backend/README.md +0 -0
  108. data/server/{resources → executionhandlers/ruby}/backend/instance.template +2 -4
  109. data/server/{resources → executionhandlers/ruby}/backend/opts.yaml +2 -2
  110. data/server/executionhandlers/ruby/backend/run +37 -0
  111. data/server/{handlerwrappers/default.rb → executionhandlers/ruby/connection.rb} +3 -3
  112. data/server/executionhandlers/ruby/controller.rb +195 -0
  113. data/server/{resources/transformation_dslx.xsl → executionhandlers/ruby/dsl_to_dslx.xsl} +53 -8
  114. data/server/executionhandlers/ruby/execution.rb +81 -0
  115. data/server/resources/properties.empty +1 -1
  116. data/server/resources/properties.init +1 -1
  117. data/server/resources/topics.xml +2 -2
  118. data/server/routing/end.pid +1 -1
  119. data/server/routing/forward-events.pid +1 -1
  120. data/server/routing/forward-votes.pid +1 -1
  121. data/server/routing/persist.pid +1 -1
  122. data/server/routing/persist.rb +3 -3
  123. data/tools/cpee +16 -10
  124. data/tools/server/cpee +1 -1
  125. data/tools/server/resources/properties.init +1 -1
  126. metadata +25 -238
  127. data/cockpit/js_libs.zip +0 -0
  128. data/cockpit/templates.legacy/convert_cpee2.rb +0 -15
  129. data/lib/cpee/controller.rb +0 -199
  130. data/lib/cpee/transform.rb +0 -95
  131. data/lib/instantiation.xml +0 -125
  132. data/server/resources/backend/instance.rb +0 -23
  133. data/server/resources/backend/run +0 -33
  134. data/server/server.pid +0 -1
  135. data/tools/test/README +0 -4
  136. data/tools/test/config.json +0 -3
  137. data/tools/test/contrib/graph_example.svg +0 -1166
  138. data/tools/test/contrib/legend.svg +0 -817
  139. data/tools/test/contrib/symbols.svg +0 -224
  140. data/tools/test/contrib/transformation1.xsl +0 -264
  141. data/tools/test/contrib/transformation2.xsl +0 -10
  142. data/tools/test/contrib/tree_example.svg +0 -788
  143. data/tools/test/css/model.css +0 -24
  144. data/tools/test/css/track.css +0 -60
  145. data/tools/test/css/ui.css +0 -214
  146. data/tools/test/css/wfadaptor.css +0 -422
  147. data/tools/test/edit.html +0 -258
  148. data/tools/test/graph.html +0 -69
  149. data/tools/test/index.html +0 -258
  150. data/tools/test/js/details.js +0 -109
  151. data/tools/test/js/instance.js +0 -1344
  152. data/tools/test/js/model.js +0 -41
  153. data/tools/test/js/parameters.js +0 -82
  154. data/tools/test/js/track.js +0 -18
  155. data/tools/test/js/ui.js +0 -104
  156. data/tools/test/js/wfadaptor.js +0 -763
  157. data/tools/test/js_libs.zip +0 -0
  158. data/tools/test/js_libs/Makefile +0 -2
  159. data/tools/test/js_libs/ansi_up.js +0 -333
  160. data/tools/test/js_libs/console.js +0 -80
  161. data/tools/test/js_libs/custommenu.css +0 -84
  162. data/tools/test/js_libs/custommenu.js +0 -104
  163. data/tools/test/js_libs/experiments1/relaxngui.css +0 -185
  164. data/tools/test/js_libs/experiments1/relaxngui.js +0 -488
  165. data/tools/test/js_libs/experiments1/rngtest9.html +0 -60
  166. data/tools/test/js_libs/experiments1/rngtest9.rng +0 -35
  167. data/tools/test/js_libs/experiments1/rngtest9.xml +0 -8
  168. data/tools/test/js_libs/jquery-2.2.4.min.js +0 -4
  169. data/tools/test/js_libs/jquery-3.2.1.min.js +0 -4
  170. data/tools/test/js_libs/jquery-3.3.1.min.js +0 -2
  171. data/tools/test/js_libs/jquery.browser.js +0 -40
  172. data/tools/test/js_libs/jquery.caret.min.js +0 -10
  173. data/tools/test/js_libs/jquery.cookie.js +0 -117
  174. data/tools/test/js_libs/jquery.min.js +0 -1
  175. data/tools/test/js_libs/jquery.svg.min.js +0 -6
  176. data/tools/test/js_libs/jquery.svgdom.min.js +0 -6
  177. data/tools/test/js_libs/markdown.min.js +0 -1
  178. data/tools/test/js_libs/parsequery.js +0 -21
  179. data/tools/test/js_libs/printf.js +0 -368
  180. data/tools/test/js_libs/relaxngui.css +0 -213
  181. data/tools/test/js_libs/relaxngui.js +0 -543
  182. data/tools/test/js_libs/strftime.min.js +0 -1
  183. data/tools/test/js_libs/tests/dataelements.html +0 -59
  184. data/tools/test/js_libs/tests/dataelements.rng +0 -8
  185. data/tools/test/js_libs/tests/dataelements.xml +0 -3
  186. data/tools/test/js_libs/tests/relaxngui.css +0 -203
  187. data/tools/test/js_libs/tests/relaxngui.js +0 -502
  188. data/tools/test/js_libs/tests/rngtest1.html +0 -66
  189. data/tools/test/js_libs/tests/rngtest1.rng +0 -147
  190. data/tools/test/js_libs/tests/rngtest1.xml +0 -13
  191. data/tools/test/js_libs/tests/rngtest2.html +0 -60
  192. data/tools/test/js_libs/tests/rngtest2.rng +0 -6
  193. data/tools/test/js_libs/tests/rngtest2.xml +0 -3
  194. data/tools/test/js_libs/tests/rngtest3.html +0 -60
  195. data/tools/test/js_libs/tests/rngtest3.rng +0 -23
  196. data/tools/test/js_libs/tests/rngtest3.xml +0 -9
  197. data/tools/test/js_libs/tests/rngtest4.html +0 -60
  198. data/tools/test/js_libs/tests/rngtest4.rng +0 -19
  199. data/tools/test/js_libs/tests/rngtest4.xml +0 -12
  200. data/tools/test/js_libs/tests/rngtest5.html +0 -60
  201. data/tools/test/js_libs/tests/rngtest5.rng +0 -75
  202. data/tools/test/js_libs/tests/rngtest5.xml +0 -40
  203. data/tools/test/js_libs/tests/rngtest6.html +0 -60
  204. data/tools/test/js_libs/tests/rngtest6.rng +0 -24
  205. data/tools/test/js_libs/tests/rngtest6.xml +0 -6
  206. data/tools/test/js_libs/tests/rngtest8.html +0 -60
  207. data/tools/test/js_libs/tests/rngtest8.rng +0 -13
  208. data/tools/test/js_libs/tests/rngtest8.xml +0 -2
  209. data/tools/test/js_libs/tests/rngtest9.html +0 -60
  210. data/tools/test/js_libs/tests/rngtest9.rng +0 -31
  211. data/tools/test/js_libs/tests/rngtest9.xml +0 -8
  212. data/tools/test/js_libs/ui.css +0 -333
  213. data/tools/test/js_libs/ui.html +0 -168
  214. data/tools/test/js_libs/ui.js +0 -177
  215. data/tools/test/js_libs/underscore.min.js +0 -27
  216. data/tools/test/js_libs/util.js +0 -81
  217. data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +0 -358
  218. data/tools/test/js_libs/vkbeautify.js +0 -1
  219. data/tools/test/js_libs/webcomponents.min.js +0 -196
  220. data/tools/test/model.html +0 -192
  221. data/tools/test/rngs/attributes.rng +0 -8
  222. data/tools/test/rngs/dataelements.rng +0 -8
  223. data/tools/test/rngs/endpoints.rng +0 -8
  224. data/tools/test/templates.legacy/Async.xml +0 -46
  225. data/tools/test/templates.legacy/BCO.xml +0 -70
  226. data/tools/test/templates.legacy/BCS.xml +0 -70
  227. data/tools/test/templates.legacy/Centurio.xml +0 -75
  228. data/tools/test/templates.legacy/Concurrent.xml +0 -40
  229. data/tools/test/templates.legacy/Coopis Testset.xml +0 -76
  230. data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +0 -30
  231. data/tools/test/templates.legacy/ICSOC Testset.xml +0 -95
  232. data/tools/test/templates.legacy/Infinity.xml +0 -28
  233. data/tools/test/templates.legacy/Lego Boxer.xml +0 -31
  234. data/tools/test/templates.legacy/Lego Conveyor.xml +0 -31
  235. data/tools/test/templates.legacy/Lego Crane.xml +0 -87
  236. data/tools/test/templates.legacy/Lego Ejector.xml +0 -55
  237. data/tools/test/templates.legacy/Lego Full.xml +0 -142
  238. data/tools/test/templates.legacy/Lego Liddy.xml +0 -40
  239. data/tools/test/templates.legacy/Lego Plate.xml +0 -31
  240. data/tools/test/templates.legacy/Lego Transporter.xml +0 -43
  241. data/tools/test/templates.legacy/Lego_Part_1.xml +0 -85
  242. data/tools/test/templates.legacy/LgLinear.xml +0 -65
  243. data/tools/test/templates.legacy/Linear.xml +0 -77
  244. data/tools/test/templates.legacy/Log.xml +0 -117
  245. data/tools/test/templates.legacy/Mangler 1.xml +0 -87
  246. data/tools/test/templates.legacy/Mangler 2.xml +0 -103
  247. data/tools/test/templates.legacy/Manuel Labels.xml +0 -55
  248. data/tools/test/templates.legacy/Promise.xml +0 -275
  249. data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +0 -83
  250. data/tools/test/templates.legacy/Subprocess.xml +0 -56
  251. data/tools/test/templates.legacy/Syncing P34 1.xml +0 -77
  252. data/tools/test/templates.legacy/Syncing P34 2.xml +0 -77
  253. data/tools/test/templates.legacy/Syncing P34 3.xml +0 -77
  254. data/tools/test/templates.legacy/Syncing P34.xml +0 -77
  255. data/tools/test/templates.legacy/TEST - Bad Loop.xml +0 -173
  256. data/tools/test/templates.legacy/TEST - Wrong Positions.xml +0 -174
  257. data/tools/test/templates.legacy/Take_5.xml +0 -48
  258. data/tools/test/templates.legacy/Update.xml +0 -32
  259. data/tools/test/templates.legacy/Worklist Parallel.xml +0 -104
  260. data/tools/test/templates.legacy/Worklist Test CPEE.xml +0 -40
  261. data/tools/test/templates.legacy/Worklist Test.xml +0 -42
  262. data/tools/test/templates.legacy/Worklist Test2.xml +0 -43
  263. data/tools/test/templates.legacy/convert_cpee2.rb +0 -15
  264. data/tools/test/templates.legacy/convert_preset.rb +0 -32
  265. data/tools/test/templates.legacy/testsets.xml +0 -37
  266. data/tools/test/templates.legacy/transformations.xml +0 -4
  267. data/tools/test/templates/Coopis 2010.xml +0 -76
  268. data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +0 -77
  269. data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +0 -77
  270. data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +0 -77
  271. data/tools/test/templates/Track Test Local.xml +0 -82
  272. data/tools/test/templates/Track Test.xml +0 -82
  273. data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +0 -182
  274. data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +0 -203
  275. data/tools/test/templates/UR-VUE 2020 Solution NN.xml +0 -197
  276. data/tools/test/templates/UR-VUE 2020 Solution View.xml +0 -151
  277. data/tools/test/templates/UR-VUE 2020.xml +0 -26
  278. data/tools/test/templates/Worklist.xml +0 -42
  279. data/tools/test/templates/instantiate.local/Take_Sub.xml +0 -59
  280. data/tools/test/templates/instantiate/Take_Perf.xml +0 -46
  281. data/tools/test/templates/instantiate/Take_Sub.xml +0 -58
  282. data/tools/test/templates/instantiate/Take_X.xml +0 -48
  283. data/tools/test/themes/compact/theme.js +0 -1285
  284. data/tools/test/themes/diana/theme.js +0 -1650
  285. data/tools/test/themes/extended/theme.js +0 -1325
  286. data/tools/test/themes/model/rngs/alternative.rng +0 -1
  287. data/tools/test/themes/model/rngs/call.rng +0 -67
  288. data/tools/test/themes/model/rngs/callmanipulate.rng +0 -72
  289. data/tools/test/themes/model/rngs/choose.rng +0 -1
  290. data/tools/test/themes/model/rngs/critical.rng +0 -1
  291. data/tools/test/themes/model/rngs/escape.rng +0 -1
  292. data/tools/test/themes/model/rngs/group.rng +0 -1
  293. data/tools/test/themes/model/rngs/loop.rng +0 -1
  294. data/tools/test/themes/model/rngs/manipulate.rng +0 -1
  295. data/tools/test/themes/model/rngs/otherwise.rng +0 -1
  296. data/tools/test/themes/model/rngs/parallel.rng +0 -1
  297. data/tools/test/themes/model/rngs/parallel_branch.rng +0 -1
  298. data/tools/test/themes/model/rngs/scripts.rng +0 -7
  299. data/tools/test/themes/model/rngs/stop.rng +0 -1
  300. data/tools/test/themes/model/rngs/terminate.rng +0 -1
  301. data/tools/test/themes/model/theme.js +0 -1268
  302. data/tools/test/themes/packed/theme.js +0 -1286
  303. data/tools/test/themes/preset/rngs/alternative.rng +0 -25
  304. data/tools/test/themes/preset/rngs/call.rng +0 -122
  305. data/tools/test/themes/preset/rngs/callmanipulate.rng +0 -145
  306. data/tools/test/themes/preset/rngs/choose.rng +0 -14
  307. data/tools/test/themes/preset/rngs/closed_loop.rng +0 -62
  308. data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +0 -5
  309. data/tools/test/themes/preset/rngs/closed_loop_control.rng +0 -31
  310. data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +0 -12
  311. data/tools/test/themes/preset/rngs/critical.rng +0 -5
  312. data/tools/test/themes/preset/rngs/escape.rng +0 -1
  313. data/tools/test/themes/preset/rngs/group.rng +0 -3
  314. data/tools/test/themes/preset/rngs/loop.rng +0 -22
  315. data/tools/test/themes/preset/rngs/manipulate.rng +0 -9
  316. data/tools/test/themes/preset/rngs/otherwise.rng +0 -22
  317. data/tools/test/themes/preset/rngs/parallel.rng +0 -21
  318. data/tools/test/themes/preset/rngs/parallel_branch.rng +0 -8
  319. data/tools/test/themes/preset/rngs/scripts.rng +0 -23
  320. data/tools/test/themes/preset/rngs/stop.rng +0 -5
  321. data/tools/test/themes/preset/rngs/terminate.rng +0 -1
  322. data/tools/test/themes/preset/symbols/alternative.svg +0 -5
  323. data/tools/test/themes/preset/symbols/arrow.svg +0 -3
  324. data/tools/test/themes/preset/symbols/call.svg +0 -6
  325. data/tools/test/themes/preset/symbols/callmanipulate.svg +0 -8
  326. data/tools/test/themes/preset/symbols/choose.svg +0 -5
  327. data/tools/test/themes/preset/symbols/choose_exclusive.svg +0 -5
  328. data/tools/test/themes/preset/symbols/choose_inclusive.svg +0 -4
  329. data/tools/test/themes/preset/symbols/closed_loop.svg +0 -5
  330. data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +0 -5
  331. data/tools/test/themes/preset/symbols/closed_loop_control.svg +0 -5
  332. data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +0 -6
  333. data/tools/test/themes/preset/symbols/complex.svg +0 -8
  334. data/tools/test/themes/preset/symbols/critical.svg +0 -4
  335. data/tools/test/themes/preset/symbols/end.svg +0 -3
  336. data/tools/test/themes/preset/symbols/escape.svg +0 -5
  337. data/tools/test/themes/preset/symbols/event_end.svg +0 -3
  338. data/tools/test/themes/preset/symbols/loop.svg +0 -5
  339. data/tools/test/themes/preset/symbols/manipulate.svg +0 -4
  340. data/tools/test/themes/preset/symbols/otherwise.svg +0 -5
  341. data/tools/test/themes/preset/symbols/parallel.svg +0 -5
  342. data/tools/test/themes/preset/symbols/parallel_branch.svg +0 -5
  343. data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +0 -4
  344. data/tools/test/themes/preset/symbols/parallel_branch_event.svg +0 -14
  345. data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +0 -5
  346. data/tools/test/themes/preset/symbols/scripts.svg +0 -4
  347. data/tools/test/themes/preset/symbols/start.svg +0 -3
  348. data/tools/test/themes/preset/symbols/stop.svg +0 -5
  349. data/tools/test/themes/preset/symbols/terminate.svg +0 -4
  350. data/tools/test/themes/preset/theme.js +0 -1287
  351. data/tools/test/track.html +0 -142
data/cockpit/js_libs.zip DELETED
Binary file
@@ -1,15 +0,0 @@
1
- #!/usr/bin/ruby
2
- require 'xml/smart'
3
-
4
- Dir['*.xml'].each do |f|
5
- XML::Smart.modify(f) do |doc|
6
- doc.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
7
- doc.register_namespace 'p', 'http://riddl.org/ns/common-patterns/properties/1.0'
8
- if doc.root.qname.name == 'testset'
9
- doc.find('//attributes | //endpoints | //dataelements | //positions | //transformation | //handlerwrapper | //description').each do |e|
10
- e.namespaces[nil] = 'http://cpee.org/ns/properties/2.0'
11
- e.namespace = nil
12
- end
13
- end
14
- end
15
- end
@@ -1,199 +0,0 @@
1
- # This file is part of CPEE.
2
- #
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,
5
- # either version 3 of the License, or (at your option) any later version.
6
- #
7
- # CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
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.
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
13
- # <http://www.gnu.org/licenses/>.
14
-
15
- require 'weel'
16
- require 'json'
17
- require 'redis'
18
- require 'securerandom'
19
- require 'riddl/client'
20
- require_relative 'value_helper'
21
- require_relative 'attributes_helper'
22
- require_relative 'message'
23
- require_relative 'redis'
24
-
25
- require 'ostruct'
26
- class ParaStruct < OpenStruct
27
- def to_json(*a)
28
- table.to_json
29
- end
30
- end
31
- def →(a); ParaStruct.new(a); end
32
- def ⭐(a); ParaStruct.new(a); end
33
-
34
- module CPEE
35
-
36
- class Controller
37
- def initialize(id,dir,opts)
38
- CPEE::redis_connect(opts)
39
-
40
- @redis = opts[:redis]
41
- @votes = []
42
-
43
- @id = id
44
-
45
- @attributes = {}
46
- @redis.keys("instance:#{id}/attributes/*").each do |key|
47
- @attributes[File.basename(key)] = @redis.get(key)
48
- end
49
-
50
- @attributes_helper = AttributesHelper.new
51
- @thread = nil
52
- @opts = opts
53
- @instance = nil
54
- @loop_guard = {}
55
-
56
- @callback_keys = {}
57
- @psredis = @opts[:redis_dyn].call
58
-
59
- Thread.new do
60
- @psredis.psubscribe('callback-response:*','callback-end:*') do |on|
61
- on.pmessage do |pat, what, message|
62
- if pat == 'callback-response:*' && @callback_keys.has_key?(what[18..-1])
63
- index = message.index(' ')
64
- mess = message[index+1..-1]
65
- instance = message[0...index]
66
- m = JSON.parse(mess)
67
- resp = []
68
- m['content']['values'].each do |e|
69
- if e[1][0] == 'simple'
70
- resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
71
- elsif e[1][0] == 'complex'
72
- resp << Riddl::Parameter::Complex.new(e[0],e[1][1],File.open(e[1][2]))
73
- end
74
- end
75
- @callback_keys[what[18..-1]].send(:callback,resp,m['content']['headers'])
76
- end
77
- if pat == 'callback-end:*'
78
- @callback_keys.delete(what[13..-1])
79
- end
80
- end
81
- end
82
- end
83
- end
84
-
85
- attr_reader :id
86
- attr_reader :attributes
87
- attr_reader :loop_guard
88
-
89
- def uuid
90
- @attributes['uuid']
91
- end
92
-
93
- def attributes_translated
94
- @attributes_helper.translate(attributes,dataelements,endpoints)
95
- end
96
-
97
- def host
98
- @opts[:host]
99
- end
100
- def base_url
101
- @opts[:url]
102
- end
103
- def instance_url
104
- File.join(@opts[:url].to_s,@id.to_s)
105
- end
106
- def instance_id
107
- @id
108
- end
109
- def base
110
- base_url
111
- end
112
- def instance=(inst)
113
- @instance = inst
114
- end
115
- def endpoints
116
- @instance.endpoints
117
- end
118
- def dataelements
119
- @instance.data
120
- end
121
-
122
- def start
123
- if vote("state/change", :state => 'running')
124
- @thread = @instance.start
125
- @thread.join
126
- else
127
- @thread = @instance.stop
128
- @thread.join
129
- end
130
- end
131
-
132
- def stop
133
- ### tell the instance to stop
134
- @instance.stop
135
- ### end all votes or it will not work
136
- Thread.new do # doing stuff in trap context is a nono. but in a thread its fine :-)
137
- @votes.each do |key|
138
- CPEE::Message::send(:'vote-response',key,base,@id,uuid,info,true,@redis)
139
- end
140
- end
141
- @thread.join if !@thread.nil? && @thread.alive?
142
- end
143
-
144
- def info
145
- @attributes['info']
146
- end
147
-
148
- def notify(what,content={})
149
- content[:attributes] = attributes_translated
150
- CPEE::Message::send(:event,what,base,@id,uuid,info,content,@redis)
151
- end
152
-
153
- def vote(what,content={})
154
- topic, name = what.split('/')
155
- handler = File.join(topic,'vote',name)
156
- votes = []
157
- @redis.smembers("instance:#{id}/handlers/#{handler}").each do |client|
158
- voteid = Digest::MD5.hexdigest(Kernel::rand().to_s)
159
- content[:key] = voteid
160
- content[:attributes] = attributes_translated
161
- content[:subscription] = client
162
- votes << voteid
163
- CPEE::Message::send(:vote,what,base,@id,uuid,info,content,@redis)
164
- end
165
-
166
- if votes.length > 0
167
- @votes += votes
168
- psredis = @opts[:redis_dyn].call
169
- collect = []
170
- psredis.subscribe(votes.map{|e| ['vote-response:' + e.to_s] }.flatten) do |on|
171
- on.message do |what, message|
172
- index = message.index(' ')
173
- mess = message[index+1..-1]
174
- m = JSON.parse(mess)
175
- collect << ((m['content'] == true || m['content'] == 'true') || false)
176
- @votes.delete m['name']
177
- cancel_callback m['name']
178
- if collect.length >= votes.length
179
- psredis.unsubscribe
180
- end
181
- end
182
- end
183
- !collect.include?(false)
184
- else
185
- true
186
- end
187
- end
188
-
189
- def callback(hw,key,content)
190
- CPEE::Message::send(:callback,'activity/content',base,@id,uuid,info,content.merge(:key => key),@redis)
191
- @callback_keys[key] = hw
192
- end
193
-
194
- def cancel_callback(key)
195
- CPEE::Message::send(:'callback-end',key,base,@id,uuid,info,{},@redis)
196
- end
197
- end
198
-
199
- end
@@ -1,95 +0,0 @@
1
- def transform(descxml,tdesc,tdesctype,tdata,tdatatype,tendp,tendptype,opts)
2
- desc = XML::Smart::string(descxml)
3
- desc.register_namespace 'p', 'http://cpee.org/ns/description/1.0'
4
-
5
- dslx = nil
6
- dsl = nil
7
- de = {}
8
- ep = {}
9
-
10
- if desc.root.children.empty?
11
- tdesctype = tdatatype = tendptype = 'clean'
12
- end
13
-
14
- ### description transformation, including dslx to dsl
15
- addit = if tdesctype == 'copy' || tdesc.empty?
16
- desc
17
- elsif tdesctype == 'rest' && !tdesc.empty?
18
- srv = Riddl::Client.interface(tdesc,opts[:transformation_service])
19
- status, res = srv.post [
20
- Riddl::Parameter::Complex.new("description","text/xml",descxml),
21
- Riddl::Parameter::Simple.new("type","description")
22
- ]
23
- if status >= 200 && status < 300
24
- XML::Smart::string(res[0].value.read).root
25
- else
26
- raise 'Could not extract dslx'
27
- end
28
- elsif tdesctype == 'xslt' && !tdesc.empty?
29
- trans = XML::Smart::open_unprotected(tdesc)
30
- desc.transform_with(trans).root
31
- elsif tdesctype == 'clean'
32
- XML::Smart::open_unprotected(opts[:empty_dslx]).root
33
- else
34
- nil
35
- end
36
- unless addit.nil?
37
- trans = XML::Smart::open_unprotected(opts[:transformation_dslx])
38
- dslx = addit.to_s
39
- dsl = addit.transform_with(trans).to_s
40
- end
41
-
42
- ### dataelements extraction
43
- addit = if tdatatype == 'rest' && !tdata.empty?
44
- srv = Riddl::Client.interface(tdata,@opts[:transformation_service])
45
- status, res = srv.post [
46
- Riddl::Parameter::Complex.new("description","text/xml",descxml),
47
- Riddl::Parameter::Simple.new("type","dataelements")
48
- ]
49
- if status >= 200 && status < 300
50
- res
51
- else
52
- raise 'Could not extract dataelements'
53
- end
54
- elsif tdatatype == 'xslt' && !tdata.empty?
55
- trans = XML::Smart::open_unprotected(tdata)
56
- desc.transform_with(trans)
57
- elsif tdatatype == 'clean'
58
- []
59
- else
60
- nil
61
- end
62
- unless addit.nil?
63
- addit.each_slice(2).each do |k,v|
64
- de[k.value.to_sym] = v.value
65
- end
66
- end
67
-
68
- ### endpoints extraction
69
- addit = if tendptype == 'rest' && !tdata.empty?
70
- srv = Riddl::Client.interface(tendp,@opts[:transformation_service])
71
- status, res = srv.post [
72
- Riddl::Parameter::Complex.new("description","text/xml",descxml),
73
- Riddl::Parameter::Simple.new("type","endpoints")
74
- ]
75
- if status >= 200 && status < 300
76
- res
77
- else
78
- raise 'Could not extract endpoints'
79
- end
80
- elsif tendptype == 'xslt' && !tdata.empty?
81
- trans = XML::Smart::open_unprotected(tendp.text)
82
- desc.transform_with(trans)
83
- elsif tendptype == 'clean'
84
- []
85
- else
86
- nil
87
- end
88
- unless addit.nil?
89
- addit.each_slice(2).each do |k,v|
90
- ep[k.value.to_sym] = v.value
91
- end
92
- end
93
-
94
- [dslx, dsl, de, ep]
95
- end
@@ -1,125 +0,0 @@
1
- <description datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://riddl.org/ns/description/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
- <message name="xmlsimple">
3
- <parameter name="xml" mimetype="*/xml"/>
4
- </message>
5
- <message name="xml">
6
- <parameter name="behavior" type="string">
7
- <choice>
8
- <value>fork_ready</value>
9
- <value>fork_running</value>
10
- <value>wait_ready</value>
11
- <value>wait_running</value>
12
- </choice>
13
- </parameter>
14
- <parameter name="xml" mimetype="*/xml"/>
15
- <optional>
16
- <parameter name="init" type="string"/>
17
- </optional>
18
- </message>
19
- <message name="url_info">
20
- <parameter name="info" type="string"/>
21
- <parameter name="behavior" type="string">
22
- <choice>
23
- <value>fork_ready</value>
24
- <value>fork_running</value>
25
- <value>wait_ready</value>
26
- <value>wait_running</value>
27
- </choice>
28
- </parameter>
29
- <parameter name="url" type="string"/>
30
- <optional>
31
- <parameter name="init" type="string"/>
32
- </optional>
33
- <optional>
34
- <parameter name="endpoints" type="string"/>
35
- </optional>
36
- <optional>
37
- <parameter name="stream" type="string"/>
38
- </optional>
39
- </message>
40
- <message name="url">
41
- <parameter name="behavior" type="string">
42
- <choice>
43
- <value>fork_ready</value>
44
- <value>fork_running</value>
45
- <value>wait_ready</value>
46
- <value>wait_running</value>
47
- </choice>
48
- </parameter>
49
- <parameter name="url" type="string"/>
50
- <optional>
51
- <parameter name="init" type="string"/>
52
- </optional>
53
- <optional>
54
- <parameter name="endpoints" type="string"/>
55
- </optional>
56
- <optional>
57
- <parameter name="stream" type="string"/>
58
- </optional>
59
- </message>
60
- <message name="git">
61
- <parameter name="behavior" type="string">
62
- <choice>
63
- <value>fork_ready</value>
64
- <value>fork_running</value>
65
- <value>wait_ready</value>
66
- <value>wait_running</value>
67
- </choice>
68
- </parameter>
69
- <parameter name="repo" type="string"/>
70
- <parameter name="branch" type="string"/>
71
- <parameter name="path" type="string"/>
72
- <optional>
73
- <parameter name="init" type="string"/>
74
- </optional>
75
- <optional>
76
- <parameter name="endpoints" type="string"/>
77
- </optional>
78
- <optional>
79
- <parameter name="stream" type="string"/>
80
- </optional>
81
- </message>
82
- <message name="instance">
83
- <parameter name="behavior" type="string">
84
- <choice>
85
- <value>fork_ready</value>
86
- <value>fork_running</value>
87
- <value>wait_ready</value>
88
- <value>wait_running</value>
89
- <value>wait_stopped_running</value>
90
- <value>wait_finished_running</value>
91
- </choice>
92
- </parameter>
93
- <parameter name="instance" type="integer"/>
94
- <optional>
95
- <parameter name="init" type="string"/>
96
- </optional>
97
- </message>
98
-
99
- <message name="result">
100
- <parameter name="instance" mimetype="application/json"/>
101
- </message>
102
-
103
- <resource>
104
- <post in="xmlsimple" out="result"/>
105
- <resource relative="xml">
106
- <post in="xml" out="result"/>
107
- </resource>
108
- <resource relative="instance">
109
- <post in="instance" out="result"/>
110
- </resource>
111
- <resource relative="url">
112
- <post in="url" out="result"/>
113
- <post in="url_info" out="result"/>
114
- </resource>
115
- <resource relative="git">
116
- <post in="git" out="result"/>
117
- </resource>
118
- <resource relative="callback">
119
- <resource>
120
- <post/>
121
- </resource>
122
- </resource>
123
- </resource>
124
-
125
- </description>
@@ -1,23 +0,0 @@
1
- class Instance < WEEL
2
- handlerwrapper DefaultHandlerWrapper
3
-
4
- endpoint :timeout => "http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php"
5
- data :x => ''
6
- # search Position.new(:a1,:after,nil)
7
-
8
- control flow do
9
- call :a1, :timeout, parameters: { :label => "Step 1", :method => :post, :arguments => [⭐(:name => :timeout, :value => ->{ "2" })] }, finalize: <<-END
10
- p 'xxx1'
11
- data.x += \"a1,\"
12
- END
13
- call :a2, :timeout, parameters: { :label => "Step 2", :method => :post, :arguments => [⭐(:name => :timeout, :value => ->{ "4" })] }, finalize: <<-END
14
- p 'xxx2'
15
- data.x += \"a2,\"
16
- END
17
- call :a3, :timeout, parameters: { :label => "Step 3", :method => :post, :arguments => [⭐(:name => :timeout, :value => ->{ "4" })] }, finalize: <<-END
18
- p 'xxx3'
19
- data.x += \"a3,\"
20
- END
21
- end
22
- end
23
-