cpee 1.5.27 → 2.0.5

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/routing/end.rb +44 -0
  216. data/server/routing/forward-events.rb +59 -0
  217. data/server/routing/forward-votes.rb +108 -0
  218. data/server/routing/persist.rb +155 -0
  219. data/server/server.rb +1 -0
  220. data/tools/cpee +46 -16
  221. data/tools/instantiation/instantiation +0 -1
  222. data/tools/server/server.rb +0 -1
  223. metadata +78 -133
  224. data/INSTALL +0 -23
  225. data/cockpit/templates/convert_preset.rb +0 -32
  226. data/cockpit/templates/testsets.xml +0 -11
  227. data/cockpit/templates/transformations.xml +0 -4
  228. data/cockpit/themes/compact/rngs/alternative.rng +0 -1
  229. data/cockpit/themes/compact/rngs/choose.rng +0 -1
  230. data/cockpit/themes/compact/rngs/critical.rng +0 -1
  231. data/cockpit/themes/compact/rngs/escape.rng +0 -1
  232. data/cockpit/themes/compact/rngs/group.rng +0 -1
  233. data/cockpit/themes/compact/rngs/loop.rng +0 -1
  234. data/cockpit/themes/compact/rngs/manipulate.rng +0 -1
  235. data/cockpit/themes/compact/rngs/otherwise.rng +0 -1
  236. data/cockpit/themes/compact/rngs/parallel.rng +0 -1
  237. data/cockpit/themes/compact/rngs/parallel_branch.rng +0 -1
  238. data/cockpit/themes/compact/rngs/stop.rng +0 -1
  239. data/cockpit/themes/compact/rngs/terminate.rng +0 -1
  240. data/cockpit/themes/default/rngs/finalize.rng +0 -6
  241. data/cockpit/themes/default/rngs/update.rng +0 -6
  242. data/cockpit/themes/default/theme.js +0 -1286
  243. data/cockpit/themes/extended/rngs/alternative.rng +0 -1
  244. data/cockpit/themes/extended/rngs/choose.rng +0 -1
  245. data/cockpit/themes/extended/rngs/critical.rng +0 -1
  246. data/cockpit/themes/extended/rngs/escape.rng +0 -1
  247. data/cockpit/themes/extended/rngs/group.rng +0 -1
  248. data/cockpit/themes/extended/rngs/loop.rng +0 -1
  249. data/cockpit/themes/extended/rngs/manipulate.rng +0 -1
  250. data/cockpit/themes/extended/rngs/otherwise.rng +0 -1
  251. data/cockpit/themes/extended/rngs/parallel.rng +0 -1
  252. data/cockpit/themes/extended/rngs/parallel_branch.rng +0 -1
  253. data/cockpit/themes/extended/rngs/stop.rng +0 -1
  254. data/cockpit/themes/extended/rngs/terminate.rng +0 -1
  255. data/cockpit/themes/labels/rngs/alternative.rng +0 -25
  256. data/cockpit/themes/labels/rngs/call.rng +0 -81
  257. data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -101
  258. data/cockpit/themes/labels/rngs/choose.rng +0 -12
  259. data/cockpit/themes/labels/rngs/critical.rng +0 -5
  260. data/cockpit/themes/labels/rngs/escape.rng +0 -1
  261. data/cockpit/themes/labels/rngs/finalize.rng +0 -6
  262. data/cockpit/themes/labels/rngs/group.rng +0 -3
  263. data/cockpit/themes/labels/rngs/loop.rng +0 -22
  264. data/cockpit/themes/labels/rngs/manipulate.rng +0 -9
  265. data/cockpit/themes/labels/rngs/otherwise.rng +0 -22
  266. data/cockpit/themes/labels/rngs/parallel.rng +0 -13
  267. data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
  268. data/cockpit/themes/labels/rngs/stop.rng +0 -5
  269. data/cockpit/themes/labels/rngs/terminate.rng +0 -1
  270. data/cockpit/themes/labels/rngs/update.rng +0 -6
  271. data/cockpit/themes/labels/symbols/alternative.svg +0 -5
  272. data/cockpit/themes/labels/symbols/arrow.svg +0 -3
  273. data/cockpit/themes/labels/symbols/call.svg +0 -6
  274. data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -8
  275. data/cockpit/themes/labels/symbols/choose.svg +0 -5
  276. data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
  277. data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
  278. data/cockpit/themes/labels/symbols/complex.svg +0 -8
  279. data/cockpit/themes/labels/symbols/critical.svg +0 -4
  280. data/cockpit/themes/labels/symbols/end.svg +0 -3
  281. data/cockpit/themes/labels/symbols/escape.svg +0 -5
  282. data/cockpit/themes/labels/symbols/event_end.svg +0 -3
  283. data/cockpit/themes/labels/symbols/loop.svg +0 -5
  284. data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
  285. data/cockpit/themes/labels/symbols/otherwise.svg +0 -5
  286. data/cockpit/themes/labels/symbols/parallel.svg +0 -5
  287. data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -5
  288. data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +0 -4
  289. data/cockpit/themes/labels/symbols/parallel_branch_event.svg +0 -14
  290. data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +0 -5
  291. data/cockpit/themes/labels/symbols/scripts.svg +0 -4
  292. data/cockpit/themes/labels/symbols/start.svg +0 -3
  293. data/cockpit/themes/labels/symbols/stop.svg +0 -5
  294. data/cockpit/themes/labels/symbols/terminate.svg +0 -4
  295. data/cockpit/themes/packed/rngs/alternative.rng +0 -1
  296. data/cockpit/themes/packed/rngs/choose.rng +0 -1
  297. data/cockpit/themes/packed/rngs/critical.rng +0 -1
  298. data/cockpit/themes/packed/rngs/escape.rng +0 -1
  299. data/cockpit/themes/packed/rngs/group.rng +0 -1
  300. data/cockpit/themes/packed/rngs/loop.rng +0 -1
  301. data/cockpit/themes/packed/rngs/manipulate.rng +0 -1
  302. data/cockpit/themes/packed/rngs/otherwise.rng +0 -1
  303. data/cockpit/themes/packed/rngs/parallel.rng +0 -1
  304. data/cockpit/themes/packed/rngs/parallel_branch.rng +0 -1
  305. data/cockpit/themes/packed/rngs/stop.rng +0 -1
  306. data/cockpit/themes/packed/rngs/terminate.rng +0 -1
  307. data/cockpit/themes/preset/rngs/alternative.rng +0 -1
  308. data/cockpit/themes/preset/rngs/choose.rng +0 -1
  309. data/cockpit/themes/preset/rngs/critical.rng +0 -1
  310. data/cockpit/themes/preset/rngs/escape.rng +0 -1
  311. data/cockpit/themes/preset/rngs/group.rng +0 -1
  312. data/cockpit/themes/preset/rngs/loop.rng +0 -1
  313. data/cockpit/themes/preset/rngs/manipulate.rng +0 -1
  314. data/cockpit/themes/preset/rngs/otherwise.rng +0 -1
  315. data/cockpit/themes/preset/rngs/parallel.rng +0 -1
  316. data/cockpit/themes/preset/rngs/parallel_branch.rng +0 -1
  317. data/cockpit/themes/preset/rngs/stop.rng +0 -1
  318. data/cockpit/themes/preset/rngs/terminate.rng +0 -1
  319. data/lib/cpee/empty_workflow.rb +0 -28
  320. data/lib/cpee/handler_notifications.rb +0 -47
  321. data/lib/cpee/handler_properties.rb +0 -50
  322. data/lib/cpee/instantiation.rb +0 -369
  323. data/lib/cpee/processtransformation/bpel/Repository/booking.bpel +0 -125
  324. data/lib/cpee/processtransformation/bpel/Repository/booking.wsdl +0 -72
  325. data/lib/cpee/processtransformation/bpel/Repository/booking/airline.wsdl +0 -71
  326. data/lib/cpee/processtransformation/bpel/Repository/booking/hotel.wsdl +0 -64
  327. data/lib/cpee/processtransformation/bpel/Repository/booking/report.wsdl +0 -71
  328. data/lib/cpee/processtransformation/bpel/bpel2wee.rb +0 -34
  329. data/lib/cpee/processtransformation/bpel/bpelserver.ru +0 -64
  330. data/lib/cpee/processtransformation/bpel/bpelserver.xml +0 -70
  331. data/lib/cpee/processtransformation/bpel/lib/BPEL_Transform.rb +0 -367
  332. data/lib/cpee/processtransformation/bpmn2.rb +0 -297
  333. data/lib/cpee/processtransformation/cpee.rb +0 -119
  334. data/lib/cpee/processtransformation/structures.rb +0 -465
  335. data/lib/cpee/processtransformation/target.rb +0 -50
  336. data/log/azure.rb +0 -10
  337. data/log/azure_logger.rb +0 -136
  338. data/log/chain.xml +0 -27
  339. data/log/elasticsearch.rb +0 -15
  340. data/log/elasticsearch_logging.rb +0 -377
  341. data/log/legacy/test_es.rb +0 -26
  342. data/log/legacy/test_split.rb +0 -211
  343. data/log/log.xml +0 -13
  344. data/log/non_tamp.rb +0 -156
  345. data/log/sic.rb +0 -64
  346. data/log/template.xes_xml +0 -23
  347. data/log/template.xes_yaml +0 -28
  348. data/log/trace.yaml +0 -17717
  349. data/log/trace_sic.yaml +0 -18343
  350. data/log/xes_xml.rb +0 -121
  351. data/log/xes_yaml.rb +0 -96
  352. data/server/handlerwrappers/soap.rb +0 -146
  353. data/server/resources/properties.schema.active +0 -139
  354. data/server/resources/properties.schema.finished +0 -139
  355. data/server/resources/properties.schema.inactive +0 -136
  356. data/server/transformation_dslx.xsl +0 -790
  357. data/test/callback.rb +0 -9
