cpee 1.3.102

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. data/AUTHORS +3 -0
  2. data/COPYING +165 -0
  3. data/FEATURES +28 -0
  4. data/INSTALL +23 -0
  5. data/README +7 -0
  6. data/Rakefile +28 -0
  7. data/cockpit/contrib/symbols.svg +224 -0
  8. data/cockpit/contrib/transformation1.xsl +264 -0
  9. data/cockpit/contrib/transformation2.xsl +10 -0
  10. data/cockpit/css/ui.css +155 -0
  11. data/cockpit/index.html +241 -0
  12. data/cockpit/js/details.js +146 -0
  13. data/cockpit/js/instance.js +927 -0
  14. data/cockpit/js/parameters.js +66 -0
  15. data/cockpit/js/ui.js +48 -0
  16. data/cockpit/js/wfadaptor.cpee.js +1082 -0
  17. data/cockpit/lib/contextmenu.css +72 -0
  18. data/cockpit/lib/contextmenu.js +63 -0
  19. data/cockpit/lib/jquery-ui.custom.min.js +259 -0
  20. data/cockpit/lib/jquery-ui.custom.min.txt +16 -0
  21. data/cockpit/lib/jquery.caret.min.js +10 -0
  22. data/cockpit/lib/jquery.min.js +4 -0
  23. data/cockpit/lib/jquery.svgdom.js +281 -0
  24. data/cockpit/lib/parsequery.js +19 -0
  25. data/cockpit/lib/printf.js +368 -0
  26. data/cockpit/lib/strftime.min.js +1 -0
  27. data/cockpit/lib/ui.css +270 -0
  28. data/cockpit/lib/ui.js +60 -0
  29. data/cockpit/lib/underscore.min.js +27 -0
  30. data/cockpit/lib/util.js +53 -0
  31. data/cockpit/lib/wfadaptor-doc/demo1.html +517 -0
  32. data/cockpit/lib/wfadaptor-doc/demo2.html +84 -0
  33. data/cockpit/lib/wfadaptor-doc/index.html +54 -0
  34. data/cockpit/lib/wfadaptor.css +217 -0
  35. data/cockpit/lib/wfadaptor.js +410 -0
  36. data/cockpit/testsets/ADVENTURE Dynamic Order.xml +353 -0
  37. data/cockpit/testsets/ADVENTURE Main Loop.xml +327 -0
  38. data/cockpit/testsets/ADVENTURE Order.xml +424 -0
  39. data/cockpit/testsets/ADVENTURE Performance Test 1.xml +311 -0
  40. data/cockpit/testsets/ADVENTURE Performance Test 2.xml +297 -0
  41. data/cockpit/testsets/Concurrent.xml +315 -0
  42. data/cockpit/testsets/Coopis Testset.xml +346 -0
  43. data/cockpit/testsets/Endpoints and Data Manipulation.xml +359 -0
  44. data/cockpit/testsets/ICSOC Testset.xml +354 -0
  45. data/cockpit/testsets/Linear.xml +328 -0
  46. data/cockpit/testsets/Mangler 1.xml +352 -0
  47. data/cockpit/testsets/Mangler 2.xml +372 -0
  48. data/cockpit/testsets/RESCUE - Book Movie - Local.xml +385 -0
  49. data/cockpit/testsets/RESCUE - Book Movie.xml +385 -0
  50. data/cockpit/testsets/RESCUE - Loop-Parallel Injection.xml +393 -0
  51. data/cockpit/testsets/SOPROMO Test Sonification.xml +356 -0
  52. data/cockpit/testsets/Syncing P34 1.xml +329 -0
  53. data/cockpit/testsets/Syncing P34 2.xml +329 -0
  54. data/cockpit/testsets/Syncing P34 3.xml +329 -0
  55. data/cockpit/testsets/Syncing P34.xml +329 -0
  56. data/cockpit/testsets/TEST - Bad Loop.xml +428 -0
  57. data/cockpit/testsets/TEST - Wrong Positions.xml +470 -0
  58. data/cockpit/testsets/index.xml +24 -0
  59. data/contrib/Screenshot at 2011-09-28 02:38:11.png +0 -0
  60. data/contrib/logo2-small.png +0 -0
  61. data/contrib/logo2.png +0 -0
  62. data/contrib/logo2.svg +7610 -0
  63. data/contrib/logo2a.png +0 -0
  64. data/contrib/logo2a.svg +367 -0
  65. data/cpee.gemspec +24 -0
  66. data/lib/cpee.xml +39 -0
  67. data/lib/cpee/callback.rb +40 -0
  68. data/lib/cpee/controller.rb +440 -0
  69. data/lib/cpee/empty_workflow.rb +24 -0
  70. data/lib/cpee/handler_notifications.rb +46 -0
  71. data/lib/cpee/handler_properties.rb +43 -0
  72. data/lib/cpee/implementation.rb +174 -0
  73. data/lib/engine.xml +85 -0
  74. data/lib/engine/callbacks.rng +41 -0
  75. data/lib/engine/instance-info.rng +41 -0
  76. data/lib/engine/instances.rng +38 -0
  77. data/server/handlerwrappers/default.rb +142 -0
  78. data/server/handlerwrappers/rescue.rb +216 -0
  79. data/server/handlerwrappers/soap.rb +152 -0
  80. data/server/instances/1/notifications/1d41ebf5e52bf039b3c3873fddb8e9bd/consumer-secret +1 -0
  81. data/server/instances/1/notifications/1d41ebf5e52bf039b3c3873fddb8e9bd/producer-secret +1 -0
  82. data/server/instances/1/notifications/1d41ebf5e52bf039b3c3873fddb8e9bd/subscription.xml +27 -0
  83. data/server/instances/1/notifications/66ad546f13c6c7c84f36215c24dd2e6e/consumer-secret +1 -0
  84. data/server/instances/1/notifications/66ad546f13c6c7c84f36215c24dd2e6e/producer-secret +1 -0
  85. data/server/instances/1/notifications/66ad546f13c6c7c84f36215c24dd2e6e/subscription.xml +27 -0
  86. data/server/instances/1/notifications/9f23b768395a19cc1dd6c2d2a243c78e/consumer-secret +1 -0
  87. data/server/instances/1/notifications/9f23b768395a19cc1dd6c2d2a243c78e/producer-secret +1 -0
  88. data/server/instances/1/notifications/9f23b768395a19cc1dd6c2d2a243c78e/subscription.xml +27 -0
  89. data/server/instances/1/notifications/fa690a88cc565dfa53b13ced355cd039/consumer-secret +1 -0
  90. data/server/instances/1/notifications/fa690a88cc565dfa53b13ced355cd039/producer-secret +1 -0
  91. data/server/instances/1/notifications/fa690a88cc565dfa53b13ced355cd039/subscription.xml +5 -0
  92. data/server/instances/1/properties.xml +522 -0
  93. data/server/instances/10/notifications/0867c4a937f882af259137e36d331261/consumer-secret +1 -0
  94. data/server/instances/10/notifications/0867c4a937f882af259137e36d331261/producer-secret +1 -0
  95. data/server/instances/10/notifications/0867c4a937f882af259137e36d331261/subscription.xml +27 -0
  96. data/server/instances/10/notifications/28acb605c56588ec8e47431c1fcf0b20/consumer-secret +1 -0
  97. data/server/instances/10/notifications/28acb605c56588ec8e47431c1fcf0b20/producer-secret +1 -0
  98. data/server/instances/10/notifications/28acb605c56588ec8e47431c1fcf0b20/subscription.xml +27 -0
  99. data/server/instances/10/notifications/31d3f699def1d1e86dc18ef421f718ad/consumer-secret +1 -0
  100. data/server/instances/10/notifications/31d3f699def1d1e86dc18ef421f718ad/producer-secret +1 -0
  101. data/server/instances/10/notifications/31d3f699def1d1e86dc18ef421f718ad/subscription.xml +27 -0
  102. data/server/instances/10/notifications/380b57220000c45342fc56a1ed8e9e3f/consumer-secret +1 -0
  103. data/server/instances/10/notifications/380b57220000c45342fc56a1ed8e9e3f/producer-secret +1 -0
  104. data/server/instances/10/notifications/380b57220000c45342fc56a1ed8e9e3f/subscription.xml +27 -0
  105. data/server/instances/10/notifications/41eeb5d90b513781fb4b440cb97ca7f1/consumer-secret +1 -0
  106. data/server/instances/10/notifications/41eeb5d90b513781fb4b440cb97ca7f1/producer-secret +1 -0
  107. data/server/instances/10/notifications/41eeb5d90b513781fb4b440cb97ca7f1/subscription.xml +27 -0
  108. data/server/instances/10/notifications/4d8c1b3a8dfdacac98144fad072c46d8/consumer-secret +1 -0
  109. data/server/instances/10/notifications/4d8c1b3a8dfdacac98144fad072c46d8/producer-secret +1 -0
  110. data/server/instances/10/notifications/4d8c1b3a8dfdacac98144fad072c46d8/subscription.xml +27 -0
  111. data/server/instances/10/notifications/4dde696cfb001e00a7efbd8e86ba227d/consumer-secret +1 -0
  112. data/server/instances/10/notifications/4dde696cfb001e00a7efbd8e86ba227d/producer-secret +1 -0
  113. data/server/instances/10/notifications/4dde696cfb001e00a7efbd8e86ba227d/subscription.xml +27 -0
  114. data/server/instances/10/notifications/4e1c0065dd95f7c175bbccb874f0baea/consumer-secret +1 -0
  115. data/server/instances/10/notifications/4e1c0065dd95f7c175bbccb874f0baea/producer-secret +1 -0
  116. data/server/instances/10/notifications/4e1c0065dd95f7c175bbccb874f0baea/subscription.xml +27 -0
  117. data/server/instances/10/notifications/6198fb7d6a8249f7820e3e57eeefa8af/consumer-secret +1 -0
  118. data/server/instances/10/notifications/6198fb7d6a8249f7820e3e57eeefa8af/producer-secret +1 -0
  119. data/server/instances/10/notifications/6198fb7d6a8249f7820e3e57eeefa8af/subscription.xml +27 -0
  120. data/server/instances/10/notifications/6aeb90da52abc150f0f0135d8ba2dbac/consumer-secret +1 -0
  121. data/server/instances/10/notifications/6aeb90da52abc150f0f0135d8ba2dbac/producer-secret +1 -0
  122. data/server/instances/10/notifications/6aeb90da52abc150f0f0135d8ba2dbac/subscription.xml +27 -0
  123. data/server/instances/10/notifications/6d77f5bac1eb9d6165394b6bfc9b492a/consumer-secret +1 -0
  124. data/server/instances/10/notifications/6d77f5bac1eb9d6165394b6bfc9b492a/producer-secret +1 -0
  125. data/server/instances/10/notifications/6d77f5bac1eb9d6165394b6bfc9b492a/subscription.xml +27 -0
  126. data/server/instances/10/notifications/7092411a6bb6822f651798fdcd3c4787/consumer-secret +1 -0
  127. data/server/instances/10/notifications/7092411a6bb6822f651798fdcd3c4787/producer-secret +1 -0
  128. data/server/instances/10/notifications/7092411a6bb6822f651798fdcd3c4787/subscription.xml +27 -0
  129. data/server/instances/10/notifications/7ab29bbad4122295c05f9e33fd1e0fc3/consumer-secret +1 -0
  130. data/server/instances/10/notifications/7ab29bbad4122295c05f9e33fd1e0fc3/producer-secret +1 -0
  131. data/server/instances/10/notifications/7ab29bbad4122295c05f9e33fd1e0fc3/subscription.xml +27 -0
  132. data/server/instances/10/notifications/7fabcecc57fe0bd27ce50bedaef47bd2/consumer-secret +1 -0
  133. data/server/instances/10/notifications/7fabcecc57fe0bd27ce50bedaef47bd2/producer-secret +1 -0
  134. data/server/instances/10/notifications/7fabcecc57fe0bd27ce50bedaef47bd2/subscription.xml +27 -0
  135. data/server/instances/10/notifications/85760dad8f7abbd73ae1dd44140dabf1/consumer-secret +1 -0
  136. data/server/instances/10/notifications/85760dad8f7abbd73ae1dd44140dabf1/producer-secret +1 -0
  137. data/server/instances/10/notifications/85760dad8f7abbd73ae1dd44140dabf1/subscription.xml +27 -0
  138. data/server/instances/10/notifications/8b9a96d109d44a1fc22858006c0f0e16/consumer-secret +1 -0
  139. data/server/instances/10/notifications/8b9a96d109d44a1fc22858006c0f0e16/producer-secret +1 -0
  140. data/server/instances/10/notifications/8b9a96d109d44a1fc22858006c0f0e16/subscription.xml +27 -0
  141. data/server/instances/10/notifications/9120a477e64d7debae2cda964a9948a0/consumer-secret +1 -0
  142. data/server/instances/10/notifications/9120a477e64d7debae2cda964a9948a0/producer-secret +1 -0
  143. data/server/instances/10/notifications/9120a477e64d7debae2cda964a9948a0/subscription.xml +27 -0
  144. data/server/instances/10/notifications/93c5a5ab72a745c0f9fffe2fe58db205/consumer-secret +1 -0
  145. data/server/instances/10/notifications/93c5a5ab72a745c0f9fffe2fe58db205/producer-secret +1 -0
  146. data/server/instances/10/notifications/93c5a5ab72a745c0f9fffe2fe58db205/subscription.xml +27 -0
  147. data/server/instances/10/notifications/a8db1498388588bddf518878263fd898/consumer-secret +1 -0
  148. data/server/instances/10/notifications/a8db1498388588bddf518878263fd898/producer-secret +1 -0
  149. data/server/instances/10/notifications/a8db1498388588bddf518878263fd898/subscription.xml +27 -0
  150. data/server/instances/10/notifications/b534f057c1c97f65e68f59427958e78d/consumer-secret +1 -0
  151. data/server/instances/10/notifications/b534f057c1c97f65e68f59427958e78d/producer-secret +1 -0
  152. data/server/instances/10/notifications/b534f057c1c97f65e68f59427958e78d/subscription.xml +27 -0
  153. data/server/instances/10/notifications/bb3d69ee3df32f3b5cb69a51d1af8ae4/consumer-secret +1 -0
  154. data/server/instances/10/notifications/bb3d69ee3df32f3b5cb69a51d1af8ae4/producer-secret +1 -0
  155. data/server/instances/10/notifications/bb3d69ee3df32f3b5cb69a51d1af8ae4/subscription.xml +27 -0
  156. data/server/instances/10/notifications/bc597391804363834987804436b8b63b/consumer-secret +1 -0
  157. data/server/instances/10/notifications/bc597391804363834987804436b8b63b/producer-secret +1 -0
  158. data/server/instances/10/notifications/bc597391804363834987804436b8b63b/subscription.xml +27 -0
  159. data/server/instances/10/notifications/bf2f6599eebcd9a08e47bdafd4a67660/consumer-secret +1 -0
  160. data/server/instances/10/notifications/bf2f6599eebcd9a08e47bdafd4a67660/producer-secret +1 -0
  161. data/server/instances/10/notifications/bf2f6599eebcd9a08e47bdafd4a67660/subscription.xml +27 -0
  162. data/server/instances/10/notifications/db9cf0ae80bd61e6124c382b992a1550/consumer-secret +1 -0
  163. data/server/instances/10/notifications/db9cf0ae80bd61e6124c382b992a1550/producer-secret +1 -0
  164. data/server/instances/10/notifications/db9cf0ae80bd61e6124c382b992a1550/subscription.xml +27 -0
  165. data/server/instances/10/notifications/e528089610c991500eb2e8b094f6f169/consumer-secret +1 -0
  166. data/server/instances/10/notifications/e528089610c991500eb2e8b094f6f169/producer-secret +1 -0
  167. data/server/instances/10/notifications/e528089610c991500eb2e8b094f6f169/subscription.xml +27 -0
  168. data/server/instances/10/notifications/e7d3ca382d26b5f5eba00c40c29827da/consumer-secret +1 -0
  169. data/server/instances/10/notifications/e7d3ca382d26b5f5eba00c40c29827da/producer-secret +1 -0
  170. data/server/instances/10/notifications/e7d3ca382d26b5f5eba00c40c29827da/subscription.xml +27 -0
  171. data/server/instances/10/notifications/ebdc914fde6fe299143ae4601c142738/consumer-secret +1 -0
  172. data/server/instances/10/notifications/ebdc914fde6fe299143ae4601c142738/producer-secret +1 -0
  173. data/server/instances/10/notifications/ebdc914fde6fe299143ae4601c142738/subscription.xml +27 -0
  174. data/server/instances/10/notifications/f26b2b9efc10b9259647cf1a2b934694/consumer-secret +1 -0
  175. data/server/instances/10/notifications/f26b2b9efc10b9259647cf1a2b934694/producer-secret +1 -0
  176. data/server/instances/10/notifications/f26b2b9efc10b9259647cf1a2b934694/subscription.xml +27 -0
  177. data/server/instances/10/notifications/f4e1d7808171fe7c5fab4a99145ea185/consumer-secret +1 -0
  178. data/server/instances/10/notifications/f4e1d7808171fe7c5fab4a99145ea185/producer-secret +1 -0
  179. data/server/instances/10/notifications/f4e1d7808171fe7c5fab4a99145ea185/subscription.xml +27 -0
  180. data/server/instances/10/notifications/f7e947a1b4b32f3dad5debd44fc3236b/consumer-secret +1 -0
  181. data/server/instances/10/notifications/f7e947a1b4b32f3dad5debd44fc3236b/producer-secret +1 -0
  182. data/server/instances/10/notifications/f7e947a1b4b32f3dad5debd44fc3236b/subscription.xml +27 -0
  183. data/server/instances/10/notifications/fbf5d0ae050a50e8a2fca6bc60f5b8d6/consumer-secret +1 -0
  184. data/server/instances/10/notifications/fbf5d0ae050a50e8a2fca6bc60f5b8d6/producer-secret +1 -0
  185. data/server/instances/10/notifications/fbf5d0ae050a50e8a2fca6bc60f5b8d6/subscription.xml +27 -0
  186. data/server/instances/10/properties.xml +388 -0
  187. data/server/instances/11/notifications/134c18da209261bc409ccd137b2e46d3/consumer-secret +1 -0
  188. data/server/instances/11/notifications/134c18da209261bc409ccd137b2e46d3/producer-secret +1 -0
  189. data/server/instances/11/notifications/134c18da209261bc409ccd137b2e46d3/subscription.xml +27 -0
  190. data/server/instances/11/notifications/48862f47f66e8229582bc91fbc38a512/consumer-secret +1 -0
  191. data/server/instances/11/notifications/48862f47f66e8229582bc91fbc38a512/producer-secret +1 -0
  192. data/server/instances/11/notifications/48862f47f66e8229582bc91fbc38a512/subscription.xml +5 -0
  193. data/server/instances/11/properties.xml +517 -0
  194. data/server/instances/2/notifications/0bbfabbebf46b850383b4e1d7bd926e3/consumer-secret +1 -0
  195. data/server/instances/2/notifications/0bbfabbebf46b850383b4e1d7bd926e3/producer-secret +1 -0
  196. data/server/instances/2/notifications/0bbfabbebf46b850383b4e1d7bd926e3/subscription.xml +27 -0
  197. data/server/instances/2/notifications/1d426895d19caa1471c713e80cc3c845/consumer-secret +1 -0
  198. data/server/instances/2/notifications/1d426895d19caa1471c713e80cc3c845/producer-secret +1 -0
  199. data/server/instances/2/notifications/1d426895d19caa1471c713e80cc3c845/subscription.xml +27 -0
  200. data/server/instances/2/notifications/292c8983aa798f0c5ced5ddc4b58abe4/consumer-secret +1 -0
  201. data/server/instances/2/notifications/292c8983aa798f0c5ced5ddc4b58abe4/producer-secret +1 -0
  202. data/server/instances/2/notifications/292c8983aa798f0c5ced5ddc4b58abe4/subscription.xml +27 -0
  203. data/server/instances/2/notifications/332c3026c8ad3075b092bd7e7a2b4f71/consumer-secret +1 -0
  204. data/server/instances/2/notifications/332c3026c8ad3075b092bd7e7a2b4f71/producer-secret +1 -0
  205. data/server/instances/2/notifications/332c3026c8ad3075b092bd7e7a2b4f71/subscription.xml +27 -0
  206. data/server/instances/2/notifications/d377446918808d23d03291fc1140883c/consumer-secret +1 -0
  207. data/server/instances/2/notifications/d377446918808d23d03291fc1140883c/producer-secret +1 -0
  208. data/server/instances/2/notifications/d377446918808d23d03291fc1140883c/subscription.xml +27 -0
  209. data/server/instances/2/notifications/d5b65c7cbff5d259e4ee8405190ec558/consumer-secret +1 -0
  210. data/server/instances/2/notifications/d5b65c7cbff5d259e4ee8405190ec558/producer-secret +1 -0
  211. data/server/instances/2/notifications/d5b65c7cbff5d259e4ee8405190ec558/subscription.xml +27 -0
  212. data/server/instances/2/notifications/d7ee4fedabb402dc43986dfa199e6768/consumer-secret +1 -0
  213. data/server/instances/2/notifications/d7ee4fedabb402dc43986dfa199e6768/producer-secret +1 -0
  214. data/server/instances/2/notifications/d7ee4fedabb402dc43986dfa199e6768/subscription.xml +5 -0
  215. data/server/instances/2/properties.xml +517 -0
  216. data/server/instances/3/notifications/27195e2503deaf25b3291394fe97985c/consumer-secret +1 -0
  217. data/server/instances/3/notifications/27195e2503deaf25b3291394fe97985c/producer-secret +1 -0
  218. data/server/instances/3/notifications/27195e2503deaf25b3291394fe97985c/subscription.xml +5 -0
  219. data/server/instances/3/notifications/6cec45935d78709a4aa6622491006f4b/consumer-secret +1 -0
  220. data/server/instances/3/notifications/6cec45935d78709a4aa6622491006f4b/producer-secret +1 -0
  221. data/server/instances/3/notifications/6cec45935d78709a4aa6622491006f4b/subscription.xml +27 -0
  222. data/server/instances/3/notifications/755542b2fb8d0c8fb9add29e012ec707/consumer-secret +1 -0
  223. data/server/instances/3/notifications/755542b2fb8d0c8fb9add29e012ec707/producer-secret +1 -0
  224. data/server/instances/3/notifications/755542b2fb8d0c8fb9add29e012ec707/subscription.xml +27 -0
  225. data/server/instances/3/properties.xml +517 -0
  226. data/server/instances/4/notifications/151e90db818eb5812905257a8eb7cea4/consumer-secret +1 -0
  227. data/server/instances/4/notifications/151e90db818eb5812905257a8eb7cea4/producer-secret +1 -0
  228. data/server/instances/4/notifications/151e90db818eb5812905257a8eb7cea4/subscription.xml +5 -0
  229. data/server/instances/4/notifications/a89df398fcc088c067c39ae3974ec57f/consumer-secret +1 -0
  230. data/server/instances/4/notifications/a89df398fcc088c067c39ae3974ec57f/producer-secret +1 -0
  231. data/server/instances/4/notifications/a89df398fcc088c067c39ae3974ec57f/subscription.xml +27 -0
  232. data/server/instances/4/properties.xml +517 -0
  233. data/server/instances/5/notifications/02ebbf888bd3efd11924f4c416d784e4/consumer-secret +1 -0
  234. data/server/instances/5/notifications/02ebbf888bd3efd11924f4c416d784e4/producer-secret +1 -0
  235. data/server/instances/5/notifications/02ebbf888bd3efd11924f4c416d784e4/subscription.xml +27 -0
  236. data/server/instances/5/notifications/0b9589d847cccf768013b6082893bce6/consumer-secret +1 -0
  237. data/server/instances/5/notifications/0b9589d847cccf768013b6082893bce6/producer-secret +1 -0
  238. data/server/instances/5/notifications/0b9589d847cccf768013b6082893bce6/subscription.xml +5 -0
  239. data/server/instances/5/properties.xml +517 -0
  240. data/server/instances/6/notifications/23da9f5c4548f384d625e6d12b3ebe2d/consumer-secret +1 -0
  241. data/server/instances/6/notifications/23da9f5c4548f384d625e6d12b3ebe2d/producer-secret +1 -0
  242. data/server/instances/6/notifications/23da9f5c4548f384d625e6d12b3ebe2d/subscription.xml +5 -0
  243. data/server/instances/6/notifications/282e7077e9c5b9972413cc92a6dcffc3/consumer-secret +1 -0
  244. data/server/instances/6/notifications/282e7077e9c5b9972413cc92a6dcffc3/producer-secret +1 -0
  245. data/server/instances/6/notifications/282e7077e9c5b9972413cc92a6dcffc3/subscription.xml +27 -0
  246. data/server/instances/6/notifications/7e57d7438db8210766eab6873124dc02/consumer-secret +1 -0
  247. data/server/instances/6/notifications/7e57d7438db8210766eab6873124dc02/producer-secret +1 -0
  248. data/server/instances/6/notifications/7e57d7438db8210766eab6873124dc02/subscription.xml +27 -0
  249. data/server/instances/6/properties.xml +517 -0
  250. data/server/instances/7/notifications/7276b795b5ed2f6638473526d9b1b1e1/consumer-secret +1 -0
  251. data/server/instances/7/notifications/7276b795b5ed2f6638473526d9b1b1e1/producer-secret +1 -0
  252. data/server/instances/7/notifications/7276b795b5ed2f6638473526d9b1b1e1/subscription.xml +27 -0
  253. data/server/instances/7/notifications/f3fbbf27fcbcc02a9f8a614326461a5c/consumer-secret +1 -0
  254. data/server/instances/7/notifications/f3fbbf27fcbcc02a9f8a614326461a5c/producer-secret +1 -0
  255. data/server/instances/7/notifications/f3fbbf27fcbcc02a9f8a614326461a5c/subscription.xml +5 -0
  256. data/server/instances/7/properties.xml +517 -0
  257. data/server/instances/8/notifications/2854ed5a8f97a33d31f908f67544ec62/consumer-secret +1 -0
  258. data/server/instances/8/notifications/2854ed5a8f97a33d31f908f67544ec62/producer-secret +1 -0
  259. data/server/instances/8/notifications/2854ed5a8f97a33d31f908f67544ec62/subscription.xml +27 -0
  260. data/server/instances/8/notifications/595259518a5cb2ce286bb39840f7a64c/consumer-secret +1 -0
  261. data/server/instances/8/notifications/595259518a5cb2ce286bb39840f7a64c/producer-secret +1 -0
  262. data/server/instances/8/notifications/595259518a5cb2ce286bb39840f7a64c/subscription.xml +5 -0
  263. data/server/instances/8/properties.xml +517 -0
  264. data/server/instances/9/notifications/54e96913d66f1dd69ec82d2b52268232/consumer-secret +1 -0
  265. data/server/instances/9/notifications/54e96913d66f1dd69ec82d2b52268232/producer-secret +1 -0
  266. data/server/instances/9/notifications/54e96913d66f1dd69ec82d2b52268232/subscription.xml +5 -0
  267. data/server/instances/9/notifications/5debc1fd138fdc80940cd5647003ed45/consumer-secret +1 -0
  268. data/server/instances/9/notifications/5debc1fd138fdc80940cd5647003ed45/producer-secret +1 -0
  269. data/server/instances/9/notifications/5debc1fd138fdc80940cd5647003ed45/subscription.xml +27 -0
  270. data/server/instances/9/properties.xml +517 -0
  271. data/server/resources/properties.init +351 -0
  272. data/server/resources/properties.schema.active +79 -0
  273. data/server/resources/properties.schema.finished +79 -0
  274. data/server/resources/properties.schema.inactive +79 -0
  275. data/server/resources/topics.xml +55 -0
  276. data/server/server.rb +25 -0
  277. data/server/todo.txt +20 -0
  278. data/test/delete.rb +27 -0
  279. data/test/load.rb +55 -0
  280. data/test/testset.xml +297 -0
  281. metadata +382 -0
