cpee 2.0.28 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (381) 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/css/wfadaptor.css +11 -0
  5. data/cockpit/js/instance.js +101 -26
  6. data/cockpit/js/wfadaptor.js +2 -0
  7. data/cockpit/templates.legacy/Async.xml +12 -12
  8. data/cockpit/templates.legacy/BCO.xml +9 -11
  9. data/cockpit/templates.legacy/BCS.xml +9 -11
  10. data/cockpit/templates.legacy/Centurio.xml +7 -7
  11. data/cockpit/templates.legacy/Concurrent.xml +7 -7
  12. data/cockpit/templates.legacy/Coopis Testset.xml +7 -7
  13. data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -7
  14. data/cockpit/templates.legacy/ICSOC Testset.xml +7 -7
  15. data/cockpit/templates.legacy/Infinity.xml +7 -7
  16. data/cockpit/templates.legacy/Lego Boxer.xml +13 -13
  17. data/cockpit/templates.legacy/Lego Conveyor.xml +13 -13
  18. data/cockpit/templates.legacy/Lego Crane.xml +16 -16
  19. data/cockpit/templates.legacy/Lego Ejector.xml +16 -16
  20. data/cockpit/templates.legacy/Lego Full.xml +12 -12
  21. data/cockpit/templates.legacy/Lego Liddy.xml +13 -13
  22. data/cockpit/templates.legacy/Lego Plate.xml +13 -13
  23. data/cockpit/templates.legacy/Lego Transporter.xml +14 -14
  24. data/cockpit/templates.legacy/Lego_Part_1.xml +12 -12
  25. data/cockpit/templates.legacy/LgLinear.xml +7 -10
  26. data/cockpit/templates.legacy/Linear.xml +11 -14
  27. data/cockpit/templates.legacy/Log.xml +11 -12
  28. data/cockpit/templates.legacy/Mangler 1.xml +7 -7
  29. data/cockpit/templates.legacy/Mangler 2.xml +7 -7
  30. data/cockpit/templates.legacy/Manuel Labels.xml +11 -11
  31. data/cockpit/templates.legacy/Promise.xml +30 -30
  32. data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +7 -7
  33. data/cockpit/templates.legacy/Subprocess.xml +15 -15
  34. data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
  35. data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
  36. data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
  37. data/cockpit/templates.legacy/Syncing P34.xml +8 -11
  38. data/cockpit/templates.legacy/TEST - Bad Loop.xml +7 -7
  39. data/cockpit/templates.legacy/TEST - Wrong Positions.xml +7 -7
  40. data/cockpit/templates.legacy/Take_5.xml +14 -14
  41. data/cockpit/templates.legacy/Update.xml +11 -11
  42. data/cockpit/templates.legacy/Worklist Parallel.xml +17 -17
  43. data/cockpit/templates.legacy/Worklist Test CPEE.xml +14 -14
  44. data/cockpit/templates.legacy/Worklist Test.xml +14 -14
  45. data/cockpit/templates.legacy/Worklist Test2.xml +14 -14
  46. data/cockpit/templates/Coopis 2010.xml +19 -11
  47. data/cockpit/templates/Coopis 2010.xml.active +1 -0
  48. data/cockpit/templates/Coopis 2010.xml.active-uuid +1 -0
  49. data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +13 -12
  50. data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +13 -12
  51. data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +13 -12
  52. data/cockpit/templates/Track Test Local.xml +3 -3
  53. data/cockpit/templates/Track Test.xml +2 -2
  54. data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +2 -2
  55. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +2 -2
  56. data/cockpit/templates/UR-VUE 2020 Solution NN.xml +2 -2
  57. data/cockpit/templates/UR-VUE 2020 Solution View.xml +2 -2
  58. data/cockpit/templates/UR-VUE 2020.xml +4 -2
  59. data/cockpit/templates/Worklist.xml +19 -14
  60. data/cockpit/templates/instantiate.local/Take_Sub.xml +2 -2
  61. data/cockpit/templates/instantiate/Take_Perf.xml +1 -1
  62. data/cockpit/templates/instantiate/Take_Sub.xml +2 -2
  63. data/cockpit/templates/instantiate/Take_X.xml +2 -2
  64. data/cockpit/themes/compact/rngs/call.rng +17 -8
  65. data/cockpit/themes/compact/rngs/callmanipulate.rng +18 -9
  66. data/cockpit/themes/compact/rngs/parallel.rng +6 -0
  67. data/cockpit/themes/compact/rngs/start.rng +83 -0
  68. data/cockpit/themes/compact/symbols/parallel_branch_event.svg +2 -2
  69. data/cockpit/themes/compact/symbols/parallel_eventbased_exclusive.svg +9 -0
  70. data/cockpit/themes/compact/symbols/parallel_eventbased_parallel.svg +8 -0
  71. data/cockpit/themes/compact/symbols/start.svg +1 -1
  72. data/cockpit/themes/compact/theme.js +46 -3
  73. data/cockpit/themes/control/rngs/call.rng +17 -8
  74. data/cockpit/themes/control/rngs/callmanipulate.rng +18 -9
  75. data/cockpit/themes/control/rngs/parallel.rng +6 -0
  76. data/cockpit/themes/control/rngs/start.rng +83 -0
  77. data/cockpit/themes/control/symbols/parallel_branch_event.svg +2 -2
  78. data/cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg +9 -0
  79. data/cockpit/themes/control/symbols/parallel_eventbased_parallel.svg +8 -0
  80. data/cockpit/themes/control/symbols/start.svg +1 -1
  81. data/cockpit/themes/control/theme.js +45 -2
  82. data/cockpit/themes/default/rngs/call.rng +17 -8
  83. data/cockpit/themes/default/rngs/callmanipulate.rng +18 -9
  84. data/cockpit/themes/default/rngs/parallel.rng +6 -0
  85. data/cockpit/themes/default/rngs/start.rng +83 -0
  86. data/cockpit/themes/default/symbols/parallel_branch_event.svg +2 -2
  87. data/cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg +9 -0
  88. data/cockpit/themes/default/symbols/parallel_eventbased_parallel.svg +8 -0
  89. data/cockpit/themes/default/symbols/start.svg +1 -1
  90. data/cockpit/themes/default/theme.js +46 -3
  91. data/cockpit/themes/extended/rngs/call.rng +17 -8
  92. data/cockpit/themes/extended/rngs/callmanipulate.rng +18 -9
  93. data/cockpit/themes/extended/rngs/parallel.rng +6 -0
  94. data/cockpit/themes/extended/rngs/start.rng +83 -0
  95. data/cockpit/themes/extended/symbols/parallel_branch_event.svg +2 -2
  96. data/cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg +9 -0
  97. data/cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg +8 -0
  98. data/cockpit/themes/extended/symbols/start.svg +1 -1
  99. data/cockpit/themes/extended/theme.js +46 -3
  100. data/cockpit/themes/model/symbols/parallel_branch_event.svg +2 -2
  101. data/cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg +9 -0
  102. data/cockpit/themes/model/symbols/parallel_eventbased_parallel.svg +8 -0
  103. data/cockpit/themes/model/symbols/start.svg +1 -1
  104. data/cockpit/themes/model/theme.js +45 -2
  105. data/cockpit/themes/packed/rngs/call.rng +17 -8
  106. data/cockpit/themes/packed/rngs/callmanipulate.rng +18 -9
  107. data/cockpit/themes/packed/rngs/parallel.rng +6 -0
  108. data/cockpit/themes/packed/rngs/start.rng +83 -0
  109. data/cockpit/themes/packed/symbols/parallel_branch_event.svg +2 -2
  110. data/cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg +9 -0
  111. data/cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg +8 -0
  112. data/cockpit/themes/packed/symbols/start.svg +1 -1
  113. data/cockpit/themes/packed/theme.js +46 -3
  114. data/cockpit/themes/preset/rngs/call.rng +17 -8
  115. data/cockpit/themes/preset/rngs/callmanipulate.rng +18 -9
  116. data/cockpit/themes/preset/rngs/parallel.rng +6 -0
  117. data/cockpit/themes/preset/rngs/start.rng +83 -0
  118. data/cockpit/themes/preset/symbols/parallel_branch_event.svg +2 -2
  119. data/cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg +9 -0
  120. data/cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg +8 -0
  121. data/cockpit/themes/preset/symbols/start.svg +1 -1
  122. data/cockpit/themes/preset/theme.js +46 -3
  123. data/cpee.gemspec +3 -3
  124. data/lib/cpee/attributes_helper.rb +14 -0
  125. data/lib/cpee/implementation.rb +10 -8
  126. data/lib/cpee/implementation_callbacks.rb +14 -0
  127. data/lib/cpee/implementation_notifications.rb +19 -5
  128. data/lib/cpee/implementation_properties.rb +128 -24
  129. data/lib/cpee/persistence.rb +0 -27
  130. data/lib/cpee/statemachine.rb +14 -0
  131. data/lib/cpee/value_helper.rb +14 -0
  132. data/lib/properties.xml +4 -4
  133. data/lib/properties/{handlerwrapper.rng → executionhandler.rng} +3 -3
  134. data/lib/properties/properties.rng +2 -2
  135. data/lib/properties/set-properties.rng +2 -2
  136. data/lib/properties/set-some-properties.rng +2 -2
  137. data/server/{resources → executionhandlers/ruby}/backend/README.md +0 -0
  138. data/server/{resources → executionhandlers/ruby}/backend/instance.template +2 -4
  139. data/server/{resources → executionhandlers/ruby}/backend/opts.yaml +2 -2
  140. data/server/executionhandlers/ruby/backend/run +37 -0
  141. data/server/{handlerwrappers/default.rb → executionhandlers/ruby/connection.rb} +3 -3
  142. data/server/executionhandlers/ruby/controller.rb +195 -0
  143. data/server/{resources/transformation_dslx.xsl → executionhandlers/ruby/dsl_to_dslx.xsl} +57 -8
  144. data/server/executionhandlers/ruby/execution.rb +81 -0
  145. data/server/resources/properties.empty +1 -1
  146. data/server/resources/properties.init +1 -1
  147. data/server/resources/topics.xml +2 -2
  148. data/server/routing/end.pid +1 -1
  149. data/server/routing/forward-events.pid +1 -1
  150. data/server/routing/forward-votes.pid +1 -1
  151. data/server/routing/persist.pid +1 -1
  152. data/server/routing/persist.rb +3 -3
  153. data/tools/cpee +16 -10
  154. data/tools/server/cpee +1 -1
  155. data/tools/server/resources/properties.init +1 -1
  156. metadata +39 -238
  157. data/cockpit/js_libs.zip +0 -0
  158. data/cockpit/templates.legacy/convert_cpee2.rb +0 -15
  159. data/lib/cpee/controller.rb +0 -199
  160. data/lib/cpee/transform.rb +0 -95
  161. data/lib/instantiation.xml +0 -125
  162. data/server/resources/backend/instance.rb +0 -23
  163. data/server/resources/backend/run +0 -33
  164. data/server/server.pid +0 -1
  165. data/tools/test/README +0 -4
  166. data/tools/test/config.json +0 -3
  167. data/tools/test/contrib/graph_example.svg +0 -1166
  168. data/tools/test/contrib/legend.svg +0 -817
  169. data/tools/test/contrib/symbols.svg +0 -224
  170. data/tools/test/contrib/transformation1.xsl +0 -264
  171. data/tools/test/contrib/transformation2.xsl +0 -10
  172. data/tools/test/contrib/tree_example.svg +0 -788
  173. data/tools/test/css/model.css +0 -24
  174. data/tools/test/css/track.css +0 -60
  175. data/tools/test/css/ui.css +0 -214
  176. data/tools/test/css/wfadaptor.css +0 -422
  177. data/tools/test/edit.html +0 -258
  178. data/tools/test/graph.html +0 -69
  179. data/tools/test/index.html +0 -258
  180. data/tools/test/js/details.js +0 -109
  181. data/tools/test/js/instance.js +0 -1344
  182. data/tools/test/js/model.js +0 -41
  183. data/tools/test/js/parameters.js +0 -82
  184. data/tools/test/js/track.js +0 -18
  185. data/tools/test/js/ui.js +0 -104
  186. data/tools/test/js/wfadaptor.js +0 -763
  187. data/tools/test/js_libs.zip +0 -0
  188. data/tools/test/js_libs/Makefile +0 -2
  189. data/tools/test/js_libs/ansi_up.js +0 -333
  190. data/tools/test/js_libs/console.js +0 -80
  191. data/tools/test/js_libs/custommenu.css +0 -84
  192. data/tools/test/js_libs/custommenu.js +0 -104
  193. data/tools/test/js_libs/experiments1/relaxngui.css +0 -185
  194. data/tools/test/js_libs/experiments1/relaxngui.js +0 -488
  195. data/tools/test/js_libs/experiments1/rngtest9.html +0 -60
  196. data/tools/test/js_libs/experiments1/rngtest9.rng +0 -35
  197. data/tools/test/js_libs/experiments1/rngtest9.xml +0 -8
  198. data/tools/test/js_libs/jquery-2.2.4.min.js +0 -4
  199. data/tools/test/js_libs/jquery-3.2.1.min.js +0 -4
  200. data/tools/test/js_libs/jquery-3.3.1.min.js +0 -2
  201. data/tools/test/js_libs/jquery.browser.js +0 -40
  202. data/tools/test/js_libs/jquery.caret.min.js +0 -10
  203. data/tools/test/js_libs/jquery.cookie.js +0 -117
  204. data/tools/test/js_libs/jquery.min.js +0 -1
  205. data/tools/test/js_libs/jquery.svg.min.js +0 -6
  206. data/tools/test/js_libs/jquery.svgdom.min.js +0 -6
  207. data/tools/test/js_libs/markdown.min.js +0 -1
  208. data/tools/test/js_libs/parsequery.js +0 -21
  209. data/tools/test/js_libs/printf.js +0 -368
  210. data/tools/test/js_libs/relaxngui.css +0 -213
  211. data/tools/test/js_libs/relaxngui.js +0 -543
  212. data/tools/test/js_libs/strftime.min.js +0 -1
  213. data/tools/test/js_libs/tests/dataelements.html +0 -59
  214. data/tools/test/js_libs/tests/dataelements.rng +0 -8
  215. data/tools/test/js_libs/tests/dataelements.xml +0 -3
  216. data/tools/test/js_libs/tests/relaxngui.css +0 -203
  217. data/tools/test/js_libs/tests/relaxngui.js +0 -502
  218. data/tools/test/js_libs/tests/rngtest1.html +0 -66
  219. data/tools/test/js_libs/tests/rngtest1.rng +0 -147
  220. data/tools/test/js_libs/tests/rngtest1.xml +0 -13
  221. data/tools/test/js_libs/tests/rngtest2.html +0 -60
  222. data/tools/test/js_libs/tests/rngtest2.rng +0 -6
  223. data/tools/test/js_libs/tests/rngtest2.xml +0 -3
  224. data/tools/test/js_libs/tests/rngtest3.html +0 -60
  225. data/tools/test/js_libs/tests/rngtest3.rng +0 -23
  226. data/tools/test/js_libs/tests/rngtest3.xml +0 -9
  227. data/tools/test/js_libs/tests/rngtest4.html +0 -60
  228. data/tools/test/js_libs/tests/rngtest4.rng +0 -19
  229. data/tools/test/js_libs/tests/rngtest4.xml +0 -12
  230. data/tools/test/js_libs/tests/rngtest5.html +0 -60
  231. data/tools/test/js_libs/tests/rngtest5.rng +0 -75
  232. data/tools/test/js_libs/tests/rngtest5.xml +0 -40
  233. data/tools/test/js_libs/tests/rngtest6.html +0 -60
  234. data/tools/test/js_libs/tests/rngtest6.rng +0 -24
  235. data/tools/test/js_libs/tests/rngtest6.xml +0 -6
  236. data/tools/test/js_libs/tests/rngtest8.html +0 -60
  237. data/tools/test/js_libs/tests/rngtest8.rng +0 -13
  238. data/tools/test/js_libs/tests/rngtest8.xml +0 -2
  239. data/tools/test/js_libs/tests/rngtest9.html +0 -60
  240. data/tools/test/js_libs/tests/rngtest9.rng +0 -31
  241. data/tools/test/js_libs/tests/rngtest9.xml +0 -8
  242. data/tools/test/js_libs/ui.css +0 -333
  243. data/tools/test/js_libs/ui.html +0 -168
  244. data/tools/test/js_libs/ui.js +0 -177
  245. data/tools/test/js_libs/underscore.min.js +0 -27
  246. data/tools/test/js_libs/util.js +0 -81
  247. data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +0 -358
  248. data/tools/test/js_libs/vkbeautify.js +0 -1
  249. data/tools/test/js_libs/webcomponents.min.js +0 -196
  250. data/tools/test/model.html +0 -192
  251. data/tools/test/rngs/attributes.rng +0 -8
  252. data/tools/test/rngs/dataelements.rng +0 -8
  253. data/tools/test/rngs/endpoints.rng +0 -8
  254. data/tools/test/templates.legacy/Async.xml +0 -46
  255. data/tools/test/templates.legacy/BCO.xml +0 -70
  256. data/tools/test/templates.legacy/BCS.xml +0 -70
  257. data/tools/test/templates.legacy/Centurio.xml +0 -75
  258. data/tools/test/templates.legacy/Concurrent.xml +0 -40
  259. data/tools/test/templates.legacy/Coopis Testset.xml +0 -76
  260. data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +0 -30
  261. data/tools/test/templates.legacy/ICSOC Testset.xml +0 -95
  262. data/tools/test/templates.legacy/Infinity.xml +0 -28
  263. data/tools/test/templates.legacy/Lego Boxer.xml +0 -31
  264. data/tools/test/templates.legacy/Lego Conveyor.xml +0 -31
  265. data/tools/test/templates.legacy/Lego Crane.xml +0 -87
  266. data/tools/test/templates.legacy/Lego Ejector.xml +0 -55
  267. data/tools/test/templates.legacy/Lego Full.xml +0 -142
  268. data/tools/test/templates.legacy/Lego Liddy.xml +0 -40
  269. data/tools/test/templates.legacy/Lego Plate.xml +0 -31
  270. data/tools/test/templates.legacy/Lego Transporter.xml +0 -43
  271. data/tools/test/templates.legacy/Lego_Part_1.xml +0 -85
  272. data/tools/test/templates.legacy/LgLinear.xml +0 -65
  273. data/tools/test/templates.legacy/Linear.xml +0 -77
  274. data/tools/test/templates.legacy/Log.xml +0 -117
  275. data/tools/test/templates.legacy/Mangler 1.xml +0 -87
  276. data/tools/test/templates.legacy/Mangler 2.xml +0 -103
  277. data/tools/test/templates.legacy/Manuel Labels.xml +0 -55
  278. data/tools/test/templates.legacy/Promise.xml +0 -275
  279. data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +0 -83
  280. data/tools/test/templates.legacy/Subprocess.xml +0 -56
  281. data/tools/test/templates.legacy/Syncing P34 1.xml +0 -77
  282. data/tools/test/templates.legacy/Syncing P34 2.xml +0 -77
  283. data/tools/test/templates.legacy/Syncing P34 3.xml +0 -77
  284. data/tools/test/templates.legacy/Syncing P34.xml +0 -77
  285. data/tools/test/templates.legacy/TEST - Bad Loop.xml +0 -173
  286. data/tools/test/templates.legacy/TEST - Wrong Positions.xml +0 -174
  287. data/tools/test/templates.legacy/Take_5.xml +0 -48
  288. data/tools/test/templates.legacy/Update.xml +0 -32
  289. data/tools/test/templates.legacy/Worklist Parallel.xml +0 -104
  290. data/tools/test/templates.legacy/Worklist Test CPEE.xml +0 -40
  291. data/tools/test/templates.legacy/Worklist Test.xml +0 -42
  292. data/tools/test/templates.legacy/Worklist Test2.xml +0 -43
  293. data/tools/test/templates.legacy/convert_cpee2.rb +0 -15
  294. data/tools/test/templates.legacy/convert_preset.rb +0 -32
  295. data/tools/test/templates.legacy/testsets.xml +0 -37
  296. data/tools/test/templates.legacy/transformations.xml +0 -4
  297. data/tools/test/templates/Coopis 2010.xml +0 -76
  298. data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +0 -77
  299. data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +0 -77
  300. data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +0 -77
  301. data/tools/test/templates/Track Test Local.xml +0 -82
  302. data/tools/test/templates/Track Test.xml +0 -82
  303. data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +0 -182
  304. data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +0 -203
  305. data/tools/test/templates/UR-VUE 2020 Solution NN.xml +0 -197
  306. data/tools/test/templates/UR-VUE 2020 Solution View.xml +0 -151
  307. data/tools/test/templates/UR-VUE 2020.xml +0 -26
  308. data/tools/test/templates/Worklist.xml +0 -42
  309. data/tools/test/templates/instantiate.local/Take_Sub.xml +0 -59
  310. data/tools/test/templates/instantiate/Take_Perf.xml +0 -46
  311. data/tools/test/templates/instantiate/Take_Sub.xml +0 -58
  312. data/tools/test/templates/instantiate/Take_X.xml +0 -48
  313. data/tools/test/themes/compact/theme.js +0 -1285
  314. data/tools/test/themes/diana/theme.js +0 -1650
  315. data/tools/test/themes/extended/theme.js +0 -1325
  316. data/tools/test/themes/model/rngs/alternative.rng +0 -1
  317. data/tools/test/themes/model/rngs/call.rng +0 -67
  318. data/tools/test/themes/model/rngs/callmanipulate.rng +0 -72
  319. data/tools/test/themes/model/rngs/choose.rng +0 -1
  320. data/tools/test/themes/model/rngs/critical.rng +0 -1
  321. data/tools/test/themes/model/rngs/escape.rng +0 -1
  322. data/tools/test/themes/model/rngs/group.rng +0 -1
  323. data/tools/test/themes/model/rngs/loop.rng +0 -1
  324. data/tools/test/themes/model/rngs/manipulate.rng +0 -1
  325. data/tools/test/themes/model/rngs/otherwise.rng +0 -1
  326. data/tools/test/themes/model/rngs/parallel.rng +0 -1
  327. data/tools/test/themes/model/rngs/parallel_branch.rng +0 -1
  328. data/tools/test/themes/model/rngs/scripts.rng +0 -7
  329. data/tools/test/themes/model/rngs/stop.rng +0 -1
  330. data/tools/test/themes/model/rngs/terminate.rng +0 -1
  331. data/tools/test/themes/model/theme.js +0 -1268
  332. data/tools/test/themes/packed/theme.js +0 -1286
  333. data/tools/test/themes/preset/rngs/alternative.rng +0 -25
  334. data/tools/test/themes/preset/rngs/call.rng +0 -122
  335. data/tools/test/themes/preset/rngs/callmanipulate.rng +0 -145
  336. data/tools/test/themes/preset/rngs/choose.rng +0 -14
  337. data/tools/test/themes/preset/rngs/closed_loop.rng +0 -62
  338. data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +0 -5
  339. data/tools/test/themes/preset/rngs/closed_loop_control.rng +0 -31
  340. data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +0 -12
  341. data/tools/test/themes/preset/rngs/critical.rng +0 -5
  342. data/tools/test/themes/preset/rngs/escape.rng +0 -1
  343. data/tools/test/themes/preset/rngs/group.rng +0 -3
  344. data/tools/test/themes/preset/rngs/loop.rng +0 -22
  345. data/tools/test/themes/preset/rngs/manipulate.rng +0 -9
  346. data/tools/test/themes/preset/rngs/otherwise.rng +0 -22
  347. data/tools/test/themes/preset/rngs/parallel.rng +0 -21
  348. data/tools/test/themes/preset/rngs/parallel_branch.rng +0 -8
  349. data/tools/test/themes/preset/rngs/scripts.rng +0 -23
  350. data/tools/test/themes/preset/rngs/stop.rng +0 -5
  351. data/tools/test/themes/preset/rngs/terminate.rng +0 -1
  352. data/tools/test/themes/preset/symbols/alternative.svg +0 -5
  353. data/tools/test/themes/preset/symbols/arrow.svg +0 -3
  354. data/tools/test/themes/preset/symbols/call.svg +0 -6
  355. data/tools/test/themes/preset/symbols/callmanipulate.svg +0 -8
  356. data/tools/test/themes/preset/symbols/choose.svg +0 -5
  357. data/tools/test/themes/preset/symbols/choose_exclusive.svg +0 -5
  358. data/tools/test/themes/preset/symbols/choose_inclusive.svg +0 -4
  359. data/tools/test/themes/preset/symbols/closed_loop.svg +0 -5
  360. data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +0 -5
  361. data/tools/test/themes/preset/symbols/closed_loop_control.svg +0 -5
  362. data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +0 -6
  363. data/tools/test/themes/preset/symbols/complex.svg +0 -8
  364. data/tools/test/themes/preset/symbols/critical.svg +0 -4
  365. data/tools/test/themes/preset/symbols/end.svg +0 -3
  366. data/tools/test/themes/preset/symbols/escape.svg +0 -5
  367. data/tools/test/themes/preset/symbols/event_end.svg +0 -3
  368. data/tools/test/themes/preset/symbols/loop.svg +0 -5
  369. data/tools/test/themes/preset/symbols/manipulate.svg +0 -4
  370. data/tools/test/themes/preset/symbols/otherwise.svg +0 -5
  371. data/tools/test/themes/preset/symbols/parallel.svg +0 -5
  372. data/tools/test/themes/preset/symbols/parallel_branch.svg +0 -5
  373. data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +0 -4
  374. data/tools/test/themes/preset/symbols/parallel_branch_event.svg +0 -14
  375. data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +0 -5
  376. data/tools/test/themes/preset/symbols/scripts.svg +0 -4
  377. data/tools/test/themes/preset/symbols/start.svg +0 -3
  378. data/tools/test/themes/preset/symbols/stop.svg +0 -5
  379. data/tools/test/themes/preset/symbols/terminate.svg +0 -4
  380. data/tools/test/themes/preset/theme.js +0 -1287
  381. data/tools/test/track.html +0 -142