@@ -0,0 +1,26 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="arbitrary" combine="choice">
3
+ <zeroOrMore>
4
+ <choice>
5
+ <text/>
6
+ <ref name="any"/>
7
+ </choice>
8
+ </zeroOrMore>
9
+ </define>
10
+ <define name="any" combine="choice">
11
+ <element>
12
+ <anyName/>
13
+ <zeroOrMore>
14
+ <attribute>
15
+ <anyName/>
16
+ </attribute>
17
+ </zeroOrMore>
18
+ <zeroOrMore>
19
+ <choice>
20
+ <text/>
21
+ <ref name="any"/>
22
+ </choice>
23
+ </zeroOrMore>
24
+ </element>
25
+ </define>
26
+ </grammar>
@@ -0,0 +1,10 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="simple.rng"/>
3
+ <define name="attributes">
4
+ <element name="attributes" ns="http://cpee.org/ns/properties/2.0">
5
+ <zeroOrMore>
6
+ <ref name="simple"/>
7
+ </zeroOrMore>
8
+ </element>
9
+ </define>
10
+ </grammar>
@@ -0,0 +1,10 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="simple.rng"/>
3
+ <define name="dataelements">
4
+ <element name="dataelements" ns="http://cpee.org/ns/properties/2.0">
5
+ <zeroOrMore>
6
+ <ref name="simple"/>
7
+ </zeroOrMore>
8
+ </element>
9
+ </define>
10
+ </grammar>
@@ -0,0 +1,8 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="arbitrary.rng"/>
3
+ <define name="description">
4
+ <element name="description" ns="http://cpee.org/ns/properties/2.0">
5
+ <ref name="arbitrary"/>
6
+ </element>
7
+ </define>
8
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="dsl">
3
+ <element name="dsl" ns="http://cpee.org/ns/properties/2.0">
4
+ <text/>
5
+ </element>
6
+ </define>
7
+ </grammar>
@@ -0,0 +1,8 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="arbitrary.rng"/>
3
+ <define name="dslx">
4
+ <element name="dslx" ns="http://cpee.org/ns/properties/2.0">
5
+ <ref name="arbitrary"/>
6
+ </element>
7
+ </define>
8
+ </grammar>
@@ -0,0 +1,10 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="simple.rng"/>
3
+ <define name="endpoints">
4
+ <element name="endpoints" ns="http://cpee.org/ns/properties/2.0">
5
+ <zeroOrMore>
6
+ <ref name="simple"/>
7
+ </zeroOrMore>
8
+ </element>
9
+ </define>
10
+ </grammar>
@@ -0,0 +1,9 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="handlerwrapper">
3
+ <element name="handlerwrapper" ns="http://cpee.org/ns/properties/2.0">
4
+ <data type="string">
5
+ <param name="pattern">[A-Z][a-zA-Z]*</param>
6
+ </data>
7
+ </element>
8
+ </define>
9
+ </grammar>
@@ -0,0 +1,15 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="position">
3
+ <element ns="http://cpee.org/ns/properties/2.0">
4
+ <anyName/>
5
+ <optional>
6
+ <attribute name="passthrough">
7
+ <data type="string"/>
8
+ </attribute>
9
+ </optional>
10
+ <data type="string">
11
+ <param name="pattern">(at|after)</param>
12
+ </data>
13
+ </element>
14
+ </define>
15
+ </grammar>
@@ -0,0 +1,10 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="position.rng"/>
3
+ <define name="positions">
4
+ <element name="positions" ns="http://cpee.org/ns/properties/2.0">
5
+ <zeroOrMore>
6
+ <ref name="position"/>
7
+ </zeroOrMore>
8
+ </element>
9
+ </define>
10
+ </grammar>
@@ -0,0 +1,29 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="state.rng"/>
3
+ <include href="status.rng"/>
4
+ <include href="handlerwrapper.rng"/>
5
+ <include href="positions.rng"/>
6
+ <include href="dataelements.rng"/>
7
+ <include href="endpoints.rng"/>
8
+ <include href="attributes.rng"/>
9
+ <include href="dsl.rng"/>
10
+ <include href="dslx.rng"/>
11
+ <include href="description.rng"/>
12
+ <include href="transformation.rng"/>
13
+
14
+ <start>
15
+ <element name="properties" ns="http://cpee.org/ns/properties/2.0">
16
+ <ref name="state"/>
17
+ <ref name="status"/>
18
+ <ref name="handlerwrapper"/>
19
+ <ref name="positions"/>
20
+ <ref name="dataelements"/>
21
+ <ref name="endpoints"/>
22
+ <ref name="attributes"/>
23
+ <ref name="dsl"/>
24
+ <ref name="dslx"/>
25
+ <ref name="description"/>
26
+ <ref name="transformation"/>
27
+ </element>
28
+ </start>
29
+ </grammar>
@@ -0,0 +1,25 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="state.rng"/>
3
+ <include href="status.rng"/>
4
+ <include href="handlerwrapper.rng"/>
5
+ <include href="positions.rng"/>
6
+ <include href="dataelements.rng"/>
7
+ <include href="endpoints.rng"/>
8
+ <include href="attributes.rng"/>
9
+ <include href="description.rng"/>
10
+ <include href="transformation.rng"/>
11
+
12
+ <start>
13
+ <element name="properties" ns="http://cpee.org/ns/properties/2.0">
14
+ <ref name="set-state"/>
15
+ <ref name="status"/>
16
+ <ref name="handlerwrapper"/>
17
+ <ref name="positions"/>
18
+ <ref name="dataelements"/>
19
+ <ref name="endpoints"/>
20
+ <ref name="attributes"/>
21
+ <ref name="description"/>
22
+ <ref name="transformation"/>
23
+ </element>
24
+ </start>
25
+ </grammar>
@@ -0,0 +1,45 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="state.rng"/>
3
+ <include href="status.rng"/>
4
+ <include href="handlerwrapper.rng"/>
5
+ <include href="positions.rng"/>
6
+ <include href="dataelements.rng"/>
7
+ <include href="endpoints.rng"/>
8
+ <include href="attributes.rng"/>
9
+ <include href="description.rng"/>
10
+ <include href="transformation.rng"/>
11
+
12
+ <start>
13
+ <element name="properties" ns="http://cpee.org/ns/properties/2.0">
14
+ <interleave>
15
+ <optional>
16
+ <ref name="set-state"/>
17
+ </optional>
18
+ <optional>
19
+ <ref name="status"/>
20
+ </optional>
21
+ <optional>
22
+ <ref name="handlerwrapper"/>
23
+ </optional>
24
+ <optional>
25
+ <ref name="positions"/>
26
+ </optional>
27
+ <optional>
28
+ <ref name="dataelements"/>
29
+ </optional>
30
+ <optional>
31
+ <ref name="endpoints"/>
32
+ </optional>
33
+ <optional>
34
+ <ref name="attributes"/>
35
+ </optional>
36
+ <optional>
37
+ <ref name="description"/>
38
+ </optional>
39
+ <optional>
40
+ <ref name="transformation"/>
41
+ </optional>
42
+ </interleave>
43
+ </element>
44
+ </start>
45
+ </grammar>
@@ -0,0 +1,8 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="simple" combine="choice">
3
+ <element ns="http://cpee.org/ns/properties/2.0">
4
+ <anyName/>
5
+ <text/>
6
+ </element>
7
+ </define>
8
+ </grammar>
@@ -0,0 +1,33 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="state">
3
+ <element name="state" ns="http://cpee.org/ns/properties/2.0">
4
+ <attribute name="changed">
5
+ <data type="dateTime"/>
6
+ </attribute>
7
+ <choice>
8
+ <value>ready</value>
9
+ <value>running</value>
10
+ <value>simulating</value>
11
+ <value>replaying</value>
12
+ <value>stopping</value>
13
+ <value>stopped</value>
14
+ <value>abandoned</value>
15
+ <value>finished</value>
16
+ </choice>
17
+ </element>
18
+ </define>
19
+ <define name="set-state">
20
+ <element name="state" ns="http://cpee.org/ns/properties/2.0">
21
+ <choice>
22
+ <value>ready</value>
23
+ <value>running</value>
24
+ <value>simulating</value>
25
+ <value>replaying</value>
26
+ <value>stopping</value>
27
+ <value>stopped</value>
28
+ <value>abandoned</value>
29
+ <value>finished</value>
30
+ </choice>
31
+ </element>
32
+ </define>
33
+ </grammar>
@@ -0,0 +1,12 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="status">
3
+ <element name="status" ns="http://cpee.org/ns/properties/2.0">
4
+ <element name="id">
5
+ <data type="integer"/>
6
+ </element>
7
+ <element name="message">
8
+ <data type="string"/>
9
+ </element>
10
+ </element>
11
+ </define>
12
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="attributes.rng"/>
3
+
4
+ <start>
5
+ <ref name="attributes"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="dataelements.rng"/>
3
+
4
+ <start>
5
+ <ref name="dataelements"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="endpoints.rng"/>
3
+
4
+ <start>
5
+ <ref name="endpoints"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="position.rng"/>
3
+
4
+ <start>
5
+ <ref name="position"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="positions.rng"/>
3
+
4
+ <start>
5
+ <ref name="positions"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="simple.rng"/>
3
+
4
+ <start>
5
+ <ref name="simple"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="status.rng"/>
3
+
4
+ <start>
5
+ <ref name="status"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,7 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <include href="transformation.rng"/>
3
+
4
+ <start>
5
+ <ref name="transformation"/>
6
+ </start>
7
+ </grammar>
@@ -0,0 +1,40 @@
1
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
+ <define name="transformation">
3
+ <element name="transformation" ns="http://cpee.org/ns/properties/2.0">
4
+ <element name="description">
5
+ <attribute name="type">
6
+ <choice>
7
+ <value>copy</value>
8
+ <value>rest</value>
9
+ <value>xslt</value>
10
+ <value>clean</value>
11
+ <value>none</value>
12
+ </choice>
13
+ </attribute>
14
+ <data type="anyURI"/>
15
+ </element>
16
+ <element name="dataelements">
17
+ <attribute name="type">
18
+ <choice>
19
+ <value>rest</value>
20
+ <value>xslt</value>
21
+ <value>clean</value>
22
+ <value>none</value>
23
+ </choice>
24
+ </attribute>
25
+ <data type="anyURI"/>
26
+ </element>
27
+ <element name="endpoints">
28
+ <attribute name="type">
29
+ <choice>
30
+ <value>rest</value>
31
+ <value>xslt</value>
32
+ <value>clean</value>
33
+ <value>none</value>
34
+ </choice>
35
+ </attribute>
36
+ <data type="anyURI"/>
37
+ </element>
38
+ </element>
39
+ </define>
40
+ </grammar>
@@ -28,6 +28,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../lib/cpee/implementation')
28
28
  Riddl::Server.new(CPEE::SERVER, :port => 8298) do |opts|