@@ -0,0 +1,142 @@
1
+ <!--
2
+ This file is part of CPEE.
3
+
4
+ CPEE is free software: you can redistribute it and/or modify it under the terms
5
+ of the GNU General Public License as published by the Free Software Foundation,
6
+ either version 3 of the License, or (at your option) any later version.
7
+
8
+ CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
+
12
+ You should have received a copy of the GNU General Public License along with
13
+ CPEE (file COPYING in the main directory). If not, see
14
+ <http://www.gnu.org/licenses/>.
15
+ -->
16
+
17
+ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
18
+ def initialize(arguments,endpoint=nil,position=nil,continue=nil) # {{{
19
+ @controller = arguments[0]
20
+ @url = arguments[1]
21
+ @handler_continue = continue
22
+ @handler_endpoint = endpoint
23
+ @handler_position = position
24
+ @handler_passthrough = nil
25
+ @handler_returnValue = nil
26
+ end # }}}
27
+
28
+ def activity_handle(passthrough, parameters) # {{{
29
+ @controller.notify("running/activity_calling", :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
30
+
31
+ if passthrough.nil?
32
+ params = []
33
+ callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
34
+ (parameters[:parameters] || {}).each do |h|
35
+ if h.class == Hash
36
+ h.each do |k,v|
37
+ params << Riddl::Parameter::Simple.new("#{k}",CPEE::ValueHelper::generate(v))
38
+ end
39
+ end
40
+ end
41
+ params << Riddl::Header.new("CPEE_BASE",@url)
42
+ params << Riddl::Header.new("CPEE_INSTANCE","#{@url}/#{@controller.id}")
43
+ params << Riddl::Header.new("CPEE_CALLBACK",callback)
44
+
45
+ type = parameters[:method] || 'post'
46
+ client = Riddl::Client.new(@handler_endpoint)
47
+ status, result, headers = client.request type => params
48
+ raise "Could not #{parameters[:method] || 'post'} #{@handler_endpoint}" if status != 200
49
+
50
+ if headers["CPEE_CALLBACK"] && headers["CPEE_CALLBACK"] == 'true'
51
+ @controller.callbacks[callback] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
52
+ @handler_passthrough = callback
53
+ return
54
+ end
55
+ else
56
+ @controller.callbacks[passthrough] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
57
+ @handler_passthrough = passthrough
58
+ return
59
+ end
60
+
61
+ @handler_returnValue = result
62
+ @handler_continue.continue
63
+ end # }}}
64
+
65
+ def activity_result_status # {{{
66
+ WEEL::Status.new(1, "everything okay")
67
+ end # }}}
68
+
69
+ def activity_result_value # {{{
70
+ @handler_returnValue
71
+ end # }}}
72
+
73
+ def activity_stop # {{{
74
+ unless @handler_passthrough.nil?
75
+ @controller.callbacks.delete(@handler_passthrough)
76
+ end
77
+ end # }}}
78
+ def activity_passthrough_value # {{{
79
+ @handler_passthrough
80
+ end # }}}
81
+
82
+ def activity_no_longer_necessary # {{{
83
+ true
84
+ end # }}}
85
+
86
+ def inform_activity_done # {{{
87
+ @controller.notify("running/activity_done", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
88
+ end # }}}
89
+ def inform_activity_manipulate # {{{
90
+ @controller.notify("running/activity_manipulating", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
91
+ end # }}}
92
+ def inform_activity_failed(err) # {{{
93
+ puts err.message
94
+ puts err.backtrace
95
+ @controller.notify("running/activity_failed", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
96
+ end # }}}
97
+
98
+ def inform_syntax_error(err,code)# {{{
99
+ puts err.message
100
+ puts err.backtrace
101
+ @controller.notify("properties/description/error", :instance => "#{@url}/#{@controller.id}", :message => err.message)
102
+ end# }}}
103
+ def inform_manipulate_change(status,dataelements,endpoints) # {{{
104
+ unless status.nil?
105
+ @controller.serialize_status!
106
+ @controller.notify("properties/status/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :id => status.id, :message => status.message)
107
+ end
108
+ unless dataelements.nil?
109
+ @controller.serialize_dataelements!
110
+ @controller.notify("properties/dataelements/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => dataelements)
111
+ end
112
+ unless endpoints.nil?
113
+ @controller.serialize_endpoints!
114
+ @controller.notify("properties/endpoints/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => endpoints)
115
+ end
116
+ end # }}}
117
+ def inform_position_change(ipc={}) # {{{
118
+ @controller.serialize_positions!
119
+ ipc[:instance] = "#{@url}/#{@controller.id}"
120
+ @controller.notify("properties/position/change", ipc)
121
+ end # }}}
122
+ def inform_state_change(newstate) # {{{
123
+ if @controller
124
+ @controller.serialize_state!
125
+ @controller.notify("properties/state/change", :instance => "#{@url}/#{@controller.id}", :state => newstate)
126
+ end
127
+ end # }}}
128
+
129
+ def vote_sync_after # {{{
130
+ @controller.call_vote("running/syncing_after", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
131
+ end # }}}
132
+ def vote_sync_before # {{{
133
+ @controller.call_vote("running/syncing_before", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
134
+ end # }}}
135
+
136
+ def callback(result)
137
+ @handler_returnValue = result
138
+ @controller.callbacks.delete(@handler_passthrough)
139
+ @handler_passthrough = nil
140
+ @handler_continue.continue
141
+ end
142
+ end
@@ -0,0 +1,216 @@
1
+ <!--
2
+ This file is part of CPEE.
3
+
4
+ CPEE is free software: you can redistribute it and/or modify it under the terms
5
+ of the GNU General Public License as published by the Free Software Foundation,
6
+ either version 3 of the License, or (at your option) any later version.
7
+
8
+ CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
+
12
+ You should have received a copy of the GNU General Public License along with
13
+ CPEE (file COPYING in the main directory). If not, see
14
+ <http://www.gnu.org/licenses/>.
15
+ -->
16
+
17
+ require 'time'
18
+ require 'date'
19
+ require 'cgi'
20
+ require 'savon'
21
+
22
+ class RescueHash < Hash
23
+ def self::new_from_obj(obj)
24
+ RescueHash.new.merge(obj)
25
+ end
26
+
27
+ def value(key)
28
+ results = []
29
+ self.each do |k,v|
30
+ results << v.value(key) if v.class == RescueHash
31
+ results << v if k == key
32
+ end
33
+ results.length != 1 ? results.flatten : results[0]
34
+ end
35
+ end
36
+
37
+ module Kernel
38
+ def neq(value)
39
+ self != value
40
+ end
41
+ end
42
+
43
+ Result = Struct.new(:data, :status)
44
+
45
+ class RescueHandlerWrapper < WEEL::HandlerWrapperBase
46
+ def initialize(arguments,endpoint=nil,position=nil,continue=nil)
47
+ @controller = arguments[0]
48
+ @url = arguments[1]
49
+ @handler_stopped = false
50
+ @handler_continue = continue
51
+ @handler_endpoint = endpoint
52
+ @handler_position = position
53
+ @handler_returnValue = nil
54
+ end
55
+
56
+ # executes a ws-call to the given endpoint with the given parameters. the call
57
+ def activity_handle(passthrough, parameters)
58
+ @controller.notify("running/activity_calling", :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
59
+
60
+ params = []
61
+ if parameters.key?(:info) && parameters[:info] == 'true' # {{{
62
+ parameters[:parameters] = Array.new if (parameters.include?(:parameters) == false) || parameters[:parameters].nil?
63
+ parameters[:parameters] << {'call-instance-uri' => "#{@url}/#{@controller.id}"}
64
+ parameters[:parameters] << {'call-activity' => @handler_position}
65
+ parameters[:parameters] << {'call-endpoint' => @handler_endpoint}
66
+ parameters[:parameters] << {'call-oid' => parameters[:'call-oid']} if parameters.include?(:'call-oid')
67
+ end # }}}
68
+ if parameters.include?(:templates) # {{{
69
+ parameters[:parameters] << {'templates-uri' => parameters[:templates][0][:uri]}
70
+ parameters[:parameters] << {'template-name' => parameters[:templates][1][:name]}
71
+ parameters[:parameters] << {'template-lang' => parameters[:templates][2][:lang]}
72
+ end # }}}
73
+ if parameters.key?(:service) # {{{
74
+ injection_handler_uri = parameters[:service][1][:injection_handler]
75
+ # Give postion to injection-handler
76
+ @handler_returnValue = nil
77
+ injection_handler = Riddl::Client.new(injection_handler_uri)
78
+ status, resp = injection_handler.post [
79
+ Riddl::Parameter::Simple.new('activity', @handler_position),
80
+ Riddl::Parameter::Simple.new('instance', "#{@url}/#{@controller.id}")
81
+ ] # here could be consumer, producer secrets
82
+ raise "Subscription to injection-handler at #{injection_handler_uri} failed with status #{status}" unless status == 200
83
+ raise WEEL::Signal::SkipManipulate # }}}
84
+ elsif parameters.key?(:method) #{{{
85
+ client = Riddl::Client.new(@handler_endpoint)
86
+ type = parameters[:method]
87
+ (parameters[:parameters] || {}).each do |h|
88
+ if h.class == Hash
89
+ h.each do |k,v|
90
+ params << (parameters[:method].downcase == 'get' ? Riddl::Parameter::Simple.new("#{k}","#{v}", :query) : Riddl::Parameter::Simple.new("#{k}","#{v}"))
91
+ end
92
+ end
93
+ end
94
+ callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
95
+ params << Riddl::Header.new("CPEE_BASE",@url)
96
+ params << Riddl::Header.new("CPEE_INSTANCE","#{@url}/#{@controller.id}")
97
+ params << Riddl::Header.new("CPEE_CALLBACK",callback)
98
+ status, result, headers = client.request type => params
99
+ if(not(type == "get" and status == 200) and not(type == "post" and status == 201))
100
+ raise "Could not perform http-#{type} on URI: #{@handler_endpoint} - Status: #{status}"
101
+ end
102
+ if headers["CPEE_CALLBACK"] && headers["CPEE_CALLBACK"] == 'true'
103
+ @controller.callbacks[callback] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
104
+ return
105
+ end
106
+ # Make rescue-hash here
107
+ @handler_returnValue = Result.new(result, status)# }}}
108
+ # TODO
109
+ # Georg: Check log if color freeze (unmark)
110
+ # When stopping the unmark command may be ignored
111
+ # instance.js at the beginning (moz-websocket)
112
+ elsif parameters.key?(:soap_operation)# {{{
113
+ begin
114
+ pp parameters
115
+ client = Savon.client do
116
+ wsdl parameters[:wsdl]
117
+ log false
118
+ log_level :info
119
+ soap_header(
120
+ "CPEE_BASE" => @url,
121
+ "CPEE_INSTANCE" => "#{@url}/#{@controller.id}",
122
+ )
123
+ end
124
+ params = {}
125
+ (parameters[:parameters] || {}).each do |h|
126
+ if h.class == Hash
127
+ h.each do |k,v|
128
+ params[k] = v
129
+ end
130
+ end
131
+ end
132
+ response = client.call parameters[:soap_operation].to_sym, params
133
+ @handler_returnValue = Result.new(XML::Smart.new(response.to_doc), 200)
134
+ rescue Savon::Error => error
135
+ @handler_returnValue = error.to_s
136
+ end
137
+ end# }}}
138
+ @handler_continue.continue
139
+ end
140
+
141
+ def activity_result_status
142
+ WEEL::Status.new(1, "everything okay")
143
+ end
144
+
145
+ # returns the result of the last handled call
146
+ def activity_result_value
147
+ @handler_returnValue
148
+ end
149
+
150
+ def activity_stop
151
+ @handler_stopped = true
152
+ end
153
+ def activity_passthrough_value
154
+ nil
155
+ end
156
+
157
+ def activity_no_longer_necessary
158
+ @handler_stopped = true
159
+ end
160
+
161
+ def inform_activity_done
162
+ @controller.notify("running/activity_done", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
163
+ end
164
+ def inform_activity_manipulate
165
+ @controller.notify("running/activity_manipulating", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
166
+ end
167
+ def inform_activity_failed(err)
168
+ puts err.message
169
+ puts err.backtrace
170
+ @controller.notify("running/activity_failed", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
171
+ end
172
+
173
+ def inform_syntax_error(err,code)
174
+ puts err.message
175
+ puts err.backtrace
176
+ @controller.notify("properties/description/error", :instance => "#{@url}/#{@controller.id}", :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :code => code, :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
177
+ end
178
+ def inform_manipulate_change(status,dataelements,endpoints)
179
+ unless status.nil?
180
+ @controller.serialize_status!
181
+ @controller.notify("properties/status/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :id => status.id, :message => status.message)
182
+ end
183
+ unless dataelements.nil?
184
+ @controller.serialize_dataelements!
185
+ @controller.notify("properties/dataelements/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => dataelements)
186
+ end
187
+ unless endpoints.nil?
188
+ @controller.serialize_endpoints!
189
+ @controller.notify("properties/endpoints/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => endpoints)
190
+ end
191
+ end
192
+ def inform_position_change(ipc={})
193
+ @controller.serialize_positions!
194
+ ipc[:instance] = "#{@url}/#{@controller.id}"
195
+ @controller.notify("properties/position/change", ipc)
196
+ end
197
+ def inform_state_change(newstate)
198
+ if @controller
199
+ @controller.serialize_state!
200
+ @controller.notify("properties/state/change", :instance => "#{@url}/#{@controller.id}", :state => newstate)
201
+ end
202
+ end
203
+
204
+ def vote_sync_after
205
+ @controller.call_vote("running/syncing_after", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
206
+ end
207
+ def vote_sync_before
208
+ @controller.call_vote("running/syncing_before", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
209
+ end
210
+
211
+ def callback(result)
212
+ @handler_returnValue = Result.new(result,nil)
213
+ @handler_continue.continue
214
+ end
215
+
216
+ end
@@ -0,0 +1,152 @@
1
+ <!--
2
+ This file is part of CPEE.
3
+
4
+ CPEE is free software: you can redistribute it and/or modify it under the terms
5
+ of the GNU General Public License as published by the Free Software Foundation,
6
+ either version 3 of the License, or (at your option) any later version.
7
+
8
+ CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
9
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
10
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
11
+
12
+ You should have received a copy of the GNU General Public License along with
13
+ CPEE (file COPYING in the main directory). If not, see
14
+ <http://www.gnu.org/licenses/>.
15
+ -->
16
+
17
+ require 'savon'
18
+
19
+ class SOAPHandlerWrapper < WEEL::HandlerWrapperBase
20
+ def initialize(arguments,endpoint=nil,position=nil,continue=nil) # {{{
21
+ @controller = arguments[0]
22
+ @url = arguments[1]
23
+ @handler_continue = continue
24
+ @handler_endpoint = endpoint
25
+ @handler_position = position
26
+ @handler_passthrough = nil
27
+ @handler_returnValue = nil
28
+ end # }}}
29
+
30
+ def activity_handle(passthrough, parameters) # {{{
31
+ @controller.notify("running/activity_calling", :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
32
+
33
+ if passthrough.nil?
34
+ callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
35
+ begin
36
+ client = Savon.client do
37
+ wsdl @handler_endpoint
38
+ log false
39
+ log_level :info
40
+ soap_header(
41
+ "CPEE_BASE" => @url,
42
+ "CPEE_INSTANCE" => "#{@url}/#{@controller.id}",
43
+ "CPEE_CALLBACK" => callback
44
+ )
45
+ end
46
+ params = {}
47
+ (parameters[:parameters] || {}).each do |h|
48
+ if h.class == Hash
49
+ h.each do |k,v|
50
+ params[k] = JSON::generate(v)
51
+ end
52
+ end
53
+ end
54
+ response = client.call parameters[:method].to_sym, params
55
+ result = response.body.first[1].first[1]
56
+ rescue Savon::Error => error
57
+ raise "Could not soap #{@handler_endpoint}->#{parameters[:method].to_sym}'s back: #{error.to_s}"
58
+ end
59
+
60
+ if response.http.headers["CPEE_CALLBACK"] && response.http.headers["CPEE_CALLBACK"] == 'true'
61
+ @controller.callbacks[callback] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
62
+ @handler_passthrough = callback
63
+ return
64
+ end
65
+ else
66
+ @controller.callbacks[passthrough] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
67
+ @handler_passthrough = passthrough
68
+ return
69
+ end
70
+
71
+ @handler_returnValue = result
72
+ @handler_continue.continue
73
+ end # }}}
74
+
75
+ def activity_result_status # {{{
76
+ WEEL::Status.new(1, "everything okay")
77
+ end # }}}
78
+
79
+ def activity_result_value # {{{
80
+ @handler_returnValue
81
+ end # }}}
82
+
83
+ def activity_stop # {{{
84
+ unless @handler_passthrough.nil?
85
+ @controller.callbacks.delete(@handler_passthrough)
86
+ end
87
+ end # }}}
88
+ def activity_passthrough_value # {{{
89
+ @handler_passthrough
90
+ end # }}}
91
+
92
+ def activity_no_longer_necessary # {{{
93
+ true
94
+ end # }}}
95
+
96
+ def inform_activity_done # {{{
97
+ @controller.notify("running/activity_done", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
98
+ end # }}}
99
+ def inform_activity_manipulate # {{{
100
+ @controller.notify("running/activity_manipulating", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
101
+ end # }}}
102
+ def inform_activity_failed(err) # {{{
103
+ puts err.message
104
+ puts err.backtrace
105
+ @controller.notify("running/activity_failed", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
106
+ end # }}}
107
+
108
+ def inform_syntax_error(err,code)# {{{
109
+ puts err.message
110
+ puts err.backtrace
111
+ @controller.notify("properties/description/error", :instance => "#{@url}/#{@controller.id}", :message => err.message)
112
+ end# }}}
113
+ def inform_manipulate_change(status,dataelements,endpoints) # {{{
114
+ unless status.nil?
115
+ @controller.serialize_status!
116
+ @controller.notify("properties/status/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :id => status.id, :message => status.message)
117
+ end
118
+ unless dataelements.nil?
119
+ @controller.serialize_dataelements!
120
+ @controller.notify("properties/dataelements/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => dataelements)
121
+ end
122
+ unless endpoints.nil?
123
+ @controller.serialize_endpoints!
124
+ @controller.notify("properties/endpoints/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => endpoints)
125
+ end
126
+ end # }}}
127
+ def inform_position_change(ipc={}) # {{{
128
+ @controller.serialize_positions!
129
+ ipc[:instance] = "#{@url}/#{@controller.id}"
130
+ @controller.notify("properties/position/change", ipc)
131
+ end # }}}
132
+ def inform_state_change(newstate) # {{{
133
+ if @controller
134
+ @controller.serialize_state!
135
+ @controller.notify("properties/state/change", :instance => "#{@url}/#{@controller.id}", :state => newstate)
136
+ end
137
+ end # }}}
138
+
139
+ def vote_sync_after # {{{
140
+ @controller.call_vote("running/syncing_after", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
141
+ end # }}}
142
+ def vote_sync_before # {{{
143
+ @controller.call_vote("running/syncing_before", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
144
+ end # }}}
145
+
146
+ def callback(result)
147
+ @handler_returnValue = result
148
+ @controller.callbacks.delete(@handler_passthrough)
149
+ @handler_passthrough = nil
150
+ @handler_continue.continue
151
+ end
152
+ end