@@ -481,8 +481,12 @@ function WFAdaptorManifestation(adaptor) {
481
481
  'endnodes': 'this',
482
482
  'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
483
483
  'resolve_symbol': function(node) {
484
- if($(node).attr('wait') == '-1') {
484
+ if($(node).attr('cancel') == 'last' && $(node).attr('wait') == '-1') {
485
485
  return 'parallel_simple';
486
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '-1') {
487
+ return 'parallel_event_all';
488
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '1') {
489
+ return 'parallel_event_one';
486
490
  } else {
487
491
  return 'parallel_complex';
488
492
  }
@@ -849,7 +853,16 @@ function WFAdaptorManifestation(adaptor) {
849
853
  'col_shift': function(node) {
850
854
  return true;
851
855
  },
852
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
856
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
857
+ 'resolve_symbol': function(node) {
858
+ if($(node).attr('cancel') == 'last') {
859
+ return 'parallel_start';
860
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == 1) {
861
+ return 'parallel_eventbased_exclusive';
862
+ } else {
863
+ return 'parallel_eventbased_parallel';
864
+ }
865
+ },
853
866
  },//}}}
854
867
  'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
855
868
  'permissible_children': function(node,mode) { //{{{
@@ -1142,7 +1155,7 @@ function WFAdaptorManifestation(adaptor) {
1142
1155
  },
1143
1156
  'svg': self.adaptor.theme_dir + 'symbols/start.svg'
1144
1157
  },//}}}
1145
- 'description': null,
1158
+ 'description': self.adaptor.theme_dir + 'rngs/start.rng',
1146
1159
  'permissible_children': function(node,mode) { //{{{
1147
1160
  var func = null;
1148
1161
  if (mode == 'into') { func = self.adaptor.description.insert_first_into }
@@ -1276,6 +1289,24 @@ function WFAdaptorManifestation(adaptor) {
1276
1289
  'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1277
1290
  },//}}}
1278
1291
  }; /*}}}*/
1292
+ this.elements.parallel_start = { /*{{{*/
1293
+ 'parent': 'parallel',
1294
+ 'illustrator': {//{{{
1295
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1296
+ }//}}}
1297
+ }; /*}}}*/
1298
+ this.elements.parallel_eventbased_exclusive = { /*{{{*/
1299
+ 'parent': 'parallel',
1300
+ 'illustrator': {//{{{
1301
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1302
+ }//}}}
1303
+ }; /*}}}*/
1304
+ this.elements.parallel_eventbased_parallel = { /*{{{*/
1305
+ 'parent': 'parallel',
1306
+ 'illustrator': {//{{{
1307
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1308
+ }//}}}
1309
+ }; /*}}}*/
1279
1310
  this.elements.parallel_simple = { /*{{{*/
1280
1311
  'parent': 'parallel_finish',
1281
1312
  'illustrator': {//{{{
@@ -1288,6 +1319,18 @@ function WFAdaptorManifestation(adaptor) {
1288
1319
  'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1289
1320
  },//}}}
1290
1321
  }; /*}}}*/
1322
+ this.elements.parallel_event_all = { /*{{{*/
1323
+ 'parent': 'parallel_finish',
1324
+ 'illustrator': {//{{{
1325
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1326
+ }//}}}
1327
+ }; /*}}}*/
1328
+ this.elements.parallel_event_one = { /*{{{*/
1329
+ 'parent': 'parallel_finish',
1330
+ 'illustrator': {//{{{
1331
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1332
+ }//}}}
1333
+ }; /*}}}*/
1291
1334
  this.elements.parallel_branch_normal = { /*{{{*/
1292
1335
  'parent': 'parallel_branch',
1293
1336
  'illustrator': {//{{{
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.0.28"
3
+ s.version = "2.1.4"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
21
21
  s.email = 'juergen.mangler@gmail.com'
22
22
  s.homepage = 'http://cpee.org/'
23
23
 
24
- s.add_runtime_dependency 'riddl', '~> 0.108'
25
- s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.90'
24
+ s.add_runtime_dependency 'riddl', '~> 0.114'
25
+ s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.99'
26
26
  s.add_runtime_dependency 'highline', '~> 2.0'
27
27
  s.add_runtime_dependency 'json', '~>2.1'
28
28
  s.add_runtime_dependency 'redis', '~> 4.1'
@@ -1,3 +1,17 @@
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
+
1
15
  require 'weel'
2
16
 
3
17
  class AttributesHelper
@@ -28,7 +28,7 @@ module CPEE
28
28
 
29
29
  SERVER = File.expand_path(File.join(__dir__,'..','cpee.xml'))
30
30
  PROPERTIES_PATHS_FULL = %w{
31
- /p:properties/p:handlerwrapper
31
+ /p:properties/p:executionhandler
32
32
  /p:properties/p:positions/p:*
33
33
  /p:properties/p:positions/p:*/@*
34
34
  /p:properties/p:dataelements/p:*
@@ -54,22 +54,17 @@ module CPEE
54
54
  }
55
55
  def self::implementation(opts)
56
56
  opts[:instances] ||= File.expand_path(File.join(__dir__,'..','..','server','instances'))
57
- opts[:global_handlerwrappers] ||= File.expand_path(File.join(__dir__,'..','..','server','handlerwrappers'))
58
- opts[:handlerwrappers] ||= ''
57
+ opts[:global_executionhandlers] ||= File.expand_path(File.join(__dir__,'..','..','server','executionhandlers'))
58
+ opts[:executionhandlers] ||= ''
59
59
  opts[:topics] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','topics.xml'))
60
60
  opts[:properties_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.init'))
61
61
  opts[:properties_empty] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.empty'))
62
- opts[:transformation_dslx] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','transformation_dslx.xsl'))
63
62
  opts[:transformation_service] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','transformation.xml'))
64
63
  opts[:empty_dslx] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','empty_dslx.xml'))
65
64
  opts[:notifications_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','notifications'))
66
65
  opts[:states] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','states.xml'))
67
- opts[:backend_run] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','backend','run'))
68
- opts[:backend_template] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','backend','instance.template'))
69
- opts[:backend_opts] ||= 'opts.yaml'
70
66
  opts[:watchdog_frequency] ||= 7
71
67
  opts[:watchdog_start_off] ||= false
72
- opts[:backend_instance] ||= 'instance.rb'
73
68
  opts[:infinite_loop_stop] ||= 10000
74
69
 
75
70
  ### set redis_cmd to nil if you want to do global
@@ -100,6 +95,13 @@ module CPEE
100
95
  ]
101
96
 
102
97
  Proc.new do
98
+ Dir[File.join(opts[:global_executionhandlers],'*','execution.rb')].each do |h|
99
+ require h
100
+ end unless opts[:global_executionhandlers].nil? || opts[:global_executionhandlers].strip == ''
101
+ Dir[File.join(opts[:executionhandlers],'*','execution.rb')].each do |h|
102
+ require h
103
+ end unless opts[:executionhandlers].nil? || opts[:executionhandlers].strip == ''
104
+
103
105
  parallel do
104
106
  CPEE::watch_services(opts[:watchdog_start_off],opts[:redis_url],File.join(opts[:basepath],opts[:redis_path]),opts[:redis_db])
105
107
  EM.add_periodic_timer(opts[:watchdog_frequency]) do ### start services
@@ -1,3 +1,17 @@
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
+
1
15
  require 'json'
2
16
 
3
17
  module CPEE
@@ -1,3 +1,17 @@
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
+
1
15
  require 'json'
2
16
 
3
17
  module CPEE
@@ -12,10 +26,10 @@ module CPEE
12
26
  end
13
27
  on resource "subscriptions" do
14
28
  run CPEE::Notifications::Subscriptions, id, opts if get
15
- run CPEE::Notifications::CreateSubscription, id, opts if post 'subscribe'
29
+ run CPEE::Notifications::CreateSubscription, id, opts if post 'create_subscription'
16
30
  on resource do
17
31
  run CPEE::Notifications::Subscription, id, opts if get
18
- run CPEE::Notifications::UpdateSubscription, id, opts if put 'subscribe'
32
+ run CPEE::Notifications::UpdateSubscription, id, opts if put 'change_subscription'
19
33
  run CPEE::Notifications::DeleteSubscription, id, opts if delete
20
34
  on resource 'sse' do
21
35
  run CPEE::Notifications::SSE, id, opts if sse
@@ -78,7 +92,8 @@ module CPEE
78
92
  ret = XML::Smart::string <<-END
79
93
  <subscription xmlns='http://riddl.org/ns/common-patterns/notifications-producer/2.0'/>
80
94
  END
81
- url = CPEE::Persistence::extract_item(id,opts,File.join('handler',key,'url'))
95
+ url = CPEE::Persistence::extract_item(id,opts,File.join('handlers',key,'url'))
96
+ ret.root.attributes['id'] = key
82
97
  ret.root.attributes['url'] = url if url && !url.empty?
83
98
  items = {}
84
99
  CPEE::Persistence::extract_handler(id,opts,key).each do |h|
@@ -107,8 +122,7 @@ module CPEE
107
122
  id = @a[0]
108
123
  opts = @a[1]
109
124
 
110
- key = Digest::MD5.hexdigest(Kernel::rand().to_s)
111
-
125
+ key = @p[0].name == 'id' ? @p.shift.value : Digest::MD5.hexdigest(Kernel::rand().to_s)
112
126
  url = @p[0].name == 'url' ? @p.shift.value : nil
113
127
  values = []
114
128
  while @p.length > 0
@@ -1,6 +1,19 @@
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
+
1
15
  require_relative 'attributes_helper'
2
16
  require_relative 'value_helper'
3
- require_relative 'transform'
4
17
  require 'json'
5
18
  require 'erb'
6
19
  require 'yaml'
@@ -31,9 +44,9 @@ module CPEE
31
44
  run CPEE::Properties::GetStatusMessage, id, opts if get
32
45
  end
33
46
  end
34
- on resource 'handlerwrapper' do
35
- run CPEE::Properties::GetHandlerWrapper, id, opts if get
36
- run CPEE::Properties::PutHandlerWrapper, id, opts if put 'handlerwrapper'
47
+ on resource 'executionhandler' do
48
+ run CPEE::Properties::GetExecutionHandler, id, opts if get
49
+ run CPEE::Properties::PutExecutionHandler, id, opts if put 'executionhandler'
37
50
  end
38
51
  on resource 'positions' do
39
52
  run CPEE::Properties::GetPositions, id, opts if get
@@ -128,8 +141,8 @@ module CPEE
128
141
  if (node = doc.find('/p:properties/p:status')).any?
129
142
  CPEE::Properties::PutStatus::set id, opts, node.first.dump
130
143
  end
131
- if (node = doc.find('/p:properties/p:handlerwrapper')).any?
132
- CPEE::Properties::PutHandlerWrapper::set id, opts, node.first.text
144
+ if (node = doc.find('/p:properties/p:executionhandler')).any?
145
+ CPEE::Properties::PutExecutionHandler::set id, opts, node.first.text
133
146
  end
134
147
 
135
148
  %w{dataelements endpoints attributes}.each do |item|
@@ -169,8 +182,8 @@ module CPEE
169
182
  if (node = doc.find('/p:properties/p:status')).any?
170
183
  CPEE::Properties::PutStatus::set id, opts, node.first.dump
171
184
  end
172
- if (node = doc.find('/p:properties/p:handlerwrapper')).any?
173
- CPEE::Properties::PutHandlerWrapper::set id, opts, node.first.text
185
+ if (node = doc.find('/p:properties/p:executionhandler')).any?
186
+ CPEE::Properties::PutExecutionHandler::set id, opts, node.first.text
174
187
  end
175
188
 
176
189
  %w{dataelements endpoints attributes}.each do |item|
@@ -211,19 +224,14 @@ module CPEE
211
224
  end
212
225
 
213
226
  def self::run(id,opts,state)
214
- exe = File.join(opts[:instances],id.to_s,File.basename(opts[:backend_run]))
215
227
  case state
216
228
  when 'running'
217
- CPEE::Persistence::write_instance id, opts
218
- pid = Kernel.spawn(exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
219
- Process.detach pid
220
- File.write(exe + '.pid',pid)
229
+ seh = Object.const_get('CPEE::ExecutionHandler::' + CPEE::Persistence::extract_item(id,opts,'executionhandler').capitalize)
230
+ seh::prepare(id,opts)
231
+ seh::run(id,opts)
221
232
  when 'stopping'
222
- pid = File.read(exe + '.pid') rescue nil
223
- if pid && (Process.kill(0, pid.to_i) rescue false)
224
- Process.kill('HUP', pid.to_i) rescue nil
225
- else
226
- File.unlink(exe + '.pid') rescue nil
233
+ seh = Object.const_get('CPEE::ExecutionHandler::' + CPEE::Persistence::extract_item(id,opts,'executionhandler').capitalize)
234
+ if seh::stop(id,opts) # process is not running anyway, so change redis
227
235
  PutState::set id, opts, 'stopped'
228
236
  end
229
237
  else
@@ -302,16 +310,16 @@ module CPEE
302
310
  Riddl::Parameter::Simple.new('value',CPEE::Persistence::extract_item(id,opts,'status/message'))
303
311
  end
304
312
  end #}}}
305
- class GetHandlerWrapper < Riddl::Implementation #{{{
313
+ class GetExecutionHandler < Riddl::Implementation #{{{
306
314
  def response
307
315
  id = @a[0]
308
316
  opts = @a[1]
309
- Riddl::Parameter::Simple.new('value',CPEE::Persistence::extract_item(id,opts,'handlerwrapper'))
317
+ Riddl::Parameter::Simple.new('value',CPEE::Persistence::extract_item(id,opts,'executionhandler'))
310
318
  end
311
319
  end #}}}
312
- class PutHandlerWrapper < Riddl::Implementation #{{{
320
+ class PutExecutionHandler < Riddl::Implementation #{{{
313
321
  def self::set(id,opts,hw)
314
- CPEE::Persistence::set_item(id,opts,'handlerwrapper',:handlerwrapper => hw)
322
+ CPEE::Persistence::set_item(id,opts,'executionhandler',:executionhandler => hw)
315
323
  end
316
324
  def response
317
325
  id = @a[0]
@@ -319,7 +327,7 @@ module CPEE
319
327
  if opts[:statemachine].readonly? id
320
328
  @status = 423
321
329
  else
322
- PutHandlerWrapper::set(id,opts,@p[0].value)
330
+ PutExecutionHandler::set(id,opts,@p[0].value)
323
331
  end
324
332
  nil
325
333
  end
@@ -633,8 +641,103 @@ module CPEE
633
641
  end #}}}
634
642
 
635
643
  class PutDescription < Riddl::Implementation #{{{
644
+ def self::transform(descxml,tdesc,tdesctype,tdata,tdatatype,tendp,tendptype,hw,opts) #{{{
645
+ desc = XML::Smart::string(descxml)
646
+ desc.register_namespace 'p', 'http://cpee.org/ns/description/1.0'
647
+
648
+ dslx = nil
649
+ dsl = nil
650
+ de = {}
651
+ ep = {}
652
+
653
+ if desc.root.children.empty?
654
+ tdesctype = tdatatype = tendptype = 'clean'
655
+ end
656
+
657
+ ### description transformation, including dslx to dsl
658
+ addit = if tdesctype == 'copy' || tdesc.empty?
659
+ desc
660
+ elsif tdesctype == 'rest' && !tdesc.empty?
661
+ srv = Riddl::Client.interface(tdesc,opts[:transformation_service])
662
+ status, res = srv.post [
663
+ Riddl::Parameter::Complex.new("description","text/xml",descxml),
664
+ Riddl::Parameter::Simple.new("type","description")
665
+ ]
666
+ if status >= 200 && status < 300
667
+ XML::Smart::string(res[0].value.read).root
668
+ else
669
+ raise 'Could not extract dslx'
670
+ end
671
+ elsif tdesctype == 'xslt' && !tdesc.empty?
672
+ trans = XML::Smart::open_unprotected(tdesc)
673
+ desc.transform_with(trans).root
674
+ elsif tdesctype == 'clean'
675
+ XML::Smart::open_unprotected(opts[:empty_dslx]).root
676
+ else
677
+ nil
678
+ end
679
+ unless addit.nil?
680
+ dslx = addit.to_s
681
+ dsl = Object.const_get('CPEE::ExecutionHandler::' + hw.capitalize)::dslx_to_dsl(addit)
682
+ end
683
+
684
+ ### dataelements extraction
685
+ addit = if tdatatype == 'rest' && !tdata.empty?
686
+ srv = Riddl::Client.interface(tdata,@opts[:transformation_service])
687
+ status, res = srv.post [
688
+ Riddl::Parameter::Complex.new("description","text/xml",descxml),
689
+ Riddl::Parameter::Simple.new("type","dataelements")
690
+ ]
691
+ if status >= 200 && status < 300
692
+ res
693
+ else
694
+ raise 'Could not extract dataelements'
695
+ end
696
+ elsif tdatatype == 'xslt' && !tdata.empty?
697
+ trans = XML::Smart::open_unprotected(tdata)
698
+ desc.transform_with(trans)
699
+ elsif tdatatype == 'clean'
700
+ []
701
+ else
702
+ nil
703
+ end
704
+ unless addit.nil?
705
+ addit.each_slice(2).each do |k,v|
706
+ de[k.value.to_sym] = v.value
707
+ end
708
+ end
709
+
710
+ ### endpoints extraction
711
+ addit = if tendptype == 'rest' && !tdata.empty?
712
+ srv = Riddl::Client.interface(tendp,@opts[:transformation_service])
713
+ status, res = srv.post [
714
+ Riddl::Parameter::Complex.new("description","text/xml",descxml),
715
+ Riddl::Parameter::Simple.new("type","endpoints")
716
+ ]
717
+ if status >= 200 && status < 300
718
+ res
719
+ else
720
+ raise 'Could not extract endpoints'
721
+ end
722
+ elsif tendptype == 'xslt' && !tdata.empty?
723
+ trans = XML::Smart::open_unprotected(tendp.text)
724
+ desc.transform_with(trans)
725
+ elsif tendptype == 'clean'
726
+ []
727
+ else
728
+ nil
729
+ end
730
+ unless addit.nil?
731
+ addit.each_slice(2).each do |k,v|
732
+ ep[k.value.to_sym] = v.value
733
+ end
734
+ end
735
+
736
+ [dslx, dsl, de, ep]
737
+ end #}}}
738
+
636
739
  def self::set(id,opts,xml)
637
- dslx, dsl, de, ep = transform(
740
+ dslx, dsl, de, ep = PutDescription::transform(
638
741
  xml,
639
742
  CPEE::Persistence::extract_item(id,opts,'transformation/description'),
640
743
  CPEE::Persistence::extract_item(id,opts,'transformation/description/@type'),
@@ -642,6 +745,7 @@ module CPEE
642
745
  CPEE::Persistence::extract_item(id,opts,'transformation/dataelements/@type'),
643
746
  CPEE::Persistence::extract_item(id,opts,'transformation/endpoints'),
644
747
  CPEE::Persistence::extract_item(id,opts,'transformation/endpoints/@type'),
748
+ CPEE::Persistence::extract_item(id,opts,'executionhandler'),
645
749
  opts
646
750
  )
647
751
  CPEE::Persistence::set_item(id,opts,'description',