29
29
  accessible_description true
30
30
  cross_site_xhr true
31
+ opts[:watchdog_start_off] true
31
32
 
32
33
  use CPEE::implementation(opts)
33
34
  end.loop!
@@ -13,26 +13,35 @@
13
13
  # <http://www.gnu.org/licenses/>.
14
14
 
15
15
  class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
16
+ def self::loop_guard(arguments,id,count) # {{{
17
+ controller = arguments[0]
18
+ tsn = Time.now
19
+ tso = controller.loop_guard[id][:timestamp] rescue Time.now
20
+ controller.loop_guard[id] = { :count => count, :timestamp => tsn }
21
+ # if we have more than 100 loop iterations and the last one took less than 2 seconds, we slow the hell down
22
+ tso + 2 > tsn && count > 100
23
+ end # }}}
24
+
25
+ def self::inform_state_change(arguments,newstate) # {{{
26
+ controller = arguments[0]
27
+ controller.notify("state/change", :state => newstate, :timestamp => Time.now.xmlschema(3))
28
+ end # }}}
16
29
  def self::inform_state_change(arguments,newstate) # {{{
17
30
  controller = arguments[0]
18
- controller.serialize_state!
19
- controller.notify("state/change", :instance => controller.instance, :instance_uuid => controller.uuid, :state => newstate, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => controller.attributes_translated)
20
- controller.finalize_if_finished
31
+ controller.notify("state/change", :state => newstate, :timestamp => Time.now.xmlschema(3))
21
32
  end # }}}
