cpee 1.5.26 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) hide show
  1. checksums.yaml +4 -4
  2. data/{FEATURES → FEATURES.md} +7 -6
  3. data/INSTALL.md +1 -0
  4. data/{README → README.md} +3 -3
  5. data/Rakefile +1 -0
  6. data/cockpit/index.html +7 -7
  7. data/cockpit/js/details.js +13 -14
  8. data/cockpit/js/instance.js +191 -284
  9. data/cockpit/js/parameters.js +13 -3
  10. data/cockpit/js/ui.js +2 -2
  11. data/cockpit/model.html +1 -0
  12. data/cockpit/rngs/attributes.rng +1 -1
  13. data/cockpit/rngs/dataelements.rng +1 -1
  14. data/cockpit/rngs/endpoints.rng +1 -1
  15. data/cockpit/templates.legacy/Async.xml +7 -7
  16. data/cockpit/templates.legacy/BCO.xml +7 -10
  17. data/cockpit/templates.legacy/BCS.xml +7 -10
  18. data/cockpit/templates.legacy/Centurio.xml +6 -6
  19. data/cockpit/templates.legacy/Concurrent.xml +6 -6
  20. data/cockpit/templates.legacy/Coopis Testset.xml +6 -6
  21. data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -6
  22. data/cockpit/templates.legacy/ICSOC Testset.xml +6 -6
  23. data/cockpit/templates.legacy/Infinity.xml +3 -3
  24. data/cockpit/templates.legacy/Lego Boxer.xml +7 -7
  25. data/cockpit/templates.legacy/Lego Conveyor.xml +7 -7
  26. data/cockpit/templates.legacy/Lego Crane.xml +7 -7
  27. data/cockpit/templates.legacy/Lego Ejector.xml +7 -7
  28. data/cockpit/templates.legacy/Lego Full.xml +7 -7
  29. data/cockpit/templates.legacy/Lego Liddy.xml +7 -7
  30. data/cockpit/templates.legacy/Lego Plate.xml +7 -7
  31. data/cockpit/templates.legacy/Lego Transporter.xml +7 -7
  32. data/cockpit/templates.legacy/Lego_Part_1.xml +7 -7
  33. data/cockpit/templates.legacy/LgLinear.xml +6 -10
  34. data/cockpit/templates.legacy/Linear.xml +7 -7
  35. data/cockpit/templates.legacy/Log.xml +7 -7
  36. data/cockpit/templates.legacy/Mangler 1.xml +6 -6
  37. data/cockpit/templates.legacy/Mangler 2.xml +6 -6
  38. data/cockpit/templates.legacy/Manuel Labels.xml +7 -7
  39. data/cockpit/templates.legacy/Promise.xml +7 -7
  40. data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +6 -6
  41. data/cockpit/templates.legacy/Subprocess.xml +56 -0
  42. data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
  43. data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
  44. data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
  45. data/cockpit/templates.legacy/Syncing P34.xml +8 -11
  46. data/cockpit/templates.legacy/TEST - Bad Loop.xml +6 -6
  47. data/cockpit/templates.legacy/TEST - Wrong Positions.xml +6 -6
  48. data/cockpit/templates.legacy/Take_5.xml +48 -0
  49. data/cockpit/templates.legacy/Update.xml +7 -7
  50. data/cockpit/templates.legacy/Worklist Parallel.xml +7 -7
  51. data/cockpit/templates.legacy/Worklist Test CPEE.xml +7 -7
  52. data/cockpit/templates.legacy/Worklist Test.xml +7 -7
  53. data/cockpit/templates.legacy/Worklist Test2.xml +7 -7
  54. data/cockpit/templates.legacy/convert_cpee2.rb +15 -0
  55. data/cockpit/templates.legacy/testsets.xml +1 -1
  56. data/cockpit/templates/BPM 2020 Manual Adjust.xml +18 -71
  57. data/cockpit/templates/BPM 2020 Solution Baseline.xml +17 -71
  58. data/cockpit/templates/BPM 2020 Solution NN.xml +25 -71
  59. data/cockpit/templates/BPM 2020 Solution View.xml +15 -71
  60. data/cockpit/templates/BPM 2020.xml +17 -6
  61. data/cockpit/templates/Coopis 2010.xml +7 -7
  62. data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +7 -10
  63. data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +7 -10
  64. data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +7 -10
  65. data/cockpit/templates/Worklist.xml +7 -7
  66. data/cockpit/templates/convert_cpee2.rb +15 -0
  67. data/cockpit/themes/compact/rngs/alternative.rng +25 -0
  68. data/cockpit/themes/compact/rngs/call.rng +17 -17
  69. data/cockpit/themes/compact/rngs/callmanipulate.rng +26 -26
  70. data/cockpit/themes/compact/rngs/choose.rng +14 -0
  71. data/cockpit/themes/compact/rngs/critical.rng +5 -0
  72. data/cockpit/themes/compact/rngs/escape.rng +1 -0
  73. data/cockpit/themes/compact/rngs/group.rng +3 -0
  74. data/cockpit/themes/compact/rngs/loop.rng +22 -0
  75. data/cockpit/themes/compact/rngs/manipulate.rng +9 -0
  76. data/cockpit/themes/compact/rngs/otherwise.rng +22 -0
  77. data/cockpit/themes/compact/rngs/parallel.rng +21 -0
  78. data/cockpit/themes/compact/rngs/parallel_branch.rng +8 -0
  79. data/cockpit/themes/compact/rngs/scripts.rng +10 -11
  80. data/cockpit/themes/compact/rngs/stop.rng +5 -0
  81. data/cockpit/themes/compact/rngs/terminate.rng +1 -0
  82. data/cockpit/themes/convert_cpee2.rb +8 -0
  83. data/cockpit/themes/default/rngs/alternative.rng +8 -8
  84. data/cockpit/themes/default/rngs/call.rng +84 -48
  85. data/cockpit/themes/default/rngs/callmanipulate.rng +103 -64
  86. data/cockpit/themes/default/rngs/choose.rng +5 -3
  87. data/cockpit/themes/default/rngs/critical.rng +2 -2
  88. data/cockpit/themes/default/rngs/escape.rng +1 -1
  89. data/cockpit/themes/default/rngs/group.rng +3 -3
  90. data/cockpit/themes/default/rngs/loop.rng +8 -8
  91. data/cockpit/themes/default/rngs/manipulate.rng +3 -3
  92. data/cockpit/themes/default/rngs/otherwise.rng +8 -8
  93. data/cockpit/themes/default/rngs/parallel.rng +14 -6
  94. data/cockpit/themes/default/rngs/parallel_branch.rng +2 -2
  95. data/cockpit/themes/default/rngs/scripts.rng +23 -0
  96. data/cockpit/themes/default/rngs/stop.rng +2 -2
  97. data/cockpit/themes/default/rngs/terminate.rng +1 -1
  98. data/cockpit/themes/extended/rngs/alternative.rng +25 -0
  99. data/cockpit/themes/extended/rngs/call.rng +17 -17
  100. data/cockpit/themes/extended/rngs/callmanipulate.rng +26 -26
  101. data/cockpit/themes/extended/rngs/choose.rng +14 -0
  102. data/cockpit/themes/extended/rngs/critical.rng +5 -0
  103. data/cockpit/themes/extended/rngs/escape.rng +1 -0
  104. data/cockpit/themes/extended/rngs/group.rng +3 -0
  105. data/cockpit/themes/extended/rngs/loop.rng +22 -0
  106. data/cockpit/themes/extended/rngs/manipulate.rng +9 -0
  107. data/cockpit/themes/extended/rngs/otherwise.rng +22 -0
  108. data/cockpit/themes/extended/rngs/parallel.rng +21 -0
  109. data/cockpit/themes/extended/rngs/parallel_branch.rng +8 -0
  110. data/cockpit/themes/extended/rngs/scripts.rng +10 -11
  111. data/cockpit/themes/extended/rngs/stop.rng +5 -0
  112. data/cockpit/themes/extended/rngs/terminate.rng +1 -0
  113. data/cockpit/themes/extended/theme.js +7 -6
  114. data/cockpit/themes/model/rngs/alternative.rng +1 -1
  115. data/cockpit/themes/model/rngs/call.rng +16 -16
  116. data/cockpit/themes/model/rngs/callmanipulate.rng +17 -17
  117. data/cockpit/themes/model/rngs/choose.rng +1 -1
  118. data/cockpit/themes/model/rngs/critical.rng +1 -1
  119. data/cockpit/themes/model/rngs/escape.rng +1 -1
  120. data/cockpit/themes/model/rngs/group.rng +1 -1
  121. data/cockpit/themes/model/rngs/loop.rng +1 -1
  122. data/cockpit/themes/model/rngs/manipulate.rng +1 -1
  123. data/cockpit/themes/model/rngs/otherwise.rng +1 -1
  124. data/cockpit/themes/model/rngs/parallel.rng +1 -1
  125. data/cockpit/themes/model/rngs/parallel_branch.rng +1 -1
  126. data/cockpit/themes/model/rngs/scripts.rng +3 -4
  127. data/cockpit/themes/model/rngs/stop.rng +1 -1
  128. data/cockpit/themes/model/rngs/terminate.rng +1 -1
  129. data/cockpit/themes/model/theme.js +7 -6
  130. data/cockpit/themes/packed/rngs/alternative.rng +25 -0
  131. data/cockpit/themes/packed/rngs/call.rng +17 -17
  132. data/cockpit/themes/packed/rngs/callmanipulate.rng +26 -26
  133. data/cockpit/themes/packed/rngs/choose.rng +14 -0
  134. data/cockpit/themes/packed/rngs/critical.rng +5 -0
  135. data/cockpit/themes/packed/rngs/escape.rng +1 -0
  136. data/cockpit/themes/packed/rngs/group.rng +3 -0
  137. data/cockpit/themes/packed/rngs/loop.rng +22 -0
  138. data/cockpit/themes/packed/rngs/manipulate.rng +9 -0
  139. data/cockpit/themes/packed/rngs/otherwise.rng +22 -0
  140. data/cockpit/themes/packed/rngs/parallel.rng +21 -0
  141. data/cockpit/themes/packed/rngs/parallel_branch.rng +8 -0
  142. data/cockpit/themes/packed/rngs/scripts.rng +10 -11
  143. data/cockpit/themes/packed/rngs/stop.rng +5 -0
  144. data/cockpit/themes/packed/rngs/terminate.rng +1 -0
  145. data/cockpit/themes/packed/theme.js +7 -6
  146. data/cockpit/themes/preset/rngs/alternative.rng +25 -0
  147. data/cockpit/themes/preset/rngs/call.rng +17 -17
  148. data/cockpit/themes/preset/rngs/callmanipulate.rng +26 -26
  149. data/cockpit/themes/preset/rngs/choose.rng +14 -0
  150. data/cockpit/themes/preset/rngs/critical.rng +5 -0
  151. data/cockpit/themes/preset/rngs/escape.rng +1 -0
  152. data/cockpit/themes/preset/rngs/group.rng +3 -0
  153. data/cockpit/themes/preset/rngs/loop.rng +22 -0
  154. data/cockpit/themes/preset/rngs/manipulate.rng +9 -0
  155. data/cockpit/themes/preset/rngs/otherwise.rng +22 -0
  156. data/cockpit/themes/preset/rngs/parallel.rng +21 -0
  157. data/cockpit/themes/preset/rngs/parallel_branch.rng +8 -0
  158. data/cockpit/themes/preset/rngs/scripts.rng +10 -11
  159. data/cockpit/themes/preset/rngs/stop.rng +5 -0
  160. data/cockpit/themes/preset/rngs/terminate.rng +1 -0
  161. data/cockpit/themes/preset/theme.js +7 -6
  162. data/cpee.gemspec +10 -11
  163. data/{log/topics.xml → lib/callbacks.xml} +16 -6
  164. data/lib/{engine → callbacks}/callbacks.rng +2 -8
  165. data/lib/cpee.xml +10 -4
  166. data/lib/cpee/attributes_helper.rb +27 -0
  167. data/lib/cpee/controller.rb +113 -596
  168. data/lib/cpee/implementation.rb +167 -191
  169. data/lib/cpee/implementation_callbacks.rb +77 -0
  170. data/lib/cpee/implementation_notifications.rb +189 -0
  171. data/lib/cpee/implementation_properties.rb +714 -0
  172. data/lib/cpee/{callback.rb → message.rb} +20 -18
  173. data/lib/cpee/persistence.rb +135 -0
  174. data/lib/cpee/statemachine.rb +20 -0
  175. data/lib/cpee/transform.rb +95 -0
  176. data/lib/engine.xml +1 -59
  177. data/lib/properties.xml +236 -0
  178. data/lib/properties/arbitrary.rng +26 -0
  179. data/lib/properties/attributes.rng +10 -0
  180. data/lib/properties/dataelements.rng +10 -0
  181. data/lib/properties/description.rng +8 -0
  182. data/lib/properties/dsl.rng +7 -0
  183. data/lib/properties/dslx.rng +8 -0
  184. data/lib/properties/endpoints.rng +10 -0
  185. data/lib/properties/handlerwrapper.rng +9 -0
  186. data/lib/properties/position.rng +15 -0
  187. data/lib/properties/positions.rng +10 -0
  188. data/lib/properties/properties.rng +29 -0
  189. data/lib/properties/set-properties.rng +25 -0
  190. data/lib/properties/set-some-properties.rng +45 -0
  191. data/lib/properties/simple.rng +8 -0
  192. data/lib/properties/state.rng +33 -0
  193. data/lib/properties/status.rng +12 -0
  194. data/lib/properties/t_attributes.rng +7 -0
  195. data/lib/properties/t_dataelements.rng +7 -0
  196. data/lib/properties/t_endpoints.rng +7 -0
  197. data/lib/properties/t_position.rng +7 -0
  198. data/lib/properties/t_positions.rng +7 -0
  199. data/lib/properties/t_simple.rng +7 -0
  200. data/lib/properties/t_status.rng +7 -0
  201. data/lib/properties/t_transformation.rng +7 -0
  202. data/lib/properties/transformation.rng +40 -0
  203. data/server/dev.rb +1 -0
  204. data/server/handlerwrappers/default.rb +40 -38
  205. data/server/resources/backend/README.md +17 -0
  206. data/server/resources/backend/instance.rb +23 -0
  207. data/server/resources/backend/instance.template +19 -0
  208. data/server/resources/backend/opts.yaml +6 -0
  209. data/server/resources/backend/run +33 -0
  210. data/server/resources/notifications/logging/subscription.xml +19 -0
  211. data/server/resources/properties.empty +38 -0
  212. data/server/resources/properties.init +11 -11
  213. data/server/resources/states.dot +19 -0
  214. data/server/resources/states.xml +49 -0
  215. data/server/resources/transformation_dslx.xsl +12 -3
  216. data/server/routing/end.rb +44 -0
  217. data/server/routing/forward-events.rb +59 -0
  218. data/server/routing/forward-votes.rb +108 -0
  219. data/server/routing/persist.rb +155 -0
  220. data/server/server.rb +1 -0
  221. data/tools/cpee +46 -15
  222. data/tools/instantiation/instantiation +0 -1
  223. data/tools/server/server.rb +0 -1
  224. metadata +78 -132
  225. data/INSTALL +0 -23
  226. data/cockpit/templates/convert_preset.rb +0 -32
  227. data/cockpit/templates/testsets.xml +0 -11
  228. data/cockpit/templates/transformations.xml +0 -4
  229. data/cockpit/themes/compact/rngs/alternative.rng +0 -1
  230. data/cockpit/themes/compact/rngs/choose.rng +0 -1
  231. data/cockpit/themes/compact/rngs/critical.rng +0 -1
  232. data/cockpit/themes/compact/rngs/escape.rng +0 -1
  233. data/cockpit/themes/compact/rngs/group.rng +0 -1
  234. data/cockpit/themes/compact/rngs/loop.rng +0 -1
  235. data/cockpit/themes/compact/rngs/manipulate.rng +0 -1
  236. data/cockpit/themes/compact/rngs/otherwise.rng +0 -1
  237. data/cockpit/themes/compact/rngs/parallel.rng +0 -1
  238. data/cockpit/themes/compact/rngs/parallel_branch.rng +0 -1
  239. data/cockpit/themes/compact/rngs/stop.rng +0 -1
  240. data/cockpit/themes/compact/rngs/terminate.rng +0 -1
  241. data/cockpit/themes/default/rngs/finalize.rng +0 -6
  242. data/cockpit/themes/default/rngs/update.rng +0 -6
  243. data/cockpit/themes/default/theme.js +0 -1286
  244. data/cockpit/themes/extended/rngs/alternative.rng +0 -1
  245. data/cockpit/themes/extended/rngs/choose.rng +0 -1
  246. data/cockpit/themes/extended/rngs/critical.rng +0 -1
  247. data/cockpit/themes/extended/rngs/escape.rng +0 -1
  248. data/cockpit/themes/extended/rngs/group.rng +0 -1
  249. data/cockpit/themes/extended/rngs/loop.rng +0 -1
  250. data/cockpit/themes/extended/rngs/manipulate.rng +0 -1
  251. data/cockpit/themes/extended/rngs/otherwise.rng +0 -1
  252. data/cockpit/themes/extended/rngs/parallel.rng +0 -1
  253. data/cockpit/themes/extended/rngs/parallel_branch.rng +0 -1
  254. data/cockpit/themes/extended/rngs/stop.rng +0 -1
  255. data/cockpit/themes/extended/rngs/terminate.rng +0 -1
  256. data/cockpit/themes/labels/rngs/alternative.rng +0 -25
  257. data/cockpit/themes/labels/rngs/call.rng +0 -81
  258. data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -101
  259. data/cockpit/themes/labels/rngs/choose.rng +0 -12
  260. data/cockpit/themes/labels/rngs/critical.rng +0 -5
  261. data/cockpit/themes/labels/rngs/escape.rng +0 -1
  262. data/cockpit/themes/labels/rngs/finalize.rng +0 -6
  263. data/cockpit/themes/labels/rngs/group.rng +0 -3
  264. data/cockpit/themes/labels/rngs/loop.rng +0 -22
  265. data/cockpit/themes/labels/rngs/manipulate.rng +0 -9
  266. data/cockpit/themes/labels/rngs/otherwise.rng +0 -22
  267. data/cockpit/themes/labels/rngs/parallel.rng +0 -13
  268. data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
  269. data/cockpit/themes/labels/rngs/stop.rng +0 -5
  270. data/cockpit/themes/labels/rngs/terminate.rng +0 -1
  271. data/cockpit/themes/labels/rngs/update.rng +0 -6
  272. data/cockpit/themes/labels/symbols/alternative.svg +0 -5
  273. data/cockpit/themes/labels/symbols/arrow.svg +0 -3
  274. data/cockpit/themes/labels/symbols/call.svg +0 -6
  275. data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -8
  276. data/cockpit/themes/labels/symbols/choose.svg +0 -5
  277. data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
  278. data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
  279. data/cockpit/themes/labels/symbols/complex.svg +0 -8
  280. data/cockpit/themes/labels/symbols/critical.svg +0 -4
  281. data/cockpit/themes/labels/symbols/end.svg +0 -3
  282. data/cockpit/themes/labels/symbols/escape.svg +0 -5
  283. data/cockpit/themes/labels/symbols/event_end.svg +0 -3
  284. data/cockpit/themes/labels/symbols/loop.svg +0 -5
  285. data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
  286. data/cockpit/themes/labels/symbols/otherwise.svg +0 -5
  287. data/cockpit/themes/labels/symbols/parallel.svg +0 -5
  288. data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -5
  289. data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +0 -4
  290. data/cockpit/themes/labels/symbols/parallel_branch_event.svg +0 -14
  291. data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +0 -5
  292. data/cockpit/themes/labels/symbols/scripts.svg +0 -4
  293. data/cockpit/themes/labels/symbols/start.svg +0 -3
  294. data/cockpit/themes/labels/symbols/stop.svg +0 -5
  295. data/cockpit/themes/labels/symbols/terminate.svg +0 -4
  296. data/cockpit/themes/packed/rngs/alternative.rng +0 -1
  297. data/cockpit/themes/packed/rngs/choose.rng +0 -1
  298. data/cockpit/themes/packed/rngs/critical.rng +0 -1
  299. data/cockpit/themes/packed/rngs/escape.rng +0 -1
  300. data/cockpit/themes/packed/rngs/group.rng +0 -1
  301. data/cockpit/themes/packed/rngs/loop.rng +0 -1
  302. data/cockpit/themes/packed/rngs/manipulate.rng +0 -1
  303. data/cockpit/themes/packed/rngs/otherwise.rng +0 -1
  304. data/cockpit/themes/packed/rngs/parallel.rng +0 -1
  305. data/cockpit/themes/packed/rngs/parallel_branch.rng +0 -1
  306. data/cockpit/themes/packed/rngs/stop.rng +0 -1
  307. data/cockpit/themes/packed/rngs/terminate.rng +0 -1
  308. data/cockpit/themes/preset/rngs/alternative.rng +0 -1
  309. data/cockpit/themes/preset/rngs/choose.rng +0 -1
  310. data/cockpit/themes/preset/rngs/critical.rng +0 -1
  311. data/cockpit/themes/preset/rngs/escape.rng +0 -1
  312. data/cockpit/themes/preset/rngs/group.rng +0 -1
  313. data/cockpit/themes/preset/rngs/loop.rng +0 -1
  314. data/cockpit/themes/preset/rngs/manipulate.rng +0 -1
  315. data/cockpit/themes/preset/rngs/otherwise.rng +0 -1
  316. data/cockpit/themes/preset/rngs/parallel.rng +0 -1
  317. data/cockpit/themes/preset/rngs/parallel_branch.rng +0 -1
  318. data/cockpit/themes/preset/rngs/stop.rng +0 -1
  319. data/cockpit/themes/preset/rngs/terminate.rng +0 -1
  320. data/lib/cpee/empty_workflow.rb +0 -28
  321. data/lib/cpee/handler_notifications.rb +0 -47
  322. data/lib/cpee/handler_properties.rb +0 -50
  323. data/lib/cpee/instantiation.rb +0 -369
  324. data/lib/cpee/processtransformation/bpel/Repository/booking.bpel +0 -125
  325. data/lib/cpee/processtransformation/bpel/Repository/booking.wsdl +0 -72
  326. data/lib/cpee/processtransformation/bpel/Repository/booking/airline.wsdl +0 -71
  327. data/lib/cpee/processtransformation/bpel/Repository/booking/hotel.wsdl +0 -64
  328. data/lib/cpee/processtransformation/bpel/Repository/booking/report.wsdl +0 -71
  329. data/lib/cpee/processtransformation/bpel/bpel2wee.rb +0 -34
  330. data/lib/cpee/processtransformation/bpel/bpelserver.ru +0 -64
  331. data/lib/cpee/processtransformation/bpel/bpelserver.xml +0 -70
  332. data/lib/cpee/processtransformation/bpel/lib/BPEL_Transform.rb +0 -367
  333. data/lib/cpee/processtransformation/bpmn2.rb +0 -297
  334. data/lib/cpee/processtransformation/cpee.rb +0 -119
  335. data/lib/cpee/processtransformation/structures.rb +0 -465
  336. data/lib/cpee/processtransformation/target.rb +0 -50
  337. data/log/azure.rb +0 -10
  338. data/log/azure_logger.rb +0 -136
  339. data/log/chain.xml +0 -27
  340. data/log/elasticsearch.rb +0 -15
  341. data/log/elasticsearch_logging.rb +0 -377
  342. data/log/legacy/test_es.rb +0 -26
  343. data/log/legacy/test_split.rb +0 -211
  344. data/log/log.xml +0 -13
  345. data/log/non_tamp.rb +0 -156
  346. data/log/sic.rb +0 -64
  347. data/log/template.xes_xml +0 -23
  348. data/log/template.xes_yaml +0 -28
  349. data/log/trace.yaml +0 -17717
  350. data/log/trace_sic.yaml +0 -18343
  351. data/log/xes_xml.rb +0 -121
  352. data/log/xes_yaml.rb +0 -96
  353. data/server/handlerwrappers/soap.rb +0 -146
  354. data/server/resources/properties.schema.active +0 -139
  355. data/server/resources/properties.schema.finished +0 -139
  356. data/server/resources/properties.schema.inactive +0 -136
  357. data/test/callback.rb +0 -9
