cpee 1.5.25 → 2.0.2

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,119 +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
- require File.expand_path(File.dirname(__FILE__) + '/target')
22
-
23
- module CPEE
24
-
25
- module ProcessTransformation
26
-
27
- module Target
28
-
29
- class CPEE < Default
30
- def generate
31
- res = XML::Smart.string("<description xmlns='http://cpee.org/ns/description/1.0'/>")
32
- res.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
33
- output_to_document res
34
- end
35
-
36
- def print_Break(node,res)
37
- res.add('escape')
38
- end
39
-
40
- def print_Loop(node,res)
41
- if node.sub.length == 2 && node.sub[1].condition.empty? && ((node.sub[1].length == 1 && node.sub[1][0].class.name.gsub(/\w+:+/,'') == 'Break') || node.sub[1].length == 0)
42
- s1 = res.add('loop', 'mode' => 'pre_test', 'condition' => node.sub[0].condition.empty? ? 'true' : node.sub[0].condition.join(' && '))
43
- s1.attributes['language'] = node.sub[0].condition_type unless node.sub[0].condition_type.nil?
44
- node.sub[0].attributes.each do |k,v|
45
- s1.attributes[k] = v
46
- end
47
- generate_for_list(node.sub[0],s1)
48
- else
49
- s1 = res.add('loop', 'mode' => 'pre_test', 'condition' => 'true')
50
- if node.sub.length == 1
51
- generate_for_list(node.sub[0],s1)
52
- else
53
- print_Conditional(node,s1)
54
- end
55
- end
56
- s1
57
- end
58
-
59
- def print_Node(node,res)
60
- if node.endpoints.empty? && !node.script.nil? && node.script.strip != ''
61
- n = res.add('d:manipulate', node.script, 'id' => "a#{node.niceid}")
62
- n.attributes['output'] = node.script_var unless node.script_var.nil?
63
- n.attributes['language'] = node.script_type unless node.script_type.nil?
64
- else
65
- n = res.add('d:call', 'id' => "a#{node.niceid}", 'endpoint' => node.endpoints.join(','))
66
- p = n.add('d:parameters')
67
- p.add('d:label',"\"#{node.label.gsub(/"/,"\\\"")}\"")
68
- p.add('d:method',node.methods.join(',') || 'post')
69
- p.add('d:type',":#{node.type}")
70
- p.add('d:mid',"'#{node.id}'")
71
- par = p.add('d:arguments')
72
- node.parameters.each do |k,v|
73
- par.add(k,v)
74
- end
75
- if !node.script.nil? && node.script.strip != ''
76
- x = n.add('d:finalize',node.script)
77
- x.attributes['output'] = node.script_var unless node.script_var.nil?
78
- x.attributes['language'] = node.script_type unless node.script_type.nil?
79
- end
80
- end
81
- end
82
-
83
- def print_Parallel(node,res)
84
- s1 = res.add('parallel','wait' => node.wait)
85
- node.sub.each do |branch|
86
- s2 = s1.add('parallel_branch')
87
- generate_for_list(branch,s2)
88
- end
89
- s1
90
- end
91
-
92
- def print_Conditional(node,res)
93
- s1 = res.add('d:choose', 'mode' => node.mode)
94
- node.sub.each do |branch|
95
- s2 = if branch.condition.any?
96
- a = s1.add('d:alternative','condition' => branch.condition.join(' or '))
97
- a.attributes['language'] = branch.condition_type unless branch.condition_type.nil?
98
- a
99
- else
100
- s1.add('d:otherwise')
101
- end
102
- branch.attributes.each do |k,v|
103
- s2.attributes[k] = v
104
- end
105
- generate_for_list(branch,s2)
106
- end
107
- if (x = s1.find('d:otherwise')).any?
108
- s1.add x
109
- end
110
- s1
111
- end
112
-
113
- end
114
-
115
- end
116
-
117
- end
118
-
119
- end
@@ -1,465 +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 Container #{{{
26
- def container?
27
- @container || false
28
- end
29
- end #}}}
30
- module Struct #{{{
31
- def each(&a)
32
- @sub.each{|s| a.call(s)}
33
- end
34
- def length
35
- @sub.length
36
- end
37
- end #}}}
38
-
39
- class Node #{{{
40
- include Container
41
- @@niceid = {}
42
- attr_reader :id, :label, :niceid
43
- attr_reader :endpoints, :methods, :parameters, :attributes
44
- attr_accessor :script, :script_id, :script_var, :script_type, :incoming, :outgoing, :type
45
- def initialize(context,id,type,label,incoming,outgoing)
46
- @@niceid[context] ||= -1
47
- @niceid = (@@niceid[context] += 1)
48
- @id = id
49
- @type = type
50
- @label = label
51
- @endpoints = []
52
- @methods = []
53
- @script = nil
54
- @script_type = nil
55
- @script_id = nil
56
- @script_var = 'result'
57
- @parameters = {}
58
- @incoming = incoming
59
- @outgoing = outgoing
60
- @attributes = {}
61
- end
62
- end # }}}
63
- class Link #{{{
64
- attr_accessor :from, :to
65
- attr_reader :condition, :attributes
66
- def initialize(from,to,cond=nil)
67
- @from = from
68
- @to = to
69
- @condition = cond
70
- @attributes = {}
71
- end
72
- end #}}}
73
- class Break < Node #{{{
74
- def initialize(context)
75
- super context, '-1', :break, 'BREAK', 1, []
76
- end
77
- end #}}}
78
-
79
- class Alternative < Array #{{{
80
- include Container
81
- attr_accessor :condition, :condition_type
82
- attr_reader :id, :attributes
83
- def condition?; true; end
84
- def initialize(id)
85
- @container = true
86
- @id = id
87
- @condition = []
88
- @condition_type = nil
89
- @attributes = {}
90
- end
91
- end #}}}
92
- class Branch < Array #{{{
93
- include Container
94
- attr_reader :id
95
- def condition?; false; end
96
- def initialize(id)
97
- @container = true
98
- @id = id
99
- end
100
- end #}}}
101
-
102
- class Loop #{{{
103
- include Container
104
- include Struct
105
- include Enumerable
106
- attr_reader :id, :sub, :mode
107
- attr_accessor :type, :condition, :condition_type
108
- attr_reader :attributes
109
- def condition?; true; end
110
- def initialize(id)
111
- @container = true
112
- @id = id
113
- @type = :loop
114
- @mode = :exclusive
115
- @condition = []
116
- @sub = []
117
- @condition_type = nil
118
- @attributes = {}
119
- end
120
- def new_branch
121
- (@sub << Alternative.new(@id)).last
122
- end
123
- end #}}}
124
-
125
- class Parallel #{{{
126
- include Container
127
- include Struct
128
- include Enumerable
129
- attr_reader :id, :sub
130
- attr_accessor :type, :wait
131
- def initialize(id,type,wait='-1')
132
- @container = true
133
- @id = id
134
- @type = type
135
- @sub = []
136
- @wait = wait
137
- end
138
- def new_branch
139
- (@sub << Branch.new(@id)).last
140
- end
141
- end #}}}
142
-
143
- class Conditional #{{{
144
- include Container
145
- include Struct
146
- include Enumerable
147
- attr_reader :container
148
- attr_reader :id, :sub, :mode
149
- attr_reader :attributes
150
- attr_accessor :type
151
- def initialize(id,mode,type)
152
- @container = true
153
- @id = id
154
- @sub = []
155
- @mode = mode
156
- @type = type
157
- @attributes = {}
158
- end
159
- def new_branch
160
- (@sub << Alternative.new(@id)).last
161
- end
162
- end #}}}
163
-
164
- class Graph #{{{
165
- attr_reader :flow, :nodes
166
-
167
- def find_node(niceid)
168
- @nodes.find{|k,v| v.niceid == niceid }
169
- end
170
-
171
- def initialize
172
- @nodes = {}
173
- @links = []
174
- end
175
-
176
- def clean_up(&bl)
177
- selnodes = []
178
- @nodes.each do |k,n|
179
- ret = bl.call(n)
180
- selnodes << n if ret
181
- end
182
- selnodes.each do |n|
183
- if n.incoming > 1 || n.outgoing > 1
184
- raise "#{n.inspect} - not a simple node to remove"
185
- end
186
- to,from = nil
187
- @links.each do |f|
188
- to = f if f.to == n.id
189
- from = f if f.from == n.id
190
- end
191
- if to && from
192
- to.to = from.to
193
- @links.delete(from)
194
- @nodes.delete(n.id)
195
- else
196
- raise "#{n.inspect} - could not remove flow"
197
- end
198
- end
199
- end
200
-
201
- def find_script_id(s)
202
- @nodes.find_all{|k,n| n.script_id == s}
203
- end
204
-
205
- def add_node(n)
206
- @nodes[n.id] = n
207
- end
208
-
209
- def link(f,t)
210
- @links.find{ |x| x.from == f && x.to == t }
211
- end
212
-
213
- def add_link(l)
214
- @links << l
215
- end
216
-
217
- def next_nodes(from)
218
- links = @links.find_all { |x| x.from == from.id }
219
- links.map{|x| @nodes[x.to] }
220
- end
221
-
222
- def next_node(from)
223
- if (nodes = next_nodes(from)).length == 1
224
- nodes.first
225
- else
226
- raise "#{from.inspect} - multiple outgoing connections"
227
- end
228
- end
229
- end #}}}
230
-
231
- class Tree < Array #{{{
232
- def condition?; false; end
233
-
234
- def to_s(verbose=true)
235
- "TREE:\n" << print_tree(self,' ',verbose)
236
- end
237
-
238
- def print_tree(ele,indent=' ',verbose=true)
239
- ret = ''
240
- ele.each_with_index do |e,i|
241
- last = (i == ele.length - 1)
242
- pchar = last ? '└' : '├'
243
- if e.container?
244
- ret << indent + pchar + ' ' + e.class.to_s.gsub(/[^:]*::/,'') + "\n"
245
- ret << print_tree(e,indent + (last ? ' ' : '│ '),verbose)
246
- elsif e.is_a?(Break)
247
- ret << indent + pchar + ' ' + e.class.to_s.gsub(/[^:]*::/,'') + "\n"
248
- else
249
- ret << indent + pchar + ' ' + e.niceid.to_s + (verbose ? " (#{e.label})" : "") + "\n"
250
- end
251
- end
252
- ret
253
- end
254
- private :print_tree
255
- end #}}}
256
-
257
- class Traces < Array #{{{
258
- def initialize_copy(other)
259
- super
260
- self.map!{ |t| t.dup }
261
- end
262
-
263
- def remove(trcs)
264
- trcs.each do |t|
265
- self.delete(t)
266
- end
267
- end
268
- def remove_by_endnode(enode)
269
- self.delete_if do |t|
270
- t[0] != enode
271
- end
272
- end
273
-
274
- def empty!
275
- self.delete_if{true}
276
- end
277
-
278
- def remove_empty
279
- self.delete_if{|t| t.empty? }
280
- end
281
-
282
- def first_node
283
- self.first.first
284
- end
285
- def second_nodes
286
- self.map { |t| t.length > 1 ? t[1] : t[0] }
287
- end
288
-
289
- def shortest
290
- self.min_by{|e|e.length}
291
- end
292
-
293
- def legend
294
- ret = "Legend:\n"
295
- a = self.flatten.uniq
296
- a.each {|n| ret << " " + n.niceid.to_s + ' ' + n.type.to_s + ' ' + n.label.to_s + "\n" }
297
- ret
298
- end
299
-
300
- def to_s
301
- "TRACES: " + self.collect { |t| t.empty? ? '∅' : t.collect{|n| "%2d" % n.niceid }.join('→ ') }.join("\n ")
302
- end
303
-
304
- def shift_all
305
- self.each{ |tr| tr.shift }
306
- end
307
- def pop_all(what=nil)
308
- if node.nil?
309
- self.each{ |tr| tr.pop }
310
- else
311
- self.each{ |tr| tr.pop if tr.last == what }
312
- end
313
- end
314
-
315
- def finished?
316
- self.reduce(0){|sum,t| sum += t.length} == 0
317
- end
318
-
319
- def same_first
320
- (n = self.map{|t| t.first }.uniq).length == 1 ? n.first : nil
321
- end
322
-
323
- def incoming(node)
324
- tcount = 1
325
- self.each do |t|
326
- break if t.length == 1
327
- tcount += 1 if t.last == node
328
- end
329
- tcount
330
- end
331
-
332
- def include_in_all?(e)
333
- num = 0
334
- self.each{|n| num += 1 if n.include?(e)}
335
- num == self.length
336
- end
337
-
338
- def all_loops?
339
- num = 0
340
- self.each{|n| num += 1 if n.first == n.last }
341
- num == self.length
342
- end
343
-
344
- def add_breaks(context,front=true)
345
- trueloops = self.find_all{ |t| t.last == t.first }.length
346
- tb = Break.new(context)
347
- if trueloops == self.length
348
- self << (front ? [nil,tb] : [tb,nil])
349
- else
350
- self.each do |t|
351
- t << tb unless t.last == t.first ### an explicit break
352
- end
353
- end
354
- end
355
-
356
- def loops
357
- lo = Traces.new self.find_all{ |t| t.first == t.last }
358
- self.each do |t|
359
- lo << t if lo.second_nodes.include?(t[1])
360
- end
361
- lo.uniq
362
- end
363
-
364
- def eliminate(loops)
365
- ### find nested loops
366
- self.each_with_index do |t,i|
367
- maxcut = 0
368
- ### find out which common parts the traces share with theloops
369
- loops.each do |l|
370
- maxcut.upto(l.length) do |i|
371
- maxcut = i if t[0...i] == l[0...i]
372
- end
373
- end
374
- ### in case of nested loop (common part occurs at end of loop), include the whole
375
- 0.upto (maxcut-1) do |j|
376
- if self[i][j] == self[i].last
377
- loops << self[i].shift(self[i].length)
378
- end
379
- end
380
- end
381
- loops.uniq!
382
- loops.remove_empty
383
- self.remove_empty
384
-
385
- ### cut from non-nested loops
386
- self.each_with_index do |t,i|
387
- maxcut = 0
388
- ### find out which common parts the traces share with theloops
389
- loops.each do |l|
390
- maxcut.upto(l.length) do |i|
391
- maxcut = i if t[0...i] == l[0...i]
392
- end
393
- end
394
- cutted = self[i].shift(maxcut)
395
- loops << cutted if cutted.length > 1 ### if only the loop node is left, no need to attach
396
- end
397
- end
398
-
399
- def extend
400
- # find largest common
401
- max = []
402
- sh = self.shortest
403
- sh = sh[0..-2] if sh.first == sh.last
404
- sh.each_with_index do |e,i|
405
- max << e if self.include_in_all?(e)
406
- end
407
- max = max.last
408
-
409
- # if last is the largest common do nothing
410
- # else append from last to largest common
411
- self.each do |t|
412
- unless t.last == max
413
- last = t.last
414
- if t.index(last) && t.index(max)
415
- (t.index(last) + 1).upto(t.index(max)) do |i|
416
- t << t[i]
417
- end
418
- end
419
- end
420
- end
421
-
422
- max
423
- end
424
-
425
- def find_endnode
426
- # supress loops
427
- trcs = self.dup
428
- # dangerous TODO
429
- trcs.delete_if { |t| t.uniq.length < t.length }
430
-
431
- # find common node (except loops)
432
- enode = nil
433
- unless trcs.empty?
434
- trcs.first.each do |n|
435
- if trcs.include_in_all?(n)
436
- enode = n
437
- break
438
- end
439
- end
440
- end
441
- enode
442
- end
443
-
444
- def segment_by(endnode)
445
- # cut shit until common node, return the shit you cut away
446
- tracesgroup = self.group_by{|t| t.first}.map do |k,trace|
447
- coltrace = trace.map do |t|
448
- # slice upto common node, collect the sliced away part
449
- len = t.index(endnode)
450
- if len
451
- cut = t.slice!(0...len)
452
- cut << t.first
453
- else # if endnode is nil, then return the whole
454
- t
455
- end
456
- end.uniq
457
- Traces.new(coltrace)
458
- end
459
- [tracesgroup,endnode]
460
- end
461
- end #}}}
462
-
463
- end
464
-
465
- end