22
33
  def self::inform_syntax_error(arguments,err,code)# {{{
23
34
  controller = arguments[0]
24
- controller.notify("description/error", :instance => controller.instance, :instance_uuid => controller.uuid, :message => err.message, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
35
+ controller.notify("description/error", :message => err.message)
25
36
  end# }}}
26
37
  def self::inform_handlerwrapper_error(arguments,err) # {{{
27
38
  controller = arguments[0]
28
- controller.notify("handlerwrapper/error", :instance => controller.instance, :instance_uuid => controller.uuid, :message => err.message, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
39
+ p err.message
40
+ p err.backtrace
41
+ controller.notify("handlerwrapper/error", :message => err.message)
29
42
  end # }}}
30
43
  def self::inform_position_change(arguments,ipc={}) # {{{
31
44
  controller = arguments[0]
32
- controller.serialize_positions!
33
- ipc[:instance] = controller.instance
34
- ipc[:instance_uuid] = controller.uuid
35
- ipc[:timestamp] = Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z")
36
45
  controller.notify("position/change", ipc)
37
46
  end # }}}
38
47
 
@@ -65,10 +74,6 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
65
74
  params
66
75
  end #}}}
67
76
 
68
- def additional
69
- { :attributes => @controller.attributes_translated } rescue {}
70
- end
71
-
72
77
  def proto_curl(parameters) #{{{
73
78
  params = []
74
79
  callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
@@ -91,7 +96,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
91
96
  end
92
97
 
93
98
  params << Riddl::Header.new("CPEE-BASE",@controller.base_url)
94
- params << Riddl::Header.new("CPEE-INSTANCE",@controller.instance)
99
+ params << Riddl::Header.new("CPEE-INSTANCE",@controller.instance_id)
95
100
  params << Riddl::Header.new("CPEE-INSTANCE-URL",@controller.instance_url)
96
101
  params << Riddl::Header.new("CPEE-INSTANCE-UUID",@controller.uuid)
97
102
  params << Riddl::Header.new("CPEE-CALLBACK",@controller.instance_url + '/callbacks/' + callback)
@@ -108,7 +113,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
108
113
 
109
114
  client = Riddl::Client.new(tendpoint)
110
115
 
111
- @controller.callbacks[callback] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
116
+ @controller.callback(self,callback,:activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position)
112
117
  @handler_passthrough = callback
113
118
 
114
119
  status, result, headers = client.request type => params
@@ -119,7 +124,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
119
124
  callback([ Riddl::Parameter::Complex.new('error','application/json',StringIO.new(JSON::generate({ 'status' => status, 'error' => c }))) ], headers)
120
125
  else
121
126
  if headers['CPEE_INSTANTIATION']
122
- @controller.notify("task/instantiation", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
127
+ @controller.notify("task/instantiation", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
123
128
  end
124
129
  if headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.any?
125
130
  headers['CPEE_UPDATE'] = true
@@ -138,11 +143,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
138
143
  @sensors = parameters.dig(:stream,:sensors)
139
144
  @aggregators = parameters.dig(:stream,:aggregators)
140
145
  @costs = parameters.dig(:stream,:costs)
141
- @controller.notify("activity/calling", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :instance_uuid => @controller.uuid, :label => @label, :instance_name => @controller.info, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
146
+ @controller.notify("activity/calling", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
142
147
  if passthrough.to_s.empty?
143
148
  proto_curl parameters
144
149
  else
145
- @controller.callbacks[passthrough] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
150
+ @controller.callback(self,passthrough,:activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position)
146
151
  @handler_passthrough = passthrough
147
152
  end
148
153
  end # }}}
@@ -159,7 +164,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
159
164
 
160
165
  def activity_stop # {{{
161
166
  unless @handler_passthrough.nil?
162
- @controller.callbacks.delete(@handler_passthrough)
167
+ @controller.cancel_callback(@handler_passthrough)
163
168
  end
164
169
  end # }}}
165
170
  def activity_passthrough_value # {{{
@@ -171,36 +176,33 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
171
176
  end # }}}
172
177
 
173
178
  def inform_activity_done # {{{
174
- @controller.notify("activity/done", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
179
+ @controller.notify("activity/done", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
175
180
  end # }}}
176
181
  def inform_activity_manipulate # {{{
177
- @controller.notify("activity/manipulating", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
182
+ @controller.notify("activity/manipulating", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
178
183
  end # }}}
179
184
  def inform_activity_failed(err) # {{{
180
185
  puts err.message
181
186
  puts err.backtrace
182
- @controller.notify("activity/failed", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
187
+ @controller.notify("activity/failed", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
183
188
  end # }}}
184
189
  def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
185
190
  unless status.nil?
186
- @controller.serialize_status!
187
- @controller.notify("status/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :id => status.id, :message => status.message, :attributes => @controller.attributes_translated, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
191
+ @controller.notify("status/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
188
192
  end
189
193
  unless changed_dataelements.nil?
190
- @controller.serialize_dataelements!
191
- @controller.notify("dataelements/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements, :attributes => @controller.attributes_translated, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
194
+ @controller.notify("dataelements/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
192
195
  end
193
196
  unless changed_endpoints.nil?
194
- @controller.serialize_endpoints!
195
- @controller.notify("endpoints/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints, :attributes => @controller.attributes_translated, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
197
+ @controller.notify("endpoints/change", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
196
198
  end
197
199
  end # }}}
198
200
 
199
201
  def vote_sync_after # {{{
200
- @controller.call_vote("activity/syncing_after", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
202
+ @controller.vote("activity/syncing_after", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
201
203
  end # }}}
202
204
  def vote_sync_before(parameters=nil) # {{{
203
- @controller.call_vote("activity/syncing_before", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
205
+ @controller.vote("activity/syncing_before", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
204
206
  end # }}}
205
207
 
206
208
  def simplify_result(result)
@@ -259,17 +261,17 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
259
261
  end
260
262
 
261
263
  def callback(result=nil,options={})
262
- @controller.notify("activity/receiving", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated, :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
264
+ @controller.notify("activity/receiving", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
263
265
  result = simplify_result(result)
264
266
  @handler_returnValue = result
265
267
  @handler_returnOptions = options
266
268
  if options['CPEE_UPDATE']
267
269
  if options['CPEE_UPDATE_STATUS']
268
- @controller.notify("activity/status", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
270
+ @controller.notify("activity/status", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
269
271
  end
270
272
  @handler_continue.continue WEEL::Signal::Again
271
273
  else
272
- @controller.callbacks.delete(@handler_passthrough)
274
+ @controller.cancel_callback(@handler_passthrough)
273
275
  @handler_passthrough = nil
274
276
  if options['CPEE_SALVAGE']
275
277
  @handler_continue.continue WEEL::Signal::Salvage
@@ -281,18 +283,18 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
281
283
 
282
284
  def test_condition(mr,code)
283
285
  res = mr.instance_eval(code)
284
- @controller.notify("condition/eval", :instance => @controller.instance, :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
286
+ @controller.notify("condition/eval", :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"))
285
287
  res
286
288
  end
287
289
 
288
290
  def simulate(type,nesting,tid,parent,parameters={}) #{{{
289
291
  pp "#{type} - #{nesting} - #{tid} - #{parent} - #{parameters.inspect}"
290
292
 
291
- @controller.call_vote("simulating/step",
292
- :endpoint => @handler_endpoint,
293
- :instance => @controller.instance,
294
- :instance_uuid => @controller.uuid,
293
+ @controller.vote("simulating/step",
294
+ :activity_uuid => @handler_activity_uuid,
295
+ :label => @label,
295
296
  :activity => tid,
297
+ :endpoint => @handler_endpoint,
296
298
  :type => type,
297
299
  :nesting => nesting,
298
300
  :parent => parent,