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,66 @@
1
+ $(document).ready(function() {
2
+ // Color of save buttons for parameter area //{{{
3
+ $('#parameters table.tabbar td.tab:not(.switch):not(.tabbehind)').click(function(event){
4
+ mark_parameters_save($(event.target).parents('div.tabbed'));
5
+ }); //}}}
6
+
7
+ // Delete entries //{{{
8
+ $('#parameters td.del a').live('click',function(event){
9
+ var top = $(event.target).parents('.tabbed');
10
+ remove_entry($("input",$(event.target).parents('tr')).get(0),false);
11
+ mark_parameters_save(top);
12
+ return false;
13
+ }); //}}}
14
+
15
+ // New entry //{{{
16
+ $('#parameters .tabbehind button:nth-child(1)').click(function(){
17
+ new_entry($(this).parents('div.tabbed'));
18
+ }); //}}}
19
+
20
+ // Save entries //{{{
21
+ $('#parameters .tabbehind button:nth-child(2)').click(function(event){
22
+ save_parameters($(event.target).parents('div.tabbed'));
23
+ }); //}}}
24
+
25
+ $('#dat_dataelements input').live('keyup',function(e){ mark_parameters_save($(e.target).parents('div.tabbed')); });
26
+ $('#dat_endpoints input').live('keyup',function(e){ mark_parameters_save($(e.target).parents('div.tabbed')); });
27
+ });
28
+
29
+ function mark_parameters_save(top) { //{{{
30
+ var visid = $('table.tabbar td.tab',top).not('.switch').not('.inactive').attr('id').replace(/tab/,'');
31
+ var tab = $('#dat_' + visid);
32
+ if (serialize_inputs(tab) != save[visid]) {
33
+ $('table.tabbar .tabbehind button:nth-child(2)',top).addClass('highlight');
34
+ } else {
35
+ $('table.tabbar .tabbehind button:nth-child(2)',top).removeClass('highlight');
36
+ }
37
+ } //}}}
38
+ function save_parameters(top) { //{{{
39
+ var visid = $('table.tabbar td.tab',top).not('.switch').not('.inactive').attr('id').replace(/tab/,'');
40
+ var table = $('#dat_' + visid);
41
+ var serxml = serialize_inputs(table);
42
+
43
+ if (serxml != save[visid]) {
44
+ save[visid] = serxml;
45
+ var url = $("input[name=current-instance]").val();
46
+ $('table.tabbar .tabbehind button:nth-child(2)',top).removeClass('highlight');
47
+ $.ajax({
48
+ type: "PUT",
49
+ url: url + "/properties/values/" + visid + "/",
50
+ data: ({'content': serxml}),
51
+ });
52
+ }
53
+ } //}}}
54
+
55
+ function serialize_inputs(parent) { //{{{
56
+ var xml = $X('<content/>');
57
+ var fields = $('input',parent);
58
+ for (var i=0;i<fields.length; i+=2) {
59
+ var k = $(fields[i]).val();
60
+ var v = $(fields[i+1]).val();
61
+ if (k.match(/^[a-zA-Z][a-zA-Z0-9_]*$/)) {
62
+ xml.append($X('<' + k + '>' + v + '</' + k + '>'));
63
+ }
64
+ }
65
+ return xml.serializeXML();
66
+ } //}}}
@@ -0,0 +1,48 @@
1
+ $(document).ready(function() {
2
+ if (!($.browser.mozilla && parseInt($.browser.version) >= 8) && !($.browser.webkit && parseInt($.browser.version) >= 535)) {
3
+ $('body').children().remove();
4
+ $('body').append('Sorry, only Firefox >= 8.0 and Chrom(e|ium) >= 17 for now.');
5
+ }
6
+
7
+ // Resize areas
8
+ $('#detailcolumn').resizable({
9
+ handles: { 'w' : '#handle2'},
10
+ resize: function(event, ui) {
11
+ if ($.browser.webkit) {
12
+ $('#handle2').offset({ left: ui.helper.offset().left+3 });
13
+ }
14
+ }
15
+ });
16
+ $('#parameters .tabbelow').resizable({
17
+ handles: { 's' : '#handle1'},
18
+ resize: function(event, ui) {
19
+ $('#parameters .tabbelow').css('width','');
20
+ }
21
+ });
22
+ });
23
+
24
+ // flexible parameter input
25
+
26
+ function remove_entry(target,foc) { //{{{
27
+ var tr = $($(target).parents('tr').get(0));
28
+ if (foc) {
29
+ var par = tr.parent();
30
+ $('input.' + $(target).attr('class'),par).each(function(){
31
+ if (this == target) {
32
+ if (prev) prev.focus();
33
+ return false;
34
+ }
35
+ prev = this;
36
+ });
37
+ }
38
+ tr.remove();
39
+ } //}}}
40
+
41
+ function new_entry(top) { //{{{
42
+ var visid = $('table.tabbar td.tab',top).not('.switch').not('.inactive').attr('id').replace(/tab/,'');
43
+ var node = $('#dat_template_pair tr').clone();
44
+ var vnode = $('#dat_' + visid).append(node);
45
+ $('.pair_name',vnode).focus();
46
+ return node;
47
+ } //}}}
48
+
@@ -0,0 +1,1082 @@
1
+ function create_header(value){ //{{{
2
+ var tmp = $("#prop_template_header tr").clone();
3
+ $('.header_value',tmp).text(value);
4
+ return tmp;
5
+ } //}}}
6
+ function create_sizer(){ //{{{
7
+ var tmp = $("#prop_template_sizer tr").clone();
8
+ return tmp;
9
+ } //}}}
10
+ function create_line(main,text){ //{{{
11
+ var tmp = $("#prop_template_line tr").clone();
12
+ $('.line_main',tmp).text(main);
13
+ $('.line_text',tmp).text(text);
14
+ return tmp;
15
+ } //}}}
16
+ function create_element(content,svgid){ //{{{
17
+ var tmp = $("#prop_template_readonly tr").clone();
18
+ $('.prop_name',tmp).text('Element');
19
+ $('.prop_value',tmp).val(content);
20
+ $('.prop_value',tmp).addClass('pname_element');
21
+ $('.prop_value',tmp).parent().append($("<input type='hidden' class='pname_svgid' value='" + svgid + "'>"));
22
+ return tmp;
23
+ } //}}}
24
+ function create_readonly_property(name,content){ //{{{
25
+ var tmp = $("#prop_template_readonly tr").clone();
26
+ $('.prop_name',tmp).text(name);
27
+ $('.prop_value',tmp).val(content);
28
+ $('.prop_value',tmp).addClass('pname_' + name.toLowerCase());
29
+ return tmp;
30
+ } //}}}
31
+ function create_input_property(name,cls,content){ //{{{
32
+ var tmp = $("#prop_template_input tr").clone();
33
+ tmp.addClass(cls);
34
+ $('.prop_name',tmp).text(name);
35
+ $('.prop_value',tmp).val(content);
36
+ $('.prop_value',tmp).addClass('pname_' + name.toLowerCase());
37
+ return tmp;
38
+ } //}}}
39
+ function create_select_property(name,cls,content,alts){ //{{{
40
+ var tmp = $("#prop_template_select tr").clone();
41
+ tmp.addClass(cls);
42
+ $('.prop_name',tmp).text(name);
43
+ $('.prop_value',tmp).addClass('pname_' + name.toLowerCase());
44
+ $.each(alts,function(a,b){
45
+ var o = $('<option value="' + b + '">' + b + '</option>');
46
+ if (b == content) o.attr('selected','selected');
47
+ $('.prop_value',tmp).append(o);
48
+ });
49
+ return tmp;
50
+ } //}}}
51
+ function create_area_property(name,cls,content){ //{{{
52
+ var tmp = $("#prop_template_area tr").clone();
53
+ tmp.addClass(cls);
54
+ $('.prop_name',tmp).text(name);
55
+ $('.prop_value',tmp).addClass('pname_' + name.toLowerCase());
56
+ $('.prop_value',tmp).text(content);
57
+ return tmp;
58
+ } //}}}
59
+ function create_input_pair(name,cls,content){ //{{{
60
+ var tmp = $("#dat_template_pair tr").clone();
61
+ tmp.addClass(cls);
62
+ $('.pair_name',tmp).val(name);
63
+ $('.pair_value',tmp).val(content);
64
+ return tmp;
65
+ } //}}}
66
+
67
+ function CPEE(adaptor) {
68
+ this.adaptor = adaptor;
69
+ this.elements = elements = {};
70
+ this.events = events = {};
71
+
72
+ this.noarrow = noarrow = ['alternative', 'otherwise'];
73
+
74
+ // Events
75
+ this.events.mousedown = function(svgid, e, child, sibling) { // {{{
76
+ if(e.button == 0) { // left-click
77
+ } else if(e.button == 1) { // middle-click
78
+ } else if(e.button == 2) { // right-click
79
+ var xml_node = adaptor.description.get_node_by_svg_id(svgid);
80
+ var group = null;
81
+ var menu = {};
82
+
83
+ if(child) {
84
+ group = elements[xml_node.get(0).tagName].description.permissible_children(xml_node);
85
+ if(group.length > 0) menu['Insert into'] = group;
86
+ }
87
+ if(sibling) {
88
+ group = elements[xml_node.parent().get(0).tagName].description.permissible_children(xml_node);
89
+ if(group.length > 0) menu['Insert after'] = group;
90
+ }
91
+
92
+ if(xml_node.get(0).tagName != 'description')
93
+ menu['Remove Element'] = [{'label': 'Actual Element',
94
+ 'function_call': adaptor.description.remove,
95
+ 'menu_icon': function() {
96
+ var icon = elements[xml_node.get(0).tagName].illustrator.svg();
97
+ icon.children('.rfill').css({'fill':'red','fill-opacity':'0.5'});
98
+ return icon;
99
+ },
100
+ 'params': [null, xml_node]}];
101
+ if($('> manipulate', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
102
+ menu['Remove Element'].push({'label': 'Remove Script Block',
103
+ 'function_call': adaptor.description.remove,
104
+ 'menu_icon': function() {
105
+ var icon = elements.callmanipulate.illustrator.svg();
106
+ icon.children('.rfill:last').css({'fill':'red','fill-opacity':'0.5'});
107
+ return icon;
108
+ },
109
+ 'params': ['> manipulate', xml_node]});
110
+ }
111
+ contextmenu(menu, e);
112
+ }
113
+ return false;
114
+ } // }}}
115
+ this.events.click = function(svgid, e) { // {{{
116
+ if (adaptor.description.get_node_by_svg_id(svgid).length == 0) {
117
+ return;
118
+ }
119
+
120
+ $('#main .tabbehind button').show();
121
+ if ($('#main .tabbehind button').hasClass('highlight')) {
122
+ var check = confirm("Discard changes?");
123
+ if (check)
124
+ $('#main .tabbehind button').removeClass('highlight');
125
+ else
126
+ return;
127
+ }
128
+
129
+ var visid = 'details';
130
+ var tab = $('#dat_' + visid);
131
+ var node = adaptor.description.get_node_by_svg_id(svgid).get(0);
132
+
133
+ tab.empty();
134
+ tab.append(create_element(node.nodeName,svgid));
135
+ switch(node.nodeName) {
136
+ case 'call':
137
+ tab.append(create_readonly_property('ID',$(node).attr('id')));
138
+ tab.append(create_input_property('Endpoint','',$(node).attr('endpoint')));
139
+
140
+ if ($('manipulate',node).length > 0)
141
+ tab.append(create_area_property('Script','',format_text_skim($('manipulate',node).text())));
142
+
143
+ tab.append(create_header('Parameters:'));
144
+
145
+ tab.append(create_input_property('Label','indent',$('parameters label',node).text()));
146
+ tab.append(create_input_property('Method','indent',$('parameters method',node).text()));
147
+ $.each($('parameters parameters *',node),function(){
148
+ tab.append(create_input_pair(this.nodeName,'indent',$(this).text()));
149
+ });
150
+ break;
151
+ case 'manipulate':
152
+ tab.append(create_readonly_property('ID',$(node).attr('id')));
153
+ tab.append(create_area_property('Script','',format_text_skim($(node).text())));
154
+ break;
155
+ case 'loop':
156
+ if ($(node).attr('pre_test') != undefined)
157
+ var mode = 'pre_test';
158
+ if ($(node).attr('post_test') != undefined)
159
+ var mode = 'post_test';
160
+ tab.append(create_select_property('Mode','',mode,['post_test','pre_test']));
161
+ tab.append(create_input_property('Condition','',$(node).attr(mode)));
162
+ break;
163
+ case 'choose':
164
+ break;
165
+ case 'alternative':
166
+ tab.append(create_input_property('Condition','',$(node).attr('condition')));
167
+ break;
168
+ case 'critical':
169
+ var sid = ($(node).attr('sid') == '' ? 'section' : $(node).attr('sid'));
170
+ tab.append(create_input_property('SID','',sid));
171
+ tab.append(create_line('Hint','Identical SID\'s shared by between differnt "critical" elements define mutual exclusive areas'));
172
+ break;
173
+ case 'parallel':
174
+ var wait = ($(node).attr('wait') == '' || $(node).attr('wait') == undefined ? '-1' : $(node).attr('wait'));
175
+ tab.append(create_input_property('Wait','',wait));
176
+ tab.append(create_line('Hint','-1 to wait for all branches'));
177
+ break;
178
+ case 'parallel_branch':
179
+ tab.append(create_input_property('Pass to branch','',$(node).attr('pass')));
180
+ tab.append(create_input_property('Local scope','',$(node).attr('local')));
181
+ break;
182
+ // TODO group
183
+ }
184
+ // add the sizer in order for colspan to work
185
+ tab.append(create_sizer());
186
+ save['details'] = serialize_details(tab).serializeXML();
187
+ } // }}}
188
+ this.events.dblclick = function(svgid, e) { // {{{
189
+ $('.tile[element-id = "' + svgid + '"]').css('display','none');
190
+ var xml_node = adaptor.description.get_node_by_svg_id(svgid);
191
+ if(xml_node.attr('collapsed') == undefined || xml_node.attr('collapsed') == 'false') {xml_node.attr('collapsed','true');}
192
+ else {xml_node.attr('collapsed','false');}
193
+ adaptor.description.update(svgid);
194
+ return false;
195
+ } // }}}
196
+ this.events.mouseover = function(svgid, e) { // {{{
197
+ $('.tile[element-id = "' + svgid + '"]').css('display','block');
198
+ return false;
199
+ } // }}}
200
+ this.events.mouseout = function(svgid, e) { // {{{
201
+ $('.tile[element-id = "' + svgid + '"]').css('display','none');
202
+ return false;
203
+ } // }}}
204
+ this.events.dragstart = function (svgid, e) { //{{{
205
+ } //}}}
206
+
207
+ // Primitive Elements
208
+ this.elements.callinjection = { /*{{{*/
209
+ 'illustrator': {//{{{
210
+ 'type' : 'abstract',
211
+ 'svg': function() {
212
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
213
+ '<circle cx="15" cy="15" r="14" class="rfill stand"/>' +
214
+ '<text transform="translate(15,21)" class="normal">c</text>' +
215
+ '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
216
+ '<text transform="translate(28,31)" class="small">i</text>' +
217
+ '</svg>');
218
+ }
219
+ },//}}}
220
+ 'description' : {//{{{
221
+ 'create': function(target) {
222
+ var node = null;
223
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
224
+ return node;
225
+ },
226
+ 'permissible_children': function(node) {
227
+ if(node.children('manipulate').lenght < 1)
228
+ return [
229
+ {'label': 'Script Block',
230
+ 'function_call': adaptor.description.insert_last_into,
231
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
232
+ 'params': [adaptor.description.elements.manipulate.create, node]}
233
+ ];
234
+ return [];
235
+ }
236
+ },//}}}
237
+ 'adaptor' : {//{{{
238
+ 'mousedown': function (node, e) {
239
+ events.mousedown(node,e,true, true);
240
+ },
241
+ 'click': events.click,
242
+ }//}}}
243
+ }; /*}}}*/
244
+ this.elements.callcorrelation = { /*{{{*/
245
+ 'illustrator': {//{{{
246
+ 'type' : 'abstract',
247
+ 'svg': function() {
248
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
249
+ '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
250
+ '<path transform="scale(0.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>' +
251
+ '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
252
+ '<text transform="translate(28,31)" class="small">c</text>' +
253
+ '</svg>');
254
+ }
255
+ },//}}}
256
+ 'description' : {//{{{
257
+ 'create': function(target) {
258
+ var node = null;
259
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="correlation" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
260
+ return node;
261
+ },
262
+ 'permissible_children': function(node) {
263
+ if(node.children('manipulate').lenght < 1)
264
+ return [
265
+ {'label': 'Script Block',
266
+ 'function_call': adaptor.description.insert_last_into,
267
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
268
+ 'params': [adaptor.description.elements.manipulate.create, node]}
269
+ ];
270
+ return [];
271
+ }
272
+ },//}}}
273
+ 'adaptor' : {//{{{
274
+ 'mousedown': function (node, e) {
275
+ events.mousedown(node,e,true, true);
276
+ },
277
+ 'click': events.click,
278
+ }//}}}
279
+ }; /*}}}*/
280
+ this.elements.callinstantiation = { /*{{{*/
281
+ 'illustrator': {//{{{
282
+ 'type' : 'abstract',
283
+ 'svg': function() {
284
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
285
+ '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
286
+ '<path transform="scale(0.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>' +
287
+ '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
288
+ '<text transform="translate(28,32)" class="small">i</text>' +
289
+ '</svg>');
290
+ }
291
+ },//}}}
292
+ 'description' : {//{{{
293
+ 'create': function(target) {
294
+ var node = null;
295
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="instantiate" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
296
+ return node;
297
+ },
298
+ 'permissible_children': function(node) {
299
+ if(node.children('manipulate').lenght < 1)
300
+ return [
301
+ {'label': 'Script Block',
302
+ 'function_call': adaptor.description.insert_last_into,
303
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
304
+ 'params': [adaptor.description.elements.manipulate.create, node]}
305
+ ];
306
+ return [];
307
+ }
308
+ },//}}}
309
+ 'adaptor' : {//{{{
310
+ 'mousedown': function (node, e) {
311
+ events.mousedown(node,e,true, true);
312
+ },
313
+ 'click': events.click,
314
+ }//}}}
315
+ }; /*}}}*/
316
+ this.elements.callmanipulate = { /*{{{*/
317
+ 'illustrator': {//{{{
318
+ 'type' : 'abstract',
319
+ 'svg': function() {
320
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
321
+ '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
322
+ '<path transform="scale(0.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>' +
323
+ '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
324
+ '<text transform="translate(28,31)" class="small">s</text>' +
325
+ '</svg>');
326
+ }
327
+ },//}}}
328
+ 'description' : {//{{{
329
+ 'create': function(target) {
330
+ var node = null;
331
+ node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label></label><method>post</method><parameters/></parameters><manipulate output="result"/></call>');
332
+ return node;
333
+ },
334
+ 'permissible_children': function(node) {
335
+ if(node.children('manipulate').lenght < 1)
336
+ return [
337
+ {'label': 'Script Block',
338
+ 'function_call': adaptor.description.insert_last_into,
339
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
340
+ 'params': [adaptor.description.elements.manipulate.create, node]}
341
+ ];
342
+ return [];
343
+ }
344
+ },//}}}
345
+ 'adaptor' : {//{{{
346
+ 'mousedown': function (node, e) {
347
+ events.mousedown(node,e,true, true);
348
+ },
349
+ 'click': events.click,
350
+ }//}}}
351
+ }; /*}}}*/
352
+ this.elements.call = { /*{{{*/
353
+ 'illustrator': {//{{{
354
+ 'type' : 'primitive',
355
+ 'endnodes' : 'this',
356
+ 'resolve_symbol' : function(node) {
357
+ if($(node).attr('endpoint') == 'instantiation') {
358
+ return 'callinstantiation';
359
+ return illustrator.elements.callinstantiation.draw(node, pos, block);
360
+ } else if($(node).attr('endpoint') == 'correlation') {
361
+ return 'callcorrelation';
362
+ return illustrator.elements.callcorrelation.draw(node, pos, block);
363
+ } else if($('parameters > service', node).length > 0) {
364
+ return 'callinjection';
365
+ return illustrator.elements.callinjection.draw(node, pos, block);
366
+ } else if($('manipulate', node).length > 0) {
367
+ return 'callmanipulate';
368
+ return illustrator.elements.callmanipulate.draw(node, pos, block);
369
+ } else {
370
+ return'call'
371
+ return illustrator.draw.draw_symbol('call', $(node).attr('svg-id'), pos.row, pos.col);
372
+ }
373
+ },
374
+ 'svg': function() {
375
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
376
+ '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
377
+ '<path transform="scale(0.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>' +
378
+ '</svg>');
379
+ }
380
+ },//}}}
381
+ 'description' : {//{{{
382
+ 'create': function(target) {
383
+ var node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://cpee.org/ns/description/1.0"/>');
384
+ node.append($X('<parameters xmlns="http://cpee.org/ns/description/1.0"><label></label><method>post</method><parameters/></parameters>'));
385
+ return node;
386
+ },
387
+ 'permissible_children': function(node) {
388
+ if(node.children('manipulate').length < 1)
389
+ return [
390
+ {'label': 'Script Block',
391
+ 'function_call': adaptor.description.insert_last_into,
392
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
393
+ 'params': [adaptor.description.elements.manipulate.create, node]}
394
+ ];
395
+ return [];
396
+ }
397
+ },//}}}
398
+ 'adaptor' : {//{{{
399
+ 'mousedown': function (node, e) {
400
+ events.mousedown(node,e,true, true);
401
+ },
402
+ 'click': events.click,
403
+ 'dragstart': events.dragstart,
404
+ }//}}}
405
+ }; /*}}}*/
406
+ this.elements.manipulate = { /*{{{*/
407
+ 'illustrator': {//{{{
408
+ 'type' : 'primitive',
409
+ 'endnodes' : 'this',
410
+ 'svg': function() {
411
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
412
+ '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
413
+ '<text transform="translate(15,21)" class="normal">s</text>' +
414
+ '</svg>');
415
+ }
416
+ },//}}}
417
+ 'description' : {//{{{
418
+ 'create': function(target) {
419
+ var node = $X('<manipulate id="' + adaptor.description.get_free_id() + '" xmlns="http://cpee.org/ns/description/1.0"/>');
420
+ return node;
421
+ },
422
+ 'permissible_children': function(node) {
423
+ return [];
424
+ }
425
+ },//}}}
426
+ 'adaptor' : {//{{{
427
+ 'mousedown': function (node, e) {
428
+ events.mousedown(node,e,false, true);
429
+ },
430
+ 'click': events.click,
431
+ }//}}}
432
+ }; /*}}}*/
433
+ this.elements.constraints = { /*{{{*/
434
+ 'illustrator': {//{{{
435
+ 'type' : 'primitive',
436
+ 'endnodes' : 'this',
437
+ 'svg': function() {
438
+ return false;
439
+ }
440
+ },//}}}
441
+ 'description' : {//{{{
442
+ 'create': function(target) {
443
+ var node = $X('<manipulate id="' + adaptor.description.get_free_id() + '" xmlns="http://cpee.org/ns/description/1.0"/>');
444
+ return node;
445
+ },
446
+ 'permissible_children': function(node) {
447
+ return [];
448
+ }
449
+ },//}}}
450
+ 'adaptor' : {//{{{
451
+ 'mousedown': function (node, e) {
452
+ events.mousedown(node,e,false, true);
453
+ },
454
+ 'click': events.click,
455
+ }//}}}
456
+ }; /*}}}*/
457
+
458
+ // Complex Elements
459
+ this.elements.choose = { /*{{{*/
460
+ 'illustrator': {//{{{
461
+ 'type' : 'complex',
462
+ 'endnodes' : 'aggregate',
463
+ 'closeblock': false,
464
+ 'expansion' : function(node) {
465
+ return 'horizontal';
466
+ },
467
+ 'col_shift' : function(node) {
468
+ return false;
469
+ },
470
+ 'svg': function() {
471
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
472
+ '<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>' +
473
+ '<circle cx="15.5" cy="15.5" r="7" class="stand"/>' +
474
+ '</svg>');
475
+ }
476
+ },//}}}
477
+ 'description' : {//{{{
478
+ 'create': function(target) {
479
+ var node = $X('<choose xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
480
+ return node;
481
+ },
482
+ 'insertable' : function(parent_node, index) {
483
+ return true;
484
+ return false;
485
+ },
486
+ 'permissible_children': function(node) {
487
+ var func = null;
488
+ if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
489
+ else { func = adaptor.description.insert_after }
490
+ if(node.children('parallel_branch').length > 0) {
491
+ return [{'label': 'Parallel Branch',
492
+ 'function_call': func,
493
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
494
+ 'params': [adaptor.description.elements.parallel_branch.create, node]}];
495
+ }
496
+ var childs = [{'label': 'Alternative',
497
+ 'function_call': func,
498
+ 'menu_icon': elements.alternative.illustrator.svg,
499
+ 'params': [adaptor.description.elements.alternative.create, node]}];
500
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
501
+ childs.push({'label': 'Otherwise',
502
+ 'function_call': func,
503
+ 'menu_icon': elements.otherwise.illustrator.svg,
504
+ 'params': [adaptor.description.elements.otherwise.create, node]});
505
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
506
+ childs.push({'label': 'Parallel Branch',
507
+ 'function_call': func,
508
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
509
+ 'params': [adaptor.description.elements.parallel_branch.create, node]});
510
+ return childs;
511
+ }
512
+ },//}}}
513
+ 'adaptor' : {//{{{
514
+ 'mousedown': function (node, e) {
515
+ events.mousedown(node,e,true, true);
516
+ },
517
+ 'click': events.click,
518
+ 'dblclick': events.dblclick,
519
+ 'mouseover': events.mouseover,
520
+ 'mouseout': events.mouseout,
521
+ }//}}}
522
+ }; /*}}}*/
523
+ this.elements.otherwise = { /*{{{*/
524
+ 'illustrator': {//{{{
525
+ 'type' : 'complex',
526
+ 'endnodes' : 'passthrough',
527
+ 'closeblock': false,
528
+ 'expansion' : function(node) {
529
+ return 'vertical';
530
+ },
531
+ 'col_shift' : function(node) {
532
+ return false;
533
+ },
534
+ 'svg': function() {
535
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
536
+ '<line x1="15" y1="0" x2="15" y2="28" class="standwithout"/>' +
537
+ '<line x1="9" y1="21" x2="21" y2="9" class="stand"/>' +
538
+ '</svg>');
539
+ }
540
+ },//}}}
541
+ 'description' : {//{{{
542
+ 'create': function(target) {
543
+ var node = $X('<otherwise xmlns="http://cpee.org/ns/description/1.0"/>');
544
+ return node;
545
+ },
546
+ 'insertable' : function(parent_node, index) {
547
+ return true;
548
+ return false;
549
+ },
550
+ 'permissible_children': function(node) {
551
+ var func = null;
552
+ var childs = null;
553
+ if(node.get(0).tagName == 'otherwise') { func = adaptor.description.insert_first_into }
554
+ else { func = adaptor.description.insert_after }
555
+ return [
556
+ {'label': 'Service Call with Script Block',
557
+ 'function_call': func,
558
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
559
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
560
+ {'label': 'Service Call',
561
+ 'function_call': func,
562
+ 'menu_icon': elements.call.illustrator.svg,
563
+ 'params': [adaptor.description.elements.call.create, node]},
564
+ {'label': 'Script',
565
+ 'function_call': func,
566
+ 'menu_icon': elements.manipulate.illustrator.svg,
567
+ 'params': [adaptor.description.elements.manipulate.create, node]},
568
+ {'label': 'Parallel',
569
+ 'function_call': func,
570
+ 'menu_icon': elements.parallel.illustrator.svg,
571
+ 'params': [adaptor.description.elements.parallel.create, node]},
572
+ {'label': 'Choose',
573
+ 'function_call': func,
574
+ 'menu_icon': elements.choose.illustrator.svg,
575
+ 'params': [adaptor.description.elements.choose.create, node]},
576
+ {'label': 'Loop',
577
+ 'function_call': func,
578
+ 'menu_icon': elements.loop.illustrator.svg,
579
+ 'params': [adaptor.description.elements.loop.create, node]},
580
+ {'label': 'Critical',
581
+ 'function_call': func,
582
+ 'menu_icon': elements.critical.illustrator.svg,
583
+ 'params': [adaptor.description.elements.critical.create, node]}
584
+ ];
585
+ }
586
+ },//}}}
587
+ 'adaptor' : {//{{{
588
+ 'mousedown': function (node, e) {
589
+ events.mousedown(node,e,true, false);
590
+ },
591
+ 'click': events.click,
592
+ 'dblclick': events.dblclick,
593
+ 'mouseover': events.mouseover,
594
+ 'mouseout': events.mouseout,
595
+ }//}}}
596
+ }; /*}}}*/
597
+ this.elements.alternative = { /*{{{*/
598
+ 'illustrator': {//{{{
599
+ 'type' : 'complex',
600
+ 'endnodes' : 'passthrough',
601
+ 'closeblock':false,
602
+ 'expansion' : function(node) {
603
+ return 'vertical';
604
+ },
605
+ 'col_shift' : function(node) {
606
+ return false;
607
+ },
608
+ 'svg': function() {
609
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
610
+ '<circle cx="15" cy="15" r="14" class="standwithout"/>' +
611
+ '<text transform="translate(15,20)" class="normal">{..}</text>' +
612
+ '</svg>');
613
+ }
614
+ },//}}}
615
+ 'description' : {//{{{
616
+ 'create': function(target) {
617
+ var node = $X('<alternative condition="" xmlns="http://cpee.org/ns/description/1.0"/>');
618
+ return node;
619
+ },
620
+ 'insertable' : function(parent_node, index) {
621
+ return true;
622
+ return false;
623
+ },
624
+ 'permissible_children': function(node) {
625
+ if(node.get(0).tagName == 'alternative') { func = adaptor.description.insert_first_into }
626
+ else { func = adaptor.description.insert_after }
627
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative')
628
+ return [{'label': 'Parallel Branch',
629
+ 'function_call': func,
630
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
631
+ 'params': [adaptor.description.elements.parallel_branch.create, node]}];
632
+ return [
633
+ {'label': 'Service Call with Script Block',
634
+ 'function_call': func,
635
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
636
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
637
+ {'label': 'Service Call',
638
+ 'function_call': func,
639
+ 'menu_icon': elements.call.illustrator.svg,
640
+ 'params': [adaptor.description.elements.call.create, node]},
641
+ {'label': 'Script',
642
+ 'function_call': func,
643
+ 'menu_icon': elements.manipulate.illustrator.svg,
644
+ 'params': [adaptor.description.elements.manipulate.create, node]},
645
+ {'label': 'Parallel',
646
+ 'function_call': func,
647
+ 'menu_icon': elements.parallel.illustrator.svg,
648
+ 'params': [adaptor.description.elements.parallel.create, node]},
649
+ {'label': 'Choose',
650
+ 'function_call': func,
651
+ 'menu_icon': elements.choose.illustrator.svg,
652
+ 'params': [adaptor.description.elements.choose.create, node]},
653
+ {'label': 'Loop',
654
+ 'function_call': func,
655
+ 'menu_icon': elements.loop.illustrator.svg,
656
+ 'params': [adaptor.description.elements.loop.create, node]},
657
+ {'label': 'Critical',
658
+ 'function_call': func,
659
+ 'menu_icon': elements.critical.illustrator.svg,
660
+ 'params': [adaptor.description.elements.critical.create, node]}
661
+ ];
662
+ }
663
+ },//}}}
664
+ 'adaptor' : {//{{{
665
+ 'mousedown': function (node, e) {
666
+ events.mousedown(node,e,true, false);
667
+ },
668
+ 'click': events.click,
669
+ 'dblclick': events.dblclick,
670
+ 'mouseover': events.mouseover,
671
+ 'mouseout': events.mouseout,
672
+ }//}}}
673
+ }; /*}}}*/
674
+ this.elements.loop = { /*{{{*/
675
+ 'illustrator': {//{{{
676
+ 'type' : 'complex',
677
+ 'endnodes' : 'this',
678
+ 'closeblock' : true,
679
+ 'expansion' : function(node) {
680
+ return 'vertical';
681
+ },
682
+ 'col_shift' : function(node) {
683
+ return true;
684
+ },
685
+ 'svg': function() {
686
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
687
+ '<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>' +
688
+ '<line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>' +
689
+ '<line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>' +
690
+ '</svg>');
691
+ }
692
+ },// }}}
693
+ 'description' : {//{{{
694
+ 'create': function(target) {
695
+ var node = $X('<loop pre_test="" xmlns="http://cpee.org/ns/description/1.0"/>');
696
+ return node;
697
+ },
698
+ 'permissible_children': function(node) {
699
+ var func = null;
700
+ if(node.get(0).tagName == 'loop') { func = adaptor.description.insert_first_into }
701
+ else { func = adaptor.description.insert_after }
702
+ var childs = [
703
+ {'label': 'Service Call with Script Block',
704
+ 'function_call': func,
705
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
706
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
707
+ {'label': 'Service Call',
708
+ 'function_call': func,
709
+ 'menu_icon': elements.call.illustrator.svg,
710
+ 'params': [adaptor.description.elements.call.create, node]},
711
+ {'label': 'Manipulate',
712
+ 'function_call': func,
713
+ 'menu_icon': elements.manipulate.illustrator.svg,
714
+ 'params': [adaptor.description.elements.manipulate.create, node]},
715
+ {'label': 'Choose',
716
+ 'function_call': func,
717
+ 'menu_icon': elements.choose.illustrator.svg,
718
+ 'params': [adaptor.description.elements.choose.create, node]},
719
+ {'label': 'Loop',
720
+ 'function_call': func,
721
+ 'menu_icon': elements.loop.illustrator.svg,
722
+ 'params': [adaptor.description.elements.loop.create, node]},
723
+ {'label': 'Critical',
724
+ 'function_call': func,
725
+ 'menu_icon': elements.critical.illustrator.svg,
726
+ 'params': [adaptor.description.elements.critical.create, node]}
727
+ ];
728
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
729
+ childs.push({'label': 'Parallel Branch',
730
+ 'function_call': func,
731
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
732
+ 'params': [adaptor.description.elements.parallel_branch.create, node]}
733
+ );
734
+ } else {
735
+ childs.push({'label': 'Parallel',
736
+ 'function_call': func,
737
+ 'menu_icon': elements.parallel.illustrator.svg,
738
+ 'params': [adaptor.description.elements.parallel.create, node]}
739
+ );
740
+ }
741
+ return childs;
742
+ }
743
+ },//}}}
744
+ 'adaptor' : {//{{{
745
+ 'mousedown': function (node, e) {
746
+ events.mousedown(node,e,true, true);
747
+ },
748
+ 'click': events.click,
749
+ 'dblclick': events.dblclick,
750
+ 'mouseover': events.mouseover,
751
+ 'mouseout': events.mouseout,
752
+ }//}}}
753
+ }; /*}}}*/
754
+ this.elements.parallel = { /*{{{*/
755
+ 'illustrator': {//{{{
756
+ 'type' : 'complex',
757
+ 'endnodes' : 'this',
758
+ 'closeblock' : false,
759
+ 'border': true,
760
+ 'expansion' : function(node) {
761
+ // check if any sibling other than 'parallel_branch' is present
762
+ if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
763
+ return 'horizontal';
764
+ },
765
+ 'col_shift' : function(node) {
766
+ return true;
767
+ },
768
+ 'svg': function() {
769
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
770
+ '<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>' +
771
+ '<text transform="translate(12,25)" class="normallarge">+</text>' +
772
+ '<text transform="translate(18,16)" class="small">=</text>' +
773
+ '</svg>');
774
+ }
775
+ },//}}}
776
+ 'description' : {//{{{
777
+ 'create': function(target) {
778
+ var node = $X('<parallel xmlns="http://cpee.org/ns/description/1.0"/>');
779
+ return node;
780
+ },
781
+ 'permissible_children': function(node) {
782
+ var childs = [
783
+ {'label': 'Service Call with Script Block',
784
+ 'function_call': adaptor.description.insert_last_into,
785
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
786
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
787
+ {'label': 'Service Call',
788
+ 'function_call': adaptor.description.insert_last_into,
789
+ 'menu_icon': elements.call.illustrator.svg,
790
+ 'params': [adaptor.description.elements.call.create, node]},
791
+ {'label': 'Manipulate',
792
+ 'function_call': adaptor.description.insert_last_into,
793
+ 'menu_icon': elements.manipulate.illustrator.svg,
794
+ 'params': [adaptor.description.elements.manipulate.create, node]},
795
+ {'label': 'Choose',
796
+ 'function_call': adaptor.description.insert_last_into,
797
+ 'menu_icon': elements.choose.illustrator.svg,
798
+ 'params': [adaptor.description.elements.choose.create, node]},
799
+ {'label': 'Loop',
800
+ 'function_call': adaptor.description.insert_last_into,
801
+ 'menu_icon': elements.loop.illustrator.svg,
802
+ 'params': [adaptor.description.elements.loop.create, node]},
803
+ {'label': 'Critical',
804
+ 'function_call': adaptor.description.insert_last_into,
805
+ 'menu_icon': elements.critical.illustrator.svg,
806
+ 'params': [adaptor.description.elements.critical.create, node]},
807
+ {'label': 'Parallel Branch',
808
+ 'function_call': adaptor.description.insert_last_into,
809
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
810
+ 'params': [adaptor.description.elements.parallel_branch.create, node]}
811
+ ];
812
+ if(node.get(0).tagName != 'parallel')
813
+ childs.push({'label': 'Parallel',
814
+ 'function_call': adaptor.description.insert_last_into,
815
+ 'menu_icon': elements.parallel.illustrator.svg,
816
+ 'params': [adaptor.description.elements.parallel.create, node]});
817
+ return childs;
818
+ }
819
+ },//}}}
820
+ 'adaptor' : {//{{{
821
+ 'mousedown': function (node, e) {
822
+ events.mousedown(node,e,true, true);
823
+ },
824
+ 'click': events.click,
825
+ 'dblclick': events.dblclick,
826
+ 'mouseover': events.mouseover,
827
+ 'mouseout': events.mouseout,
828
+ }//}}}
829
+ }; /*}}}*/
830
+ this.elements.parallel_branch = { /*{{{*/
831
+ 'illustrator': {//{{{
832
+ 'type' : 'complex',
833
+ 'endnodes' : 'this',
834
+ 'closeblock' : false,
835
+ 'expansion' : function(node) {
836
+ return 'vertical';
837
+ },
838
+ 'col_shift' : function(node) {
839
+ if(node.parentNode.tagName == 'choose') return false;
840
+ if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
841
+ return false;
842
+ },
843
+ 'svg': function() {
844
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
845
+ '<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>' +
846
+ '<text transform="translate(15,20)" class="small">+|</text>' +
847
+ '</svg>');
848
+ }
849
+ },//}}}
850
+ 'description' : {//{{{
851
+ 'create': function(target) {
852
+ var node = $X('<parallel_branch xmlns="http://cpee.org/ns/description/1.0"/>');
853
+ return node;
854
+ },
855
+ 'permissible_children': function(node) {
856
+ var func = null;
857
+ var childs = null;
858
+ if(node.get(0).tagName == 'parallel_branch') { func = adaptor.description.insert_first_into }
859
+ else { func = adaptor.description.insert_after }
860
+ childs = [
861
+ {'label': 'Service Call with Script Block',
862
+ 'function_call': func,
863
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
864
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
865
+ {'label': 'Service Call',
866
+ 'function_call': func,
867
+ 'menu_icon': elements.call.illustrator.svg,
868
+ 'params': [adaptor.description.elements.call.create, node]},
869
+ {'label': 'Script',
870
+ 'function_call': func,
871
+ 'menu_icon': elements.manipulate.illustrator.svg,
872
+ 'params': [adaptor.description.elements.manipulate.create, node]},
873
+ {'label': 'Parallel',
874
+ 'function_call': func,
875
+ 'menu_icon': elements.parallel.illustrator.svg,
876
+ 'params': [adaptor.description.elements.parallel.create, node]},
877
+ {'label': 'Choose',
878
+ 'function_call': func,
879
+ 'menu_icon': elements.choose.illustrator.svg,
880
+ 'params': [adaptor.description.elements.choose.create, node]},
881
+ {'label': 'Loop',
882
+ 'function_call': func,
883
+ 'menu_icon': elements.loop.illustrator.svg,
884
+ 'params': [adaptor.description.elements.loop.create, node]},
885
+ {'label': 'Critical',
886
+ 'function_call': func,
887
+ 'menu_icon': elements.critical.illustrator.svg,
888
+ 'params': [adaptor.description.elements.critical.create, node]},
889
+ ];
890
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
891
+ return [{'label': 'Alternative',
892
+ 'function_call': func,
893
+ 'menu_icon': elements.alternative.illustrator.svg,
894
+ 'params': [adaptor.description.elements.alternative.create, node]}];
895
+ }
896
+ return childs;
897
+ }
898
+ },//}}}
899
+ 'adaptor' : {//{{{
900
+ 'mousedown': function (node, e) {
901
+ events.mousedown(node,e,true, false);
902
+ },
903
+ 'click': events.click,
904
+ 'dblclick': events.dblclick,
905
+ 'mouseover': events.mouseover,
906
+ 'mouseout': events.mouseout,
907
+ }//}}}
908
+ }; /*}}}*/
909
+ this.elements.critical = { /*{{{*/
910
+ 'illustrator': {//{{{
911
+ 'type' : 'complex',
912
+ 'endnodes' : 'aggregate',
913
+ 'closeblock' : false,
914
+ 'border': true,
915
+ 'expansion' : function(node) {
916
+ return 'vertical';
917
+ },
918
+ 'col_shift' : function(node) {
919
+ return true;
920
+ },
921
+ 'svg': function() {
922
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
923
+ '<circle cx="15" cy="15" r="14" class="stand"/>' +
924
+ '<text transform="translate(15,21)" class="normal">⚠</text>' +
925
+ '</svg>');
926
+ }
927
+ },//}}}
928
+ 'description' : {//{{{
929
+ 'create': function(target) {
930
+ var node = $X('<critical sid="section" xmlns="http://cpee.org/ns/description/1.0"/>');
931
+ return node;
932
+ },
933
+ 'permissible_children': function(node) {
934
+ var func = null;
935
+ if(node.get(0).tagName == 'critical') { func = adaptor.description.insert_first_into }
936
+ else { func = adaptor.description.insert_after }
937
+ return [
938
+ {'label': 'Service Call with Script Block',
939
+ 'function_call': func,
940
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
941
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
942
+ {'label': 'Service Call',
943
+ 'function_call': func,
944
+ 'menu_icon': elements.call.illustrator.svg,
945
+ 'params': [adaptor.description.elements.call.create, node]},
946
+ {'label': 'Script',
947
+ 'function_call': func,
948
+ 'menu_icon': elements.manipulate.illustrator.svg,
949
+ 'params': [adaptor.description.elements.manipulate.create, node]},
950
+ {'label': 'Parallel',
951
+ 'function_call': func,
952
+ 'menu_icon': elements.parallel.illustrator.svg,
953
+ 'params': [adaptor.description.elements.parallel.create, node]},
954
+ {'label': 'Choose',
955
+ 'function_call': func,
956
+ 'menu_icon': elements.choose.illustrator.svg,
957
+ 'params': [adaptor.description.elements.choose.create, node]},
958
+ {'label': 'Loop',
959
+ 'function_call': func,
960
+ 'menu_icon': elements.loop.illustrator.svg,
961
+ 'params': [adaptor.description.elements.loop.create, node]},
962
+ {'label': 'Critical',
963
+ 'function_call': func,
964
+ 'menu_icon': elements.critical.illustrator.svg,
965
+ 'params': [adaptor.description.elements.critical.create, node]},
966
+ ];
967
+ }
968
+ },//}}}
969
+ 'adaptor' : {//{{{
970
+ 'mousedown': function (node, e) {
971
+ events.mousedown(node,e,true, true);
972
+ },
973
+ 'click': events.click,
974
+ 'dblclick': events.dblclick,
975
+ 'mouseover': events.mouseover,
976
+ 'mouseout': events.mouseout,
977
+ }//}}}
978
+ }; /*}}}*/
979
+ this.elements.group = { /*{{{*/
980
+ 'illustrator': {//{{{
981
+ 'type' : 'complex',
982
+ 'endnodes' : 'aggregate',
983
+ 'closeblock' : false,
984
+ 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
985
+ 'expansion' : function(node) {
986
+ return 'vertical';
987
+ },
988
+ 'col_shift' : function(node) {
989
+ return true;
990
+ },
991
+ 'svg': function() {
992
+ return false;
993
+ }
994
+ },//}}}
995
+ 'description' : {//{{{
996
+ 'create': function(target) {
997
+ var node = $X('<critical sid="section" xmlns="http://cpee.org/ns/description/1.0"/>');
998
+ return node;
999
+ },
1000
+ 'permissible_children': function(node) {
1001
+ var func = null;
1002
+ if(node.get(0).tagName == 'group') { func = adaptor.description.insert_first_into }
1003
+ else { func = adaptor.description.insert_after }
1004
+ return [
1005
+ ];
1006
+ }
1007
+ },//}}}
1008
+ 'adaptor' : {//{{{
1009
+ 'mousedown': function (node, e) {
1010
+ events.mousedown(node,e,true, true);
1011
+ },
1012
+ 'click': events.click,
1013
+ 'dblclick': events.dblclick,
1014
+ 'mouseover': events.mouseover,
1015
+ 'mouseout': events.mouseout,
1016
+ }//}}}
1017
+ }; /*}}}*/
1018
+ this.elements.start = this.elements.description = { /*{{{*/
1019
+ 'illustrator': {//{{{
1020
+ 'type' : 'description',
1021
+ 'endnodes' : 'passthrough',
1022
+ 'closeblock' : false,
1023
+ 'expansion' : function(node) {
1024
+ return 'vertical';
1025
+ },
1026
+ 'col_shift' : function(node) {
1027
+ return true;
1028
+ },
1029
+ 'svg': function() {
1030
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
1031
+ '<circle cx="15" cy="15" r="14" class="stand"/>' +
1032
+ '</svg>');
1033
+ }
1034
+ },//}}}
1035
+ 'description' : {//{{{
1036
+ 'permissible_children': function(node) {
1037
+ var func = null;
1038
+ if(node.get(0).tagName == 'description') { func = adaptor.description.insert_first_into }
1039
+ else { func = adaptor.description.insert_after }
1040
+ return [
1041
+ {'label': 'Service Call with Script Block',
1042
+ 'function_call': func,
1043
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
1044
+ 'params': [adaptor.description.elements.callmanipulate.create, node]},
1045
+ {'label': 'Service Call',
1046
+ 'function_call': func,
1047
+ 'menu_icon': elements.call.illustrator.svg,
1048
+ 'params': [adaptor.description.elements.call.create, node]},
1049
+ {'label': 'Script Task',
1050
+ 'function_call': func,
1051
+ 'menu_icon': elements.manipulate.illustrator.svg,
1052
+ 'params': [adaptor.description.elements.manipulate.create, node]},
1053
+ {'label': 'Parallel',
1054
+ 'function_call': func,
1055
+ 'menu_icon': elements.parallel.illustrator.svg,
1056
+ 'params': [adaptor.description.elements.parallel.create, node]},
1057
+ {'label': 'Choose',
1058
+ 'function_call': func,
1059
+ 'menu_icon': elements.choose.illustrator.svg,
1060
+ 'params': [adaptor.description.elements.choose.create, node]},
1061
+ {'label': 'Loop',
1062
+ 'function_call': func,
1063
+ 'menu_icon': elements.loop.illustrator.svg,
1064
+ 'params': [adaptor.description.elements.loop.create, node]},
1065
+ {'label': 'Critical',
1066
+ 'function_call': func,
1067
+ 'menu_icon': elements.critical.illustrator.svg,
1068
+ 'params': [adaptor.description.elements.critical.create, node]}
1069
+ ];
1070
+ }
1071
+ },//}}}
1072
+ 'adaptor' : {//{{{
1073
+ 'mousedown': function (node, e) {
1074
+ events.mousedown(node,e,true, false);
1075
+ },
1076
+ 'click': events.click,
1077
+ 'dblclick': events.dblclick,
1078
+ 'mouseover': events.mouseover,
1079
+ 'mouseout': events.mouseout,
1080
+ }//}}}
1081
+ }; /*}}}*/
1082
+ .5}