@@ -1,50 +0,0 @@
1
- # encoding: UTF-8
2
- #
3
- # This file is part of CPEE.
4
- #
5
- # Apache License, Version 2.0
6
- #
7
- # Copyright (c) 2013 Juergen Mangler
8
- #
9
- # Licensed under the Apache License, Version 2.0 (the "License");
10
- # you may not use this file except in compliance with the License.
11
- # You may obtain a copy of the License at
12
- #
13
- # http://www.apache.org/licenses/LICENSE-2.0
14
- #
15
- # Unless required by applicable law or agreed to in writing, software
16
- # distributed under the License is distributed on an "AS IS" BASIS,
17
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
- # See the License for the specific language governing permissions and
19
- # limitations under the License.
20
-
21
- module CPEE
22
-
23
- module ProcessTransformation
24
-
25
- module Target
26
-
27
- class Default
28
- def initialize(tree)
29
- @tree = tree
30
- end
31
-
32
- def output_to_document(doc)
33
- generate_for_list(@tree,doc.root)
34
- doc.to_s
35
- end
36
-
37
- def generate_for_list(list,res)
38
- list.each do |e|
39
- nam = e.class.name.gsub(/\w+:+/,'')
40
- send("print_#{nam}".to_sym,e,res)
41
- end
42
- end
43
-
44
- end
45
-
46
- end
47
-
48
- end
49
-
50
- end
@@ -1,10 +0,0 @@
1
- #!/usr/bin/ruby
2
- require_relative 'azure_logger'
3
-
4
- Riddl::Server.new(File.join(__dir__,'/log.xml'), :host => 'localhost', :port => 9398) do
5
- accessible_description true
6
- cross_site_xhr true
7
- interface 'events' do
8
- run Logging if post 'event'
9
- end
10
- end.loop!
@@ -1,136 +0,0 @@
1
- require 'pp'
2
- require 'time'
3
- require 'digest'
4
-
5
- require 'json'
6
- require 'riddl/server'
7
- require 'typhoeus'
8
-
9
- EP_ARTEFACTS = "https://api.powerbi.com/beta/7ba47c6d-039d-44e5-8834-ee103ea08c19/datasets/2fb85c30-2e66-42d3-ac16-18c1fe76f501/rows?key=qpnTPKsn4ekXasNFs9he4afwAb%2Bj8DndJ6mGAomCGkkAdKsIDifRDK9hsQd0mk3X94KCzqGrNCYN%2Fs7T7STQjg%3D%3D"
10
- EP_INSTANCES = "https://api.powerbi.com/beta/7ba47c6d-039d-44e5-8834-ee103ea08c19/datasets/25c94fa0-f6f3-4547-9815-f772e1abc92f/rows?key=vWSGqHeQp6BQ8IPt4RBMLAbDPhVsyTW2NVcXfqQBCMx17cAZXfVejyAW72MeMGSbEk3fguhhqLoR3nYmopLIow%3D%3D"
11
- EP_SPAWNED = "https://api.powerbi.com/beta/7ba47c6d-039d-44e5-8834-ee103ea08c19/datasets/79620e3f-a65c-4e34-b859-5aa43074f086/rows?key=dFS4XmqxI8iauMKucZenHQOi6mNcPhBslYo%2B8NwlzMYgiDYN%2FGDv6hX%2BwHMRIJwvQDyCxgd614KDihPw1Q%2BGSA%3D%3D"
12
- EP_SENSORS = "https://api.powerbi.com/beta/7ba47c6d-039d-44e5-8834-ee103ea08c19/datasets/b62aada9-fe26-43e6-9e18-4bd3978e651d/rows?key=QWKNhGe3glUuWMOkCmJPytVQjaCn1Wyf8NboH3RXJTdA2ryiY%2Fk5%2Fz2lXDpgfguAa1xq%2BO%2Fw3lDhuXLYx4CyFA%3D%3D"
13
- EP_VALUES = "https://api.powerbi.com/beta/7ba47c6d-039d-44e5-8834-ee103ea08c19/datasets/fc53f106-0299-458d-aa33-a04a00d68571/rows?key=mp9Om5wrPLG5hDA4efGzpfEGG5uHRUTtnUGlzNrfHJ5qaub2fG2FpwS5gq3g4IYRKMWG7mlCK5pgwm48XxtItw%3D%3D"
14
-
15
- class Logging < Riddl::Implementation
16
-
17
- def doc(topic,event_name,instancenr,notification)
18
- uuid = notification['instance_uuid']
19
- return unless uuid
20
-
21
- uuid = notification.dig('instance_uuid')
22
-
23
- if notification.dig('attributes','artefacts') #{{{
24
- artefacts = JSON.parse(notification.dig('attributes','artefacts'))
25
-
26
- artefacts.each do |a|
27
- aid = Digest::MD5.hexdigest(a['group'] + '_' + a['name'])
28
- iid = Digest::MD5.hexdigest(a['group'] + '_' + a['name'] + '_' + uuid)
29
- Typhoeus.post(EP_ARTEFACTS,
30
- headers: {'Content-Type'=> "application/json"},
31
- body: JSON.generate([a])
32
- )
33
- Typhoeus.post(EP_INSTANCES,
34
- headers: {'Content-Type'=> "application/json"},
35
- body: [
36
- {
37
- 'uuid': uuid,
38
- 'group': a['group'],
39
- 'name': a['name'],
40
- 'date': Time.now.iso8601,
41
- 'info': notification.dig('attributes','info')
42
- }
43
- ]
44
- )
45
- end
46
- end #}}}
47
-
48
- case "#{topic}/#{event_name}"
49
- when "dataelements/change", "endpoints/change"
50
- sensors = JSON.parse(notification.dig('attributes','sensors') || '[]')
51
- sensors.each do |s|
52
- sid = Digest::MD5.hexdigest(uuid + '_' + s['name'])
53
- Typhoeus.post(EP_SENSORS,
54
- headers: {'Content-Type'=> "application/json"},
55
- body: [
56
- {
57
- 'uuid': uuid,
58
- 'sensor': s['name'],
59
- 'visualizer_url': s['visualizer_url'],
60
- 'visualizer_params': [s['visualizer_params']]
61
- }
62
- ]
63
- )
64
- Typhoeus.post(EP_VALUES,
65
- headers: {'Content-Type'=> "application/json"},
66
- body: [
67
- {
68
- 'uuid': uuid,
69
- 'sensor': s['name'],
70
- 'timestamp': notification.dig('timestamp'),
71
- 'value': s['value']
72
- }
73
- ]
74
- )
75
- end
76
- when "activity/receiving"
77
- sensors = JSON.parse(notification.dig('sensors') || '[]')
78
- tdoc = notification.dig('received')
79
- sensors.each do |s|
80
- sid = Digest::MD5.hexdigest(uuid + '_' + s['name'])
81
- Typhoeus.post(EP_SENSORS,
82
- headers: {'Content-Type'=> "application/json"},
83
- body: [
84
- {
85
- 'uuid': uuid,
86
- 'sensor': s['name'],
87
- 'task': notification.dig('activity'),
88
- 'visualizer_url': s['visualizer_url'],
89
- 'visualizer_params': (s['visualizer_params'].nil? || s['visualizer_params'].empty? ? [] : [s['visualizer_params']])
90
- }
91
- ]
92
- )
93
- status, result = Riddl::Client.new(s['extractor_url']).post [
94
- Riddl::Parameter::Simple.new('data',JSON.pretty_generate(tdoc)),
95
- Riddl::Parameter::Simple.new('what',s['extractor_arg'])
96
- ]
97
- if status >= 200 && status < 300
98
- ret = JSON::parse(result[0]&.value.read) rescue []
99
- ret.each do |v,t|
100
- Typhoeus.post(EP_VALUES,
101
- headers: {'Content-Type'=> "application/json"},
102
- body: [
103
- {
104
- 'uuid': uuid,
105
- 'sensor': s['name'],
106
- 'timestamp': t,
107
- 'value': v
108
- }
109
- ]
110
- )
111
- end
112
- end
113
-
114
- end
115
- end
116
- nil
117
- end
118
-
119
- def response #{{{
120
- ### save events for later replay
121
- # a = {
122
- # :topic => @p[1].value,
123
- # :event_name => @p[2].value,
124
- # :instancenr => @h['CPEE_INSTANCE'].split('/').last,
125
- # :notification => JSON.parse(@p[3].value)
126
- # }.to_yaml
127
- # File.open('events.yaml','a') do |f|
128
- # f << a
129
- # end
130
- topic = @p[1].value
131
- event_name = @p[2].value
132
- instancenr = @h['CPEE_INSTANCE'].split('/').last
133
- notification = JSON.parse(@p[3].value)
134
- doc topic, event_name, instancenr, notification
135
- end #}}}
136
- end
@@ -1,27 +0,0 @@
1
- <declaration xmlns="http://riddl.org/ns/declaration/1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
2
- <interface name="events">
3
- <xi:include href="http://www.riddl.org/ns/common-patterns/notifications-consumer/1.0/consumer.xml"/>
4
- </interface>
5
- <interface name="cpee" location="http://cpee.org:9298">
6
- <xi:include href="http://cpee.org:9298/?riddl-description"/>
7
- </interface>
8
- <interface name="logoverlay">
9
- <xi:include href="logoverlay.xml"/>
10
- </interface>
11
-
12
- <facade>
13
- <tile>
14
- <layer name="cpee"/>
15
- </tile>
16
- <tile>
17
- <layer name="events">
18
- <apply-to>/log</apply-to>
19
- </layer>
20
- </tile>
21
- <tile>
22
- <layer name="logoverlay">
23
- <apply-to>/chain</apply-to>
24
- </layer>
25
- </tile>
26
- </facade>
27
- </declaration>
@@ -1,15 +0,0 @@
1
- #!/usr/bin/ruby
2
- require_relative 'elasticsearch_logging'
3
-
4
-
5
- Riddl::Server.new(File.join(__dir__,'/log.xml'), :host => 'localhost', :port => 9307) do
6
- accessible_description true
7
- cross_site_xhr true
8
- @riddl_opts[:template] ||= File.join(__dir__,'template.xes_yaml')
9
- @riddl_opts[:esc] = Elasticsearch::Client.new hosts: ['localhost:8400']
10
-
11
-
12
- interface 'events' do
13
- run Logging, @riddl_opts[:esc], @riddl_opts[:template] if post 'event'
14
- end
15
- end.loop!
@@ -1,377 +0,0 @@
1
- require 'pp'
2
- require 'time'
3
- require 'digest'
4
-
5
- require 'json'
6
- require 'yaml'
7
- require 'riddl/server'
8
- require 'faraday'
9
- require 'elasticsearch'
10
-
11
- class Logging < Riddl::Implementation
12
- def doc(topic, event_name, esc, template, instancenr, notification)
13
- # DEBUG: del pp
14
- pp "---"
15
- pp "---"
16
- pp "#{topic}/#{event_name}"
17
- pp instancenr
18
- pp "---"
19
- pp notification.to_yaml
20
- pp "---"
21
- pp "---"
22
- uuid = notification['instance_uuid']
23
- return unless uuid
24
-
25
- # activity = notification['activity']
26
- # parameters = notification['parameters']
27
- # receiving = notification['received']
28
- # attributes = notification['attributes']
29
-
30
- unless esc.indices.exists? index: 'artefacts' #{{{
31
- esc.indices.create index: 'artefacts', body: {
32
- "mappings" => {
33
- "entry" => {
34
- "properties" => {
35
- "group" => {
36
- "type" => "keyword"
37
- },
38
- "name" => {
39
- "type" => "keyword"
40
- }
41
- }
42
- }
43
- }
44
- }
45
- end #}}}
46
-
47
- unless esc.indices.exists? index: 'instances' #{{{
48
- esc.indices.create index: 'instances', body: {
49
- "mappings" => {
50
- "entry" => {
51
- "properties" => {
52
- "uuid" => {
53
- "type" => "text"
54
- },
55
- "group" => {
56
- "type" => "keyword"
57
- },
58
- "name" => {
59
- "type" => "keyword"
60
- },
61
- "date": {
62
- "type": "date",
63
- "format": "date_time_no_millis"
64
- },
65
- "info": {
66
- "type": "keyword"
67
- }
68
- }
69
- }
70
- }
71
- }
72
- end #}}}
73
-
74
- unless esc.indices.exists? index: 'spawned' #{{{
75
- esc.indices.create index: 'spawned', body: {
76
- "mappings" => {
77
- "entry" => {
78
- "properties" => {
79
- "uuid" => {
80
- "type" => "text"
81
- },
82
- "spawned_uuid" => {
83
- "type" => "text"
84
- },
85
- "date": {
86
- "type": "date",
87
- "format": "date_time_no_millis"
88
- }
89
- }
90
- }
91
- }
92
- }
93
- end #}}}
94
-
95
- unless esc.indices.exists? index: 'sensors' #{{{
96
- esc.indices.create index: 'sensors', body: {
97
- "mappings" => {
98
- "entry" => {
99
- "properties" => {
100
- "uuid" => {
101
- "type" => "text"
102
- },
103
- "sensor" => {
104
- "type" => "keyword"
105
- },
106
- "task" => {
107
- "type" => "keyword"
108
- },
109
- "visualizer_url" => {
110
- "type" => "text"
111
- },
112
- "visualizer_params" => {
113
- "type" => "nested"
114
- }
115
- }
116
- }
117
- }
118
- }
119
- end #}}}
120
-
121
- unless esc.indices.exists? index: 'values' #{{{
122
- esc.indices.create index: 'values', body: {
123
- "mappings" => {
124
- "entry" => {
125
- "properties" => {
126
- "uuid" => {
127
- "type" => "keyword"
128
- },
129
- "sensor" => {
130
- "type" => "keyword"
131
- },
132
- "task" => {
133
- "type" => "keyword"
134
- },
135
- "timestamp": {
136
- "type": "date",
137
- "format": "date_time"
138
- },
139
- "value" => {
140
- "type" => "text",
141
- "fields" => {
142
- "value_f" => {
143
- "type" => "float",
144
- "store" => true
145
- },
146
- "value_l" => {
147
- "type" => "long",
148
- "store" => true
149
- }
150
- }
151
- }
152
- }
153
- }
154
- }
155
- }
156
- end #}}}
157
-
158
- unless esc.indices.exists? index: 'test_values' #{{{
159
- esc.indices.create index: 'test_values', body: {
160
- "mappings" => {
161
- "entry" => {
162
- "properties" => {
163
- "uuid" => {
164
- "type" => "keyword"
165
- },
166
- "sensor" => {
167
- "type" => "keyword"
168
- },
169
- "task" => {
170
- "type" => "keyword"
171
- },
172
- "timestamp": {
173
- "type": "date",
174
- "format": "date_time"
175
- },
176
- "value" => {
177
- "type" => "object"
178
- }
179
- }
180
- }
181
- }
182
- }
183
- end #}}}
184
-
185
- uuid = notification.dig('instance_uuid')
186
-
187
- if notification.dig('attributes','artefacts') #{{{
188
- artefacts = JSON.parse(notification.dig('attributes','artefacts'))
189
-
190
- artefacts.each do |a|
191
- aid = Digest::MD5.hexdigest(a['group'] + '_' + a['name'])
192
- iid = Digest::MD5.hexdigest(a['group'] + '_' + a['name'] + '_' + uuid)
193
- esc.index index: 'artefacts', type: 'entry', id: aid, body: a
194
- esc.index index: 'instances', type: 'entry', id: iid, body: {
195
- 'uuid': uuid,
196
- 'group': a['group'],
197
- 'name': a['name'],
198
- 'date': Time.now.iso8601,
199
- 'info': notification.dig('attributes','info')
200
- }
201
- end
202
- end #}}}
203
-
204
- # DEBUG:
205
- # pp notification
206
- case "#{topic}/#{event_name}"
207
- when "dataelements/change", "endpoints/change"
208
- sensors = JSON.parse(notification.dig('attributes', 'sensors') || '[]')
209
- sensors.each do |s|
210
- sid = Digest::MD5.hexdigest(uuid + '_' + s['name'])
211
- esc.index index: 'sensors', type: 'entry', id: sid, body: {
212
- 'uuid': uuid,
213
- 'sensor': s['name'],
214
- 'visualizer_url': s['visualizer_url'],
215
- 'visualizer_params': [s['visualizer_params']]
216
- }
217
- esc.index index: 'values', type: 'entry', body: {
218
- 'uuid': uuid,
219
- 'sensor': s['name'],
220
- 'timestamp': notification.dig('timestamp'),
221
- 'value': s['value']
222
- }
223
- end
224
-
225
- when "activity/receiving"
226
- sensors = JSON.parse(notification.dig('sensors') || '[]')
227
- # tdoc = notification.dig('received')
228
- tdoc = notification
229
- # DEBUG:
230
- # pp notification
231
-
232
- sensors.each do |s|
233
- sid = Digest::MD5.hexdigest(uuid + '_' + s['name'])
234
- esc.index index: 'sensors', type: 'entry', id: sid, body: {
235
- 'uuid': uuid,
236
- 'sensor': s['name'],
237
- 'task': notification.dig('activity'),
238
- 'visualizer_url': s['visualizer_url'],
239
- 'visualizer_params': (s['visualizer_params'].nil? || s['visualizer_params'].empty? ? [] : [s['visualizer_params']])
240
- }
241
- status, result = Riddl::Client.new(s['extractor_url']).post [
242
- Riddl::Parameter::Simple.new('data', JSON.pretty_generate(tdoc)),
243
- Riddl::Parameter::Simple.new('what', s['extractor_arg'])
244
- ]
245
-
246
- if status >= 200 && status < 300
247
- # ret = JSON::parse(result[0]&.value.read) rescue []
248
- ret = JSON.parse(result[0]&.value.read) rescue []
249
- ret.each do |v, t|
250
- esc.index index: 'values', type: 'entry', body: {
251
- 'uuid': uuid,
252
- 'sensor': s['name'],
253
- # REVIEW: Why generate the timestamp in the PHP extractor?
254
- # 'timestamp': "#{t}",
255
- # 'timestamp': notification.dig('timestamp'),
256
- 'timestamp': t,
257
- 'value': v
258
- }
259
- end
260
- end
261
- end
262
-
263
- when "activity/calling"
264
- sid = Digest::MD5.hexdigest(uuid + '_' + "start_task")
265
- esc.index index: 'sensors', type: 'entry', id: sid, body: {
266
- 'uuid': uuid,
267
- 'sensor': "start_task",
268
- 'task': "#{notification.dig('activity')}/#{notification.dig('label')}",
269
- # 'visualizer_url': '',
270
- # 'visualizer_params': ''
271
- }
272
- esc.index index: 'test_values', type: 'entry', body: {
273
- 'uuid': uuid,
274
- 'sensor': "start_task",
275
- 'timestamp': notification.dig('timestamp'),
276
- 'value': {
277
- 'id': notification.dig('activity'),
278
- 'name': notification.dig('label'),
279
- 'uuid': uuid,
280
- 'instance': instancenr
281
- }
282
- }
283
-
284
- when "activity/done"
285
- sid = Digest::MD5.hexdigest(uuid + '_' + "end_task")
286
- esc.index index: 'sensors', type: 'entry', id: sid, body: {
287
- 'uuid': uuid,
288
- 'sensor': "end_task",
289
- 'task': "#{notification.dig('activity')}/#{notification.dig('label')}",
290
- # 'visualizer_url': '',
291
- # 'visualizer_params': ''
292
- }
293
- esc.index index: 'test_values', type: 'entry', body: {
294
- 'uuid': uuid,
295
- 'sensor': "end_task",
296
- 'timestamp': notification.dig('timestamp'),
297
- 'value': {
298
- 'id': notification.dig('activity'),
299
- 'name': notification.dig('label'),
300
- 'uuid': uuid,
301
- 'instance': instancenr
302
- }
303
- }
304
-
305
- when "task/instantiation"
306
- sid = Digest::MD5.hexdigest(uuid + '_' + "sub_task")
307
- esc.index index: 'sensors', type: 'entry', id: sid, body: {
308
- 'uuid': uuid,
309
- 'sensor': 'sub_task',
310
- 'task': "#{notification.dig('activity')}/#{notification.dig('label')}"
311
- # 'visualizer_url': '',
312
- # 'visualizer_params': ''
313
- }
314
- esc.index index: 'test_values', type: 'entry', body: {
315
- # 'uuid': notification.dig('received', 'CPEE-INSTANCE-UUID'),
316
- 'uuid': uuid,
317
- 'sensor': 'sub_task',
318
- 'timestamp': notification.dig('timestamp'),
319
- 'value': {
320
- # 'child_uuid': notification.dig('received', 'data', 'CPEE-INSTANCE-UUID'),
321
- # 'child_instance': notification.dig('received', 'data', 'CPEE-INSTANCE')
322
- 'id': notification.dig('activity'),
323
- 'name': notification.dig('label'),
324
- 'uuid': uuid,
325
- 'instance': instancenr,
326
- 'child_uuid': notification.dig('received', 'CPEE-INSTANCE-UUID'),
327
- 'child_instance': notification.dig('received', 'CPEE-INSTANCE')
328
- }
329
- }
330
- sid = Digest::MD5.hexdigest(uuid + '_' + "sub_task")
331
- esc.index index: 'sensors', type: 'entry', id: sid, body: {
332
- 'uuid': notification.dig('received', 'CPEE-INSTANCE-UUID'),
333
- 'sensor': 'sub_task',
334
- 'task': "#{notification.dig('activity')}/#{notification.dig('label')}"
335
- # 'visualizer_url': '',
336
- # 'visualizer_params': ''
337
- }
338
- esc.index index: 'test_values', type: 'entry', body: {
339
- # 'uuid': notification.dig('received', 'CPEE-INSTANCE-UUID'),
340
- 'uuid': notification.dig('received', 'CPEE-INSTANCE-UUID'),
341
- 'sensor': 'sub_task',
342
- 'timestamp': notification.dig('timestamp'),
343
- 'value': {
344
- # 'child_uuid': notification.dig('received', 'data', 'CPEE-INSTANCE-UUID'),
345
- # 'child_instance': notification.dig('received', 'data', 'CPEE-INSTANCE')
346
- 'uuid': notification.dig('received', 'CPEE-INSTANCE-UUID'),
347
- 'instance': notification.dig('received', 'CPEE-INSTANCE'),
348
- 'parent_id': notification.dig('activity'),
349
- 'parent_name': notification.dig('label'),
350
- 'parent_uuid': uuid,
351
- 'parent_instance': instancenr
352
- }
353
- }
354
- end
355
- nil
356
- end
357
-
358
- def response #{{{
359
- ### save events for later replay
360
- # a = {
361
- # :topic => @p[1].value,
362
- # :event_name => @p[2].value,
363
- # :instancenr => @h['CPEE_INSTANCE'].split('/').last,
364
- # :notification => JSON.parse(@p[3].value)
365
- # }.to_yaml
366
- # File.open('events.yaml','a') do |f|
367
- # f << a
368
- # end
369
- topic = @p[1].value
370
- event_name = @p[2].value
371
- esc = @a[0]
372
- template = @a[1]
373
- instancenr = @h['CPEE_INSTANCE'].split('/').last
374
- notification = JSON.parse(@p[3].value)
375
- doc topic, event_name, esc, template, instancenr, notification
376
- end #}}}
377
- end