cpee 2.0.19 → 2.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/model.css +2 -0
  3. data/cockpit/css/replay.css +55 -0
  4. data/cockpit/css/wfadaptor.css +17 -0
  5. data/cockpit/edit.html +1 -1
  6. data/cockpit/index.html +2 -0
  7. data/cockpit/js/instance.js +8 -20
  8. data/cockpit/js/replay.js +40 -0
  9. data/cockpit/js_libs.zip +0 -0
  10. data/cockpit/model.html +3 -1
  11. data/cockpit/replay.html +52 -0
  12. data/cockpit/templates/.CPEE.xml +8 -0
  13. data/cockpit/templates/.Signavio.xml +8 -0
  14. data/cockpit/templates/.templates.xml +13 -0
  15. data/cockpit/templates/.transformations.xml +4 -0
  16. data/cockpit/templates/instantiate.local/Take_Sub.xml +1 -1
  17. data/cockpit/themes/compact/rngs/call.rng +67 -40
  18. data/cockpit/themes/compact/rngs/callmanipulate.rng +81 -38
  19. data/cockpit/themes/control/rngs/alternative.rng +25 -0
  20. data/cockpit/themes/control/rngs/call.rng +149 -0
  21. data/cockpit/themes/control/rngs/callmanipulate.rng +188 -0
  22. data/cockpit/themes/control/rngs/choose.rng +14 -0
  23. data/cockpit/themes/control/rngs/closed_loop.rng +62 -0
  24. data/cockpit/themes/control/rngs/closed_loop_cancel.rng +5 -0
  25. data/cockpit/themes/control/rngs/closed_loop_control.rng +31 -0
  26. data/cockpit/themes/control/rngs/closed_loop_measuring.rng +12 -0
  27. data/cockpit/themes/control/rngs/critical.rng +5 -0
  28. data/cockpit/themes/control/rngs/escape.rng +1 -0
  29. data/cockpit/themes/control/rngs/group.rng +3 -0
  30. data/cockpit/themes/control/rngs/loop.rng +22 -0
  31. data/cockpit/themes/control/rngs/manipulate.rng +9 -0
  32. data/cockpit/themes/control/rngs/otherwise.rng +22 -0
  33. data/cockpit/themes/control/rngs/parallel.rng +21 -0
  34. data/cockpit/themes/control/rngs/parallel_branch.rng +8 -0
  35. data/cockpit/themes/control/rngs/scripts.rng +23 -0
  36. data/cockpit/themes/control/rngs/stop.rng +5 -0
  37. data/cockpit/themes/control/rngs/terminate.rng +1 -0
  38. data/cockpit/themes/control/symbols/alternative.svg +5 -0
  39. data/cockpit/themes/control/symbols/arrow.svg +3 -0
  40. data/cockpit/themes/control/symbols/call.svg +6 -0
  41. data/cockpit/themes/control/symbols/callmanipulate.svg +8 -0
  42. data/cockpit/themes/control/symbols/choose.svg +5 -0
  43. data/cockpit/themes/control/symbols/choose_exclusive.svg +5 -0
  44. data/cockpit/themes/control/symbols/choose_inclusive.svg +4 -0
  45. data/cockpit/themes/control/symbols/closed_loop.svg +5 -0
  46. data/cockpit/themes/control/symbols/closed_loop_cancel.svg +5 -0
  47. data/cockpit/themes/control/symbols/closed_loop_control.svg +5 -0
  48. data/cockpit/themes/control/symbols/closed_loop_measuring.svg +6 -0
  49. data/cockpit/themes/control/symbols/complex.svg +8 -0
  50. data/cockpit/themes/control/symbols/critical.svg +4 -0
  51. data/cockpit/themes/control/symbols/end.svg +3 -0
  52. data/cockpit/themes/control/symbols/escape.svg +5 -0
  53. data/cockpit/themes/control/symbols/event_end.svg +3 -0
  54. data/cockpit/themes/control/symbols/loop.svg +5 -0
  55. data/cockpit/themes/control/symbols/manipulate.svg +4 -0
  56. data/cockpit/themes/control/symbols/otherwise.svg +5 -0
  57. data/cockpit/themes/control/symbols/parallel.svg +5 -0
  58. data/cockpit/themes/control/symbols/parallel_branch.svg +5 -0
  59. data/cockpit/themes/control/symbols/parallel_branch_compact.svg +4 -0
  60. data/cockpit/themes/control/symbols/parallel_branch_event.svg +14 -0
  61. data/cockpit/themes/control/symbols/parallel_branch_normal.svg +5 -0
  62. data/cockpit/themes/control/symbols/scripts.svg +4 -0
  63. data/cockpit/themes/control/symbols/start.svg +3 -0
  64. data/cockpit/themes/control/symbols/stop.svg +5 -0
  65. data/cockpit/themes/control/symbols/terminate.svg +4 -0
  66. data/cockpit/themes/control/theme.js +1665 -0
  67. data/cockpit/themes/default/rngs/call.rng +67 -40
  68. data/cockpit/themes/default/rngs/callmanipulate.rng +81 -38
  69. data/cockpit/themes/default/theme.js +1287 -0
  70. data/cockpit/themes/diana/rngs/call.rng +67 -40
  71. data/cockpit/themes/diana/rngs/callmanipulate.rng +81 -38
  72. data/cockpit/themes/extended/rngs/call.rng +67 -40
  73. data/cockpit/themes/extended/rngs/callmanipulate.rng +81 -38
  74. data/cockpit/themes/model/rngs/call.rng +2 -1
  75. data/cockpit/themes/model/rngs/callmanipulate.rng +2 -1
  76. data/cockpit/themes/model/theme.js +1 -1
  77. data/cockpit/themes/packed/rngs/call.rng +67 -40
  78. data/cockpit/themes/packed/rngs/callmanipulate.rng +81 -38
  79. data/cockpit/themes/preset/rngs/call.rng +67 -40
  80. data/cockpit/themes/preset/rngs/callmanipulate.rng +81 -38
  81. data/cockpit/track.html +0 -7
  82. data/cpee.gemspec +2 -2
  83. data/lib/cpee/controller.rb +6 -3
  84. data/lib/cpee/implementation.rb +23 -8
  85. data/lib/cpee/implementation_notifications.rb +1 -1
  86. data/lib/cpee/persistence.rb +2 -1
  87. data/lib/cpee/redis.rb +57 -0
  88. data/server/handlerwrappers/default.rb +2 -2
  89. data/server/resources/notifications/logging/subscription.xml +6 -0
  90. data/server/routing/end.pid +1 -0
  91. data/server/routing/end.rb +16 -4
  92. data/server/routing/forward-events.pid +1 -0
  93. data/server/routing/forward-events.rb +19 -7
  94. data/server/routing/forward-votes.pid +1 -0
  95. data/server/routing/forward-votes.rb +19 -7
  96. data/server/routing/persist.pid +1 -0
  97. data/server/routing/persist.rb +26 -14
  98. data/server/server.pid +1 -0
  99. data/tools/cpee +5 -5
  100. data/tools/test/README +4 -0
  101. data/tools/test/config.json +3 -0
  102. data/tools/test/contrib/graph_example.svg +1166 -0
  103. data/tools/test/contrib/legend.svg +817 -0
  104. data/tools/test/contrib/symbols.svg +224 -0
  105. data/tools/test/contrib/transformation1.xsl +264 -0
  106. data/tools/test/contrib/transformation2.xsl +10 -0
  107. data/tools/test/contrib/tree_example.svg +788 -0
  108. data/tools/test/css/model.css +24 -0
  109. data/tools/test/css/track.css +60 -0
  110. data/tools/test/css/ui.css +214 -0
  111. data/tools/test/css/wfadaptor.css +422 -0
  112. data/tools/test/edit.html +258 -0
  113. data/tools/test/graph.html +69 -0
  114. data/tools/test/index.html +258 -0
  115. data/tools/test/js/details.js +109 -0
  116. data/tools/test/js/instance.js +1344 -0
  117. data/tools/test/js/model.js +41 -0
  118. data/tools/test/js/parameters.js +82 -0
  119. data/tools/test/js/track.js +18 -0
  120. data/tools/test/js/ui.js +104 -0
  121. data/tools/test/js/wfadaptor.js +763 -0
  122. data/tools/test/js_libs.zip +0 -0
  123. data/tools/test/js_libs/Makefile +2 -0
  124. data/tools/test/js_libs/ansi_up.js +333 -0
  125. data/tools/test/js_libs/console.js +80 -0
  126. data/tools/test/js_libs/custommenu.css +84 -0
  127. data/tools/test/js_libs/custommenu.js +104 -0
  128. data/tools/test/js_libs/experiments1/relaxngui.css +185 -0
  129. data/tools/test/js_libs/experiments1/relaxngui.js +488 -0
  130. data/tools/test/js_libs/experiments1/rngtest9.html +60 -0
  131. data/tools/test/js_libs/experiments1/rngtest9.rng +35 -0
  132. data/tools/test/js_libs/experiments1/rngtest9.xml +8 -0
  133. data/tools/test/js_libs/jquery-2.2.4.min.js +4 -0
  134. data/tools/test/js_libs/jquery-3.2.1.min.js +4 -0
  135. data/tools/test/js_libs/jquery-3.3.1.min.js +2 -0
  136. data/tools/test/js_libs/jquery.browser.js +40 -0
  137. data/tools/test/js_libs/jquery.caret.min.js +10 -0
  138. data/tools/test/js_libs/jquery.cookie.js +117 -0
  139. data/tools/test/js_libs/jquery.min.js +1 -0
  140. data/tools/test/js_libs/jquery.svg.min.js +6 -0
  141. data/tools/test/js_libs/jquery.svgdom.min.js +6 -0
  142. data/tools/test/js_libs/markdown.min.js +1 -0
  143. data/tools/test/js_libs/parsequery.js +21 -0
  144. data/tools/test/js_libs/printf.js +368 -0
  145. data/tools/test/js_libs/relaxngui.css +213 -0
  146. data/tools/test/js_libs/relaxngui.js +543 -0
  147. data/tools/test/js_libs/strftime.min.js +1 -0
  148. data/tools/test/js_libs/tests/dataelements.html +59 -0
  149. data/tools/test/js_libs/tests/dataelements.rng +8 -0
  150. data/tools/test/js_libs/tests/dataelements.xml +3 -0
  151. data/tools/test/js_libs/tests/relaxngui.css +203 -0
  152. data/tools/test/js_libs/tests/relaxngui.js +502 -0
  153. data/tools/test/js_libs/tests/rngtest1.html +66 -0
  154. data/tools/test/js_libs/tests/rngtest1.rng +147 -0
  155. data/tools/test/js_libs/tests/rngtest1.xml +13 -0
  156. data/tools/test/js_libs/tests/rngtest2.html +60 -0
  157. data/tools/test/js_libs/tests/rngtest2.rng +6 -0
  158. data/tools/test/js_libs/tests/rngtest2.xml +3 -0
  159. data/tools/test/js_libs/tests/rngtest3.html +60 -0
  160. data/tools/test/js_libs/tests/rngtest3.rng +23 -0
  161. data/tools/test/js_libs/tests/rngtest3.xml +9 -0
  162. data/tools/test/js_libs/tests/rngtest4.html +60 -0
  163. data/tools/test/js_libs/tests/rngtest4.rng +19 -0
  164. data/tools/test/js_libs/tests/rngtest4.xml +12 -0
  165. data/tools/test/js_libs/tests/rngtest5.html +60 -0
  166. data/tools/test/js_libs/tests/rngtest5.rng +75 -0
  167. data/tools/test/js_libs/tests/rngtest5.xml +40 -0
  168. data/tools/test/js_libs/tests/rngtest6.html +60 -0
  169. data/tools/test/js_libs/tests/rngtest6.rng +24 -0
  170. data/tools/test/js_libs/tests/rngtest6.xml +6 -0
  171. data/tools/test/js_libs/tests/rngtest8.html +60 -0
  172. data/tools/test/js_libs/tests/rngtest8.rng +13 -0
  173. data/tools/test/js_libs/tests/rngtest8.xml +2 -0
  174. data/tools/test/js_libs/tests/rngtest9.html +60 -0
  175. data/tools/test/js_libs/tests/rngtest9.rng +31 -0
  176. data/tools/test/js_libs/tests/rngtest9.xml +8 -0
  177. data/tools/test/js_libs/ui.css +333 -0
  178. data/tools/test/js_libs/ui.html +168 -0
  179. data/tools/test/js_libs/ui.js +177 -0
  180. data/tools/test/js_libs/underscore.min.js +27 -0
  181. data/tools/test/js_libs/util.js +81 -0
  182. data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +358 -0
  183. data/tools/test/js_libs/vkbeautify.js +1 -0
  184. data/tools/test/js_libs/webcomponents.min.js +196 -0
  185. data/tools/test/model.html +192 -0
  186. data/tools/test/rngs/attributes.rng +8 -0
  187. data/tools/test/rngs/dataelements.rng +8 -0
  188. data/tools/test/rngs/endpoints.rng +8 -0
  189. data/tools/test/templates.legacy/Async.xml +46 -0
  190. data/tools/test/templates.legacy/BCO.xml +70 -0
  191. data/tools/test/templates.legacy/BCS.xml +70 -0
  192. data/tools/test/templates.legacy/Centurio.xml +75 -0
  193. data/tools/test/templates.legacy/Concurrent.xml +40 -0
  194. data/tools/test/templates.legacy/Coopis Testset.xml +76 -0
  195. data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +30 -0
  196. data/tools/test/templates.legacy/ICSOC Testset.xml +95 -0
  197. data/tools/test/templates.legacy/Infinity.xml +28 -0
  198. data/tools/test/templates.legacy/Lego Boxer.xml +31 -0
  199. data/tools/test/templates.legacy/Lego Conveyor.xml +31 -0
  200. data/tools/test/templates.legacy/Lego Crane.xml +87 -0
  201. data/tools/test/templates.legacy/Lego Ejector.xml +55 -0
  202. data/tools/test/templates.legacy/Lego Full.xml +142 -0
  203. data/tools/test/templates.legacy/Lego Liddy.xml +40 -0
  204. data/tools/test/templates.legacy/Lego Plate.xml +31 -0
  205. data/tools/test/templates.legacy/Lego Transporter.xml +43 -0
  206. data/tools/test/templates.legacy/Lego_Part_1.xml +85 -0
  207. data/tools/test/templates.legacy/LgLinear.xml +65 -0
  208. data/tools/test/templates.legacy/Linear.xml +77 -0
  209. data/tools/test/templates.legacy/Log.xml +117 -0
  210. data/tools/test/templates.legacy/Mangler 1.xml +87 -0
  211. data/tools/test/templates.legacy/Mangler 2.xml +103 -0
  212. data/tools/test/templates.legacy/Manuel Labels.xml +55 -0
  213. data/tools/test/templates.legacy/Promise.xml +275 -0
  214. data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +83 -0
  215. data/tools/test/templates.legacy/Subprocess.xml +56 -0
  216. data/tools/test/templates.legacy/Syncing P34 1.xml +77 -0
  217. data/tools/test/templates.legacy/Syncing P34 2.xml +77 -0
  218. data/tools/test/templates.legacy/Syncing P34 3.xml +77 -0
  219. data/tools/test/templates.legacy/Syncing P34.xml +77 -0
  220. data/tools/test/templates.legacy/TEST - Bad Loop.xml +173 -0
  221. data/tools/test/templates.legacy/TEST - Wrong Positions.xml +174 -0
  222. data/tools/test/templates.legacy/Take_5.xml +48 -0
  223. data/tools/test/templates.legacy/Update.xml +32 -0
  224. data/tools/test/templates.legacy/Worklist Parallel.xml +104 -0
  225. data/tools/test/templates.legacy/Worklist Test CPEE.xml +40 -0
  226. data/tools/test/templates.legacy/Worklist Test.xml +42 -0
  227. data/tools/test/templates.legacy/Worklist Test2.xml +43 -0
  228. data/tools/test/templates.legacy/convert_cpee2.rb +15 -0
  229. data/tools/test/templates.legacy/convert_preset.rb +32 -0
  230. data/tools/test/templates.legacy/testsets.xml +37 -0
  231. data/tools/test/templates.legacy/transformations.xml +4 -0
  232. data/tools/test/templates/Coopis 2010.xml +76 -0
  233. data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +77 -0
  234. data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +77 -0
  235. data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +77 -0
  236. data/tools/test/templates/Track Test Local.xml +82 -0
  237. data/tools/test/templates/Track Test.xml +82 -0
  238. data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +182 -0
  239. data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +203 -0
  240. data/tools/test/templates/UR-VUE 2020 Solution NN.xml +197 -0
  241. data/tools/test/templates/UR-VUE 2020 Solution View.xml +151 -0
  242. data/tools/test/templates/UR-VUE 2020.xml +26 -0
  243. data/tools/test/templates/Worklist.xml +42 -0
  244. data/tools/test/templates/instantiate.local/Take_Sub.xml +59 -0
  245. data/tools/test/templates/instantiate/Take_Perf.xml +46 -0
  246. data/tools/test/templates/instantiate/Take_Sub.xml +58 -0
  247. data/tools/test/templates/instantiate/Take_X.xml +48 -0
  248. data/tools/test/themes/compact/theme.js +1285 -0
  249. data/tools/test/themes/diana/theme.js +1650 -0
  250. data/tools/test/themes/extended/theme.js +1325 -0
  251. data/tools/test/themes/model/rngs/alternative.rng +1 -0
  252. data/tools/test/themes/model/rngs/call.rng +67 -0
  253. data/tools/test/themes/model/rngs/callmanipulate.rng +72 -0
  254. data/tools/test/themes/model/rngs/choose.rng +1 -0
  255. data/tools/test/themes/model/rngs/critical.rng +1 -0
  256. data/tools/test/themes/model/rngs/escape.rng +1 -0
  257. data/tools/test/themes/model/rngs/group.rng +1 -0
  258. data/tools/test/themes/model/rngs/loop.rng +1 -0
  259. data/tools/test/themes/model/rngs/manipulate.rng +1 -0
  260. data/tools/test/themes/model/rngs/otherwise.rng +1 -0
  261. data/tools/test/themes/model/rngs/parallel.rng +1 -0
  262. data/tools/test/themes/model/rngs/parallel_branch.rng +1 -0
  263. data/tools/test/themes/model/rngs/scripts.rng +7 -0
  264. data/tools/test/themes/model/rngs/stop.rng +1 -0
  265. data/tools/test/themes/model/rngs/terminate.rng +1 -0
  266. data/tools/test/themes/model/theme.js +1268 -0
  267. data/tools/test/themes/packed/theme.js +1286 -0
  268. data/tools/test/themes/preset/rngs/alternative.rng +25 -0
  269. data/tools/test/themes/preset/rngs/call.rng +122 -0
  270. data/tools/test/themes/preset/rngs/callmanipulate.rng +145 -0
  271. data/tools/test/themes/preset/rngs/choose.rng +14 -0
  272. data/tools/test/themes/preset/rngs/closed_loop.rng +62 -0
  273. data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +5 -0
  274. data/tools/test/themes/preset/rngs/closed_loop_control.rng +31 -0
  275. data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +12 -0
  276. data/tools/test/themes/preset/rngs/critical.rng +5 -0
  277. data/tools/test/themes/preset/rngs/escape.rng +1 -0
  278. data/tools/test/themes/preset/rngs/group.rng +3 -0
  279. data/tools/test/themes/preset/rngs/loop.rng +22 -0
  280. data/tools/test/themes/preset/rngs/manipulate.rng +9 -0
  281. data/tools/test/themes/preset/rngs/otherwise.rng +22 -0
  282. data/tools/test/themes/preset/rngs/parallel.rng +21 -0
  283. data/tools/test/themes/preset/rngs/parallel_branch.rng +8 -0
  284. data/tools/test/themes/preset/rngs/scripts.rng +23 -0
  285. data/tools/test/themes/preset/rngs/stop.rng +5 -0
  286. data/tools/test/themes/preset/rngs/terminate.rng +1 -0
  287. data/tools/test/themes/preset/symbols/alternative.svg +5 -0
  288. data/tools/test/themes/preset/symbols/arrow.svg +3 -0
  289. data/tools/test/themes/preset/symbols/call.svg +6 -0
  290. data/tools/test/themes/preset/symbols/callmanipulate.svg +8 -0
  291. data/tools/test/themes/preset/symbols/choose.svg +5 -0
  292. data/tools/test/themes/preset/symbols/choose_exclusive.svg +5 -0
  293. data/tools/test/themes/preset/symbols/choose_inclusive.svg +4 -0
  294. data/tools/test/themes/preset/symbols/closed_loop.svg +5 -0
  295. data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +5 -0
  296. data/tools/test/themes/preset/symbols/closed_loop_control.svg +5 -0
  297. data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +6 -0
  298. data/tools/test/themes/preset/symbols/complex.svg +8 -0
  299. data/tools/test/themes/preset/symbols/critical.svg +4 -0
  300. data/tools/test/themes/preset/symbols/end.svg +3 -0
  301. data/tools/test/themes/preset/symbols/escape.svg +5 -0
  302. data/tools/test/themes/preset/symbols/event_end.svg +3 -0
  303. data/tools/test/themes/preset/symbols/loop.svg +5 -0
  304. data/tools/test/themes/preset/symbols/manipulate.svg +4 -0
  305. data/tools/test/themes/preset/symbols/otherwise.svg +5 -0
  306. data/tools/test/themes/preset/symbols/parallel.svg +5 -0
  307. data/tools/test/themes/preset/symbols/parallel_branch.svg +5 -0
  308. data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +4 -0
  309. data/tools/test/themes/preset/symbols/parallel_branch_event.svg +14 -0
  310. data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +5 -0
  311. data/tools/test/themes/preset/symbols/scripts.svg +4 -0
  312. data/tools/test/themes/preset/symbols/start.svg +3 -0
  313. data/tools/test/themes/preset/symbols/stop.svg +5 -0
  314. data/tools/test/themes/preset/symbols/terminate.svg +4 -0
  315. data/tools/test/themes/preset/theme.js +1287 -0
  316. data/tools/test/track.html +142 -0
  317. metadata +282 -2
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="hfill rfill cline stand"/>
3
+ <text transform="translate(15,21)" class="normal">s</text>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="14" class="stand"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="14" class="hfill rfill cline stand"/>
3
+ <line x1="12.5" y1="22.5" x2="12.5" y2="8.5" class="stand"/>
4
+ <line x1="17.5" y1="22.5" x2="17.5" y2="8.5" class="stand"/>
5
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="14" class="standfat"/>
3
+ <circle cx="15" cy="15" r="9" class="black"/>
4
+ </svg>
@@ -0,0 +1,1665 @@
1
+ function WFAdaptorManifestation(adaptor) {
2
+ var self = this;
3
+
4
+ this.adaptor = adaptor;
5
+ this.resources = {};
6
+ this.elements = {};
7
+ this.events = {};
8
+ this.compact = false;
9
+ this.striped = true;
10
+ this.endpoints = {};
11
+
12
+ //{{{ transform the details data to description parts based on rng
13
+ this.source = function(base,opts) {
14
+ if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
15
+ $('#relaxngworker').empty();
16
+ var rngw = new RelaxNGui(base,$('#relaxngworker'),self.adaptor.description.context_eval);
17
+ var nnew = $(rngw.save().documentElement);
18
+ return(nnew);
19
+ } else {
20
+ if (opts && opts == 'clone') {
21
+ base = base.clone();
22
+ if (base.attr('id')) {
23
+ base.attr('id',self.adaptor.description.get_free_id());
24
+ }
25
+ base.find('*[id]').each(function(k,v){
26
+ $(v).attr('id',self.adaptor.description.get_free_id(base));
27
+ });
28
+ }
29
+ return base;
30
+ }
31
+ }; //}}}
32
+ //{{{ Return the svgid for the selected task
33
+ this.selected = function(){
34
+ var svgid = 'unknown';
35
+ _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
36
+ if ($(value).hasClass('selected')) {
37
+ svgid = $(value).attr('element-id');
38
+ }
39
+ });
40
+ return svgid;
41
+ }; //}}}
42
+ //{{{ Return the svgids for all marked tasks
43
+ this.marked = function(){
44
+ var svgid = [];
45
+ _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
46
+ if ($(value).hasClass('marked')) {
47
+ svgid.push($(value).attr('element-id'));
48
+ }
49
+ });
50
+ return svgid;
51
+ }; //}}}
52
+ //{{{ Render the details from rng (right hand side of graph tab)
53
+ this.update_details = function(svgid){
54
+ var tab = $('#dat_details');
55
+ var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
56
+ tab.empty();
57
+ if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
58
+ save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
59
+ var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
60
+ if (save['endpoints_cache'][$(node).attr('endpoint')] && save['endpoints_cache'][$(node).attr('endpoint')].schema) {
61
+ var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
62
+ $(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
63
+ }
64
+ if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
65
+ $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
66
+ }
67
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
68
+ var nn = $X($(node).serializeXML());
69
+ nn.removeAttr('svg-id');
70
+ nn.removeAttr('svg-type');
71
+ nn.removeAttr('svg-subtype');
72
+ nn.removeAttr('svg-label');
73
+ save['details'].content(nn);
74
+ format_visual_forms();
75
+ }
76
+ }; //}}}
77
+
78
+ function copyOrMove(menu,group,xml_node,mode) { //{{{
79
+ var markymark = _.uniq(self.marked());
80
+ var check1 = [];
81
+ var check2 = [];
82
+ $(markymark).each(function(key,svgid){
83
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
84
+ check1.push($(node).attr('svg-type'));
85
+ });
86
+ $(group).each(function(key,value){
87
+ check2.push(value.type);
88
+ });
89
+
90
+ if (markymark.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
91
+ var nodes = [];
92
+ $(markymark).each(function(key,svgid){
93
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
94
+ nodes.unshift(node);
95
+ });
96
+
97
+ var iconm = self.resources['arrow'].clone();
98
+ var iconc = self.resources['arrow'].clone();
99
+ iconm.children('.rfill').addClass('menu');
100
+ menu.push(
101
+ {
102
+ 'label': '<em>Move Marked Elements</em>',
103
+ 'function_call': mode,
104
+ 'menu_icon': iconm,
105
+ 'type': undefined,
106
+ 'params': [nodes, xml_node]
107
+ },
108
+ {
109
+ 'label': '<em>Copy Marked Elements</em>',
110
+ 'function_call': mode,
111
+ 'menu_icon': iconc,
112
+ 'type': undefined,
113
+ 'params': [nodes, xml_node, 'clone']
114
+ }
115
+ );
116
+ }
117
+ } //}}}
118
+
119
+ // Events
120
+ this.events.mousedown = function(svgid, e, child, sibling) { // {{{
121
+ if(e.button == 0) { // left-click
122
+ } else if(e.button == 1) { // middle-click
123
+ } else if(e.button == 2) { // right-click
124
+ if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
125
+
126
+ var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
127
+ var group = null;
128
+ var menu = {};
129
+
130
+ if (child) {
131
+ group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
132
+ if(group.length > 0) {
133
+ menu['Insert into'] = group;
134
+ copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
135
+ }
136
+ if (self.elements[xml_node.get(0).tagName].permissible_children_expert) {
137
+ group = self.elements[xml_node.get(0).tagName].permissible_children_expert(xml_node,'into');
138
+ if(group.length > 0) {
139
+ menu['Insert into (Experts Only!)'] = group;
140
+ copyOrMove(menu['Insert into (Experts Only!)'],group,xml_node,self.adaptor.description.insert_first_into);
141
+ }
142
+ }
143
+ }
144
+ if (sibling) {
145
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node,'after');
146
+ if(group.length > 0) {
147
+ menu['Insert after'] = group;
148
+ copyOrMove(menu['Insert after'],group,xml_node,self.adaptor.description.insert_after);
149
+ }
150
+ if (self.elements[xml_node.parent().get(0).tagName].permissible_children_expert) {
151
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children_expert(xml_node,'after');
152
+ if(group.length > 0) {
153
+ menu['Insert after (Experts Only!)'] = group;
154
+ copyOrMove(menu['Insert after (Experts Only!)'],group,xml_node,self.adaptor.description.insert_after);
155
+ }
156
+ }
157
+ }
158
+
159
+ if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
160
+ var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
161
+ icon.children('.rfill').addClass('menu');
162
+ menu['Delete'] = [{
163
+ 'label': 'Remove Element',
164
+ 'function_call': function(selector,target,selected){ self.adaptor.description.remove(selector,target); self.adaptor.illustrator.get_label_by_svg_id(selected).addClass('selected'); },
165
+ 'menu_icon': icon,
166
+ 'type': undefined,
167
+ 'params': [null, xml_node, self.selected()]
168
+ }];
169
+ }
170
+ if($('> code', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
171
+ var icon = self.elements.callmanipulate.illustrator.svg.clone();
172
+ icon.children('.rfill:last').addClass('menu');
173
+ menu['Delete'].push({
174
+ 'label': 'Remove Scripts',
175
+ 'function_call': self.adaptor.description.remove,
176
+ 'menu_icon': icon,
177
+ 'type': undefined,
178
+ 'params': ['> code', xml_node]
179
+ });
180
+ }
181
+ if (xml_node.get(0).tagName == "call" || xml_node.get(0).tagName == "manipulate" || xml_node.get(0).tagName == "stop") {
182
+ var icon = self.elements.call.illustrator.svg.clone();
183
+ icon.children('g.replace').addClass('active');
184
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
185
+ if (vtarget.length > 0) {
186
+ if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
187
+ menu['Position'] = [{
188
+ 'label': 'No Execution from here',
189
+ 'function_call': del_ui_pos,
190
+ 'menu_icon': icon,
191
+ 'type': undefined,
192
+ 'params': xml_node
193
+ }];
194
+ } else {
195
+ menu['Position'] = [{
196
+ 'label': 'Execute from here',
197
+ 'function_call': add_ui_pos,
198
+ 'menu_icon': icon,
199
+ 'type': undefined,
200
+ 'params': xml_node
201
+ }];
202
+ }
203
+ }
204
+ }
205
+ new CustomMenu(e).contextmenu(menu);
206
+ }
207
+ return false;
208
+ } // }}}
209
+ this.events.suppress = function(svgid, e, child, sibling) { // {{{
210
+ return false;
211
+ } // }}}
212
+ this.events.click = function(svgid, e) { // {{{
213
+ if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
214
+ return;
215
+ }
216
+
217
+ self.adaptor.illustrator.get_elements().removeClass('selected');
218
+ self.adaptor.illustrator.get_labels().removeClass('selected');
219
+
220
+ if (e && e.ctrlKey) {
221
+ if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
222
+ var tab = $('#dat_details');
223
+ tab.empty();
224
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
225
+ if (vtarget.length > 0) {
226
+ vtarget.parents('g.element[element-id]').toggleClass('marked');
227
+ }
228
+ } else {
229
+ self.adaptor.illustrator.get_elements().removeClass('marked');
230
+
231
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
232
+ if (vtarget.length > 0) {
233
+ vtarget.parents('g.element[element-id]').addClass('selected');
234
+ }
235
+ self.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
236
+
237
+ self.update_details(svgid);
238
+ }
239
+ } // }}}
240
+ this.events.dblclick = function(svgid, e) { // {{{
241
+ } // }}}
242
+ this.events.mouseover = function(svgid, e) { // {{{
243
+ self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','block');
244
+ self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').addClass('hover');
245
+ self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
246
+ return false;
247
+ } // }}}
248
+ this.events.mouseout = function(svgid, e) { // {{{
249
+ self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','none');
250
+ self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').removeClass('hover');
251
+ self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
252
+ return false;
253
+ } // }}}
254
+ this.events.dragstart = function (svgid, e) { //{{{
255
+ } //}}}
256
+
257
+ // other resources
258
+ this.resources.arrow = self.adaptor.theme_dir + 'symbols/arrow.svg';
259
+
260
+ // Primitive Elements
261
+ this.elements.call = { /*{{{*/
262
+ 'type': 'primitive',
263
+ 'illustrator': {//{{{
264
+ 'endnodes': 'this',
265
+ 'label': function(node){
266
+ var rep = $('body').attr('current-resources');
267
+ var ep = self.endpoints[$(node).attr('endpoint')];
268
+ var wait = $('_timing_wait',$(node).children('annotations')).text();
269
+ var threshold = $('_timing_threshold',$(node).children('annotations')).text();
270
+ var adur = $('_timing_avg',$(node).children('annotations')).text();
271
+ var lab = $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'');
272
+ var ret = [ { column: 'ID', value: $(node).attr('id') } ];
273
+ if (lab != '') {
274
+ ret.unshift( { column: 'Label', value: lab } );
275
+ }
276
+ if (wait != '') {
277
+ ret.push({ column: 'Wait', value: 'ω = ' + wait });
278
+ }
279
+ if (threshold != '') {
280
+ ret.push({ column: 'Threshold', value: 'κ = ' + threshold });
281
+ }
282
+ if (adur != '') {
283
+ ret.push({ column: 'Duration', value: '~T = ' + adur + 'm' });
284
+ }
285
+ return ret;
286
+ },
287
+ 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
288
+ 'resolve_symbol': function(node) {
289
+ if($('code', node).length > 0) {
290
+ return 'callmanipulate';
291
+ } else {
292
+ return 'call';
293
+ }
294
+ },
295
+ 'svg': self.adaptor.theme_dir + 'symbols/call.svg'
296
+ },//}}}
297
+ 'description': self.adaptor.theme_dir + 'rngs/call.rng',
298
+ 'permissible_children': function(node,mode) { //{{{
299
+ if(node.children('code').length < 1)
300
+ return [
301
+ {'label': 'Scripts',
302
+ 'function_call': self.adaptor.description.insert_last_into,
303
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
304
+ 'type': undefined,
305
+ 'params': [self.adaptor.description.elements.scripts, node]}
306
+ ];
307
+ return [];
308
+ }, //}}}
309
+ 'adaptor': {//{{{
310
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
311
+ 'click': self.events.click,
312
+ 'dragstart': self.events.dragstart,
313
+ 'mouseover': self.events.mouseover,
314
+ 'mouseout': self.events.mouseout
315
+ }//}}}
316
+ }; /*}}}*/
317
+ this.elements.manipulate = { /*{{{*/
318
+ 'type': 'primitive',
319
+ 'illustrator': {//{{{
320
+ 'endnodes': 'this',
321
+ 'label': function(node){
322
+ var lab = $(node).attr('label');
323
+ if (lab) {
324
+ return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') }, { column: 'ID', value: $(node).attr('id') } ];
325
+ } else {
326
+ return [ { column: 'ID', value: $(node).attr('id') } ];
327
+ }
328
+ },
329
+ 'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
330
+ },//}}}
331
+ 'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
332
+ 'permissible_children': function(node,mode) { //{{{
333
+ return [];
334
+ }, //}}}
335
+ 'adaptor': {//{{{
336
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
337
+ 'click': self.events.click,
338
+ 'mouseover': self.events.mouseover,
339
+ 'mouseout': self.events.mouseout
340
+ }//}}}
341
+ }; /*}}}*/
342
+ this.elements.escape = { /*{{{*/
343
+ 'type': 'primitive',
344
+ 'illustrator': {//{{{
345
+ 'endnodes': 'this',
346
+ 'svg': self.adaptor.theme_dir + 'symbols/escape.svg'
347
+ },//}}}
348
+ 'description': self.adaptor.theme_dir + 'rngs/escape.rng',
349
+ 'permissible_children': function(node,mode) { //{{{
350
+ return [];
351
+ }, //}}}
352
+ 'adaptor': {//{{{
353
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
354
+ 'click': self.events.click,
355
+ 'mouseover': self.events.mouseover,
356
+ 'mouseout': self.events.mouseout
357
+ }//}}}
358
+ }; /*}}}*/
359
+ this.elements.stop = { /*{{{*/
360
+ 'type': 'primitive',
361
+ 'illustrator': {//{{{
362
+ 'endnodes': 'this',
363
+ 'label': function(node){
364
+ return [ { column: 'ID', value: $(node).attr('id') } ];
365
+ },
366
+ 'svg': self.adaptor.theme_dir + 'symbols/stop.svg'
367
+ },//}}}
368
+ 'description': self.adaptor.theme_dir + 'rngs/stop.rng',
369
+ 'permissible_children': function(node,mode) { //{{{
370
+ return [];
371
+ }, //}}}
372
+ 'adaptor': {//{{{
373
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
374
+ 'click': self.events.click,
375
+ 'mouseover': self.events.mouseover,
376
+ 'mouseout': self.events.mouseout
377
+ }//}}}
378
+ }; /*}}}*/
379
+ this.elements.terminate = { /*{{{*/
380
+ 'type': 'primitive',
381
+ 'illustrator': {//{{{
382
+ 'endnodes': 'this',
383
+ 'final': true,
384
+ 'svg': self.adaptor.theme_dir + 'symbols/terminate.svg'
385
+ },//}}}
386
+ 'description': self.adaptor.theme_dir + 'rngs/terminate.rng',
387
+ 'permissible_children': function(node,mode) { //{{{
388
+ return [];
389
+ }, //}}}
390
+ 'adaptor': {//{{{
391
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
392
+ 'mouseover': self.events.mouseover,
393
+ 'mouseout': self.events.mouseout
394
+ }//}}}
395
+ }; /*}}}*/
396
+ this.elements.end = { /*{{{*/
397
+ 'type': 'primitive',
398
+ 'illustrator': {//{{{
399
+ 'endnodes': 'this',
400
+ 'svg': self.adaptor.theme_dir + 'symbols/end.svg'
401
+ }, //}}}
402
+ 'adaptor': {//{{{
403
+ 'mousedown': function (node,e) {
404
+ self.events.suppress();
405
+ }
406
+ }//}}}
407
+ }; /*}}}*/
408
+ this.elements.event_end = { /*{{{*/
409
+ 'type': 'primitive',
410
+ 'illustrator': {//{{{
411
+ 'endnodes': 'this',
412
+ 'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
413
+ }, //}}}
414
+ 'adaptor': {//{{{
415
+ 'mousedown': function (node,e) {
416
+ self.events.suppress();
417
+ },
418
+ 'click': self.events.click,
419
+ 'dblclick': self.events.dblclick,
420
+ 'mouseover': self.events.mouseover,
421
+ 'mouseout': self.events.mouseout
422
+ }//}}}
423
+ }; /*}}}*/
424
+ this.elements.choose_finish = { /*{{{*/
425
+ 'type': 'primitive',
426
+ 'illustrator': {//{{{
427
+ 'endnodes': 'this',
428
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg',
429
+ 'resolve_symbol': function(node) {
430
+ if($(node).attr('mode') == 'exclusive') {
431
+ return 'choose_exclusive_finish';
432
+ } else {
433
+ return 'choose_inclusive_finish';
434
+ }
435
+ },
436
+ }, //}}}
437
+ 'adaptor': {//{{{
438
+ 'mousedown': function (node,e) {
439
+ self.events.mousedown(node,e,true,true);
440
+ },
441
+ 'click': self.events.click,
442
+ 'dblclick': self.events.dblclick,
443
+ 'mouseover': self.events.mouseover,
444
+ 'mouseout': self.events.mouseout
445
+ }//}}}
446
+ }; /*}}}*/
447
+ this.elements.loop_finish = { /*{{{*/
448
+ 'type': 'primitive',
449
+ 'illustrator': {//{{{
450
+ 'endnodes': 'this',
451
+ 'closeblock': true,
452
+ 'label': function(node){
453
+ var avg = $('> _probability_avg',$(node).children('_probability')).text();
454
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
455
+ if (avg != '') {
456
+ ret.push({ column: 'Average', value: avg + 'x' });
457
+ }
458
+ return ret;
459
+ },
460
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg',
461
+ }, //}}}
462
+ 'adaptor': {//{{{
463
+ 'mousedown': function (node,e) {
464
+ self.events.mousedown(node,e,true,true);
465
+ },
466
+ 'click': self.events.click,
467
+ 'dblclick': self.events.dblclick,
468
+ 'mouseover': self.events.mouseover,
469
+ 'mouseout': self.events.mouseout
470
+ }//}}}
471
+ }; /*}}}*/
472
+ this.elements.parallel_finish = { /*{{{*/
473
+ 'type': 'primitive',
474
+ 'illustrator': {//{{{
475
+ 'endnodes': 'this',
476
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
477
+ 'resolve_symbol': function(node) {
478
+ if($(node).attr('wait') == '-1') {
479
+ return 'parallel_simple';
480
+ } else {
481
+ return 'parallel_complex';
482
+ }
483
+ },
484
+ }, //}}}
485
+ 'adaptor': {//{{{
486
+ 'mousedown': function (node,e) {
487
+ self.events.mousedown(node,e,true,true);
488
+ },
489
+ 'click': self.events.click,
490
+ 'dblclick': self.events.dblclick,
491
+ 'mouseover': self.events.mouseover,
492
+ 'mouseout': self.events.mouseout
493
+ }//}}}
494
+ }; /*}}}*/
495
+
496
+ // Complex Elements
497
+ this.elements.choose = { /*{{{*/
498
+ 'type': 'complex',
499
+ 'illustrator': {//{{{
500
+ 'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
501
+ 'endnodes': 'aggregate',
502
+ 'closeblock': false,
503
+ 'closing_symbol': 'choose_finish',
504
+ 'expansion': function(node) {
505
+ return 'horizontal';
506
+ },
507
+ 'resolve_symbol': function(node) {
508
+ if($(node).attr('mode') == 'exclusive') {
509
+ return 'choose_exclusive';
510
+ } else {
511
+ return 'choose_inclusive';
512
+ }
513
+ },
514
+ 'col_shift': function(node) {
515
+ return false;
516
+ },
517
+ 'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
518
+ },//}}}
519
+ 'description': self.adaptor.theme_dir + 'rngs/choose.rng',
520
+ 'permissible_children': function(node,mode) { //{{{
521
+ var func = null;
522
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
523
+ else { func = self.adaptor.description.insert_after }
524
+ if(node.children('parallel_branch').length > 0) {
525
+ return [{'label': 'Parallel Branch',
526
+ 'function_call': func,
527
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
528
+ 'type': 'parallel_branch',
529
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
530
+ }
531
+ var childs = [{'label': 'Alternative',
532
+ 'function_call': func,
533
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
534
+ 'type': 'alternative',
535
+ 'params': [self.adaptor.description.elements.alternative, node]}];
536
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length && node.parent('choose').length == 0)
537
+ childs.push({'label': 'Otherwise',
538
+ 'function_call': self.adaptor.description.insert_last_into,
539
+ 'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
540
+ 'type': 'otherwise',
541
+ 'params': [self.adaptor.description.elements.otherwise, node]});
542
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
543
+ childs.push({'label': 'Parallel Branch',
544
+ 'function_call': func,
545
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
546
+ 'type': 'parallel_branch',
547
+ 'params': [self.adaptor.description.elements.parallel_branch, node]});
548
+ return childs;
549
+ }, //}}}
550
+ 'adaptor': {//{{{
551
+ 'mousedown': function (node,e) {
552
+ self.events.mousedown(node,e,true,true);
553
+ },
554
+ 'click': self.events.click,
555
+ 'dblclick': self.events.dblclick,
556
+ 'mouseover': self.events.mouseover,
557
+ 'mouseout': self.events.mouseout
558
+ }//}}}
559
+ }; /*}}}*/
560
+ this.elements.otherwise = { /*{{{*/
561
+ 'type': 'complex',
562
+ 'illustrator': {//{{{
563
+ 'label': function(node){
564
+ var avg = $('> _probability_avg',$(node).children('_probability')).text();
565
+ return (avg == '' ? [] : [ { column: 'Average', value: avg + '%' } ]);
566
+ },
567
+ 'endnodes': 'passthrough',
568
+ 'closeblock': false,
569
+ 'noarrow': true,
570
+ 'expansion': function(node) {
571
+ return 'vertical';
572
+ },
573
+ 'col_shift': function(node) {
574
+ return false;
575
+ },
576
+ 'svg': self.adaptor.theme_dir + 'symbols/otherwise.svg'
577
+ },//}}}
578
+ 'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
579
+ 'neverdelete': true,
580
+ 'permissible_children': function(node,mode) { //{{{
581
+ var func = null;
582
+ var childs = null;
583
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
584
+ else { func = self.adaptor.description.insert_after }
585
+ var childs = [
586
+ {'label': 'Service Call with Scripts',
587
+ 'function_call': func,
588
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
589
+ 'type': 'callmanipulate',
590
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
591
+ {'label': 'Service Call',
592
+ 'function_call': func,
593
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
594
+ 'type': 'call',
595
+ 'params': [self.adaptor.description.elements.call, node]},
596
+ {'label': 'Script',
597
+ 'function_call': func,
598
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
599
+ 'type': 'manipulate',
600
+ 'params': [self.adaptor.description.elements.manipulate, node]},
601
+ {'label': 'Parallel',
602
+ 'function_call': func,
603
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
604
+ 'type': 'parallel',
605
+ 'params': [self.adaptor.description.elements.parallel, node]},
606
+ {'label': 'Decision',
607
+ 'function_call': func,
608
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
609
+ 'type': 'choose',
610
+ 'params': [self.adaptor.description.elements.choose, node]},
611
+ {'label': 'Loop',
612
+ 'function_call': func,
613
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
614
+ 'type': 'loop',
615
+ 'params': [self.adaptor.description.elements.loop, node]},
616
+ {'label': 'Closed Loop',
617
+ 'function_call': func,
618
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
619
+ 'type': 'closed_loop',
620
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
621
+ {'label': 'Terminate',
622
+ 'function_call': func,
623
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
624
+ 'type': 'terminate',
625
+ 'params': [self.adaptor.description.elements.terminate, node]},
626
+ {'label': 'Stop',
627
+ 'function_call': func,
628
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
629
+ 'type': 'stop',
630
+ 'params': [self.adaptor.description.elements.stop, node]}
631
+ ];
632
+ if(node.parent('parallel_branch').length > 0) {
633
+ childs.push({
634
+ 'label': 'Critical',
635
+ 'function_call': func,
636
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
637
+ 'type': 'critical',
638
+ 'params': [self.adaptor.description.elements.critical, node]
639
+ });
640
+ }
641
+ return childs;
642
+ }, //}}}
643
+ 'adaptor': {//{{{
644
+ 'mousedown': function (node,e) {
645
+ self.events.mousedown(node,e,true,false);
646
+ },
647
+ 'click': self.events.click,
648
+ 'dblclick': self.events.dblclick,
649
+ 'mouseover': self.events.mouseover,
650
+ 'mouseout': self.events.mouseout,
651
+ }//}}}
652
+ }; /*}}}*/
653
+ this.elements.alternative = { /*{{{*/
654
+ 'type': 'complex',
655
+ 'illustrator': {//{{{
656
+ 'label': function(node){
657
+ var avg = $('> _probability_avg',$(node).children('_probability')).text();
658
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
659
+ if (avg != '') {
660
+ ret.push({ column: 'Average', value: avg + '%' });
661
+ }
662
+ return ret;
663
+ },
664
+ 'endnodes': 'passthrough',
665
+ 'noarrow': true,
666
+ 'closeblock':false,
667
+ 'expansion': function(node) {
668
+ return 'vertical';
669
+ },
670
+ 'col_shift': function(node) {
671
+ return false;
672
+ },
673
+ 'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
674
+ },//}}}
675
+ 'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
676
+ 'permissible_children': function(node,mode) { //{{{
677
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
678
+ else { func = self.adaptor.description.insert_after }
679
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
680
+ return [{'label': 'Parallel Branch',
681
+ 'function_call': func,
682
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
683
+ 'type': 'parallel_branch',
684
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
685
+ }
686
+ var childs = [
687
+ {'label': 'Service Call with Scripts',
688
+ 'function_call': func,
689
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
690
+ 'type': 'callmanipulate',
691
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
692
+ {'label': 'Service Call',
693
+ 'function_call': func,
694
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
695
+ 'type': 'call',
696
+ 'params': [self.adaptor.description.elements.call, node]},
697
+ {'label': 'Script',
698
+ 'function_call': func,
699
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
700
+ 'type': 'manipulate',
701
+ 'params': [self.adaptor.description.elements.manipulate, node]},
702
+ {'label': 'Parallel',
703
+ 'function_call': func,
704
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
705
+ 'type': 'parallel',
706
+ 'params': [self.adaptor.description.elements.parallel, node]},
707
+ {'label': 'Decision',
708
+ 'function_call': func,
709
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
710
+ 'type': 'choose',
711
+ 'params': [self.adaptor.description.elements.choose, node]},
712
+ {'label': 'Loop',
713
+ 'function_call': func,
714
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
715
+ 'type': 'loop',
716
+ 'params': [self.adaptor.description.elements.loop, node]},
717
+ {'label': 'Closed Loop',
718
+ 'function_call': func,
719
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
720
+ 'type': 'closed_loop',
721
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
722
+ {'label': 'Terminate',
723
+ 'function_call': func,
724
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
725
+ 'type': 'terminate',
726
+ 'params': [self.adaptor.description.elements.terminate, node]},
727
+ {'label': 'Stop',
728
+ 'function_call': func,
729
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
730
+ 'type': 'stop',
731
+ 'params': [self.adaptor.description.elements.stop, node]}
732
+ ];
733
+ if(node.parent('parallel_branch').length > 0) {
734
+ childs.push({
735
+ 'label': 'Critical',
736
+ 'function_call': func,
737
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
738
+ 'type': 'critical',
739
+ 'params': [self.adaptor.description.elements.critical, node]
740
+ });
741
+ }
742
+ return childs;
743
+ }, //}}}
744
+ 'adaptor': {//{{{
745
+ 'mousedown': function (node,e) {
746
+ self.events.mousedown(node,e,true,true);
747
+ },
748
+ 'click': self.events.click,
749
+ 'dblclick': self.events.dblclick,
750
+ 'mouseover': self.events.mouseover,
751
+ 'mouseout': self.events.mouseout,
752
+ }//}}}
753
+ }; /*}}}*/
754
+ this.elements.loop = { /*{{{*/
755
+ 'type': 'complex',
756
+ 'illustrator': {//{{{
757
+ 'resolve_symbol': function(node) {
758
+ if($(node).attr('mode') == 'pre_test') {
759
+ return 'loop_head';
760
+ } else {
761
+ return 'loop_tail';
762
+ }
763
+ },
764
+ 'expansion': function(node) {
765
+ return 'vertical';
766
+ },
767
+ 'col_shift': function(node) {
768
+ return true;
769
+ },
770
+ 'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
771
+ },// }}}
772
+ 'description': self.adaptor.theme_dir + 'rngs/loop.rng',
773
+ 'permissible_children': function(node,mode) { //{{{
774
+ var func = null;
775
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
776
+ else { func = self.adaptor.description.insert_after }
777
+ var childs = [
778
+ {'label': 'Service Call with Scripts',
779
+ 'function_call': func,
780
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
781
+ 'type': 'callmanipulate',
782
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
783
+ {'label': 'Service Call',
784
+ 'function_call': func,
785
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
786
+ 'type': 'call',
787
+ 'params': [self.adaptor.description.elements.call, node]},
788
+ {'label': 'Script',
789
+ 'function_call': func,
790
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
791
+ 'type': 'manipulate',
792
+ 'params': [self.adaptor.description.elements.manipulate, node]},
793
+ {'label': 'Decision',
794
+ 'function_call': func,
795
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
796
+ 'type': 'choose',
797
+ 'params': [self.adaptor.description.elements.choose, node]},
798
+ {'label': 'Loop',
799
+ 'function_call': func,
800
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
801
+ 'type': 'loop',
802
+ 'params': [self.adaptor.description.elements.loop, node]},
803
+ {'label': 'Closed Loop',
804
+ 'function_call': func,
805
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
806
+ 'type': 'closed_loop',
807
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
808
+ {'label': 'Terminate',
809
+ 'function_call': func,
810
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
811
+ 'type': 'terminate',
812
+ 'params': [self.adaptor.description.elements.terminate, node]},
813
+ {'label': 'Stop',
814
+ 'function_call': func,
815
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
816
+ 'type': 'stop',
817
+ 'params': [self.adaptor.description.elements.stop, node]}
818
+ ];
819
+ if(node.parent('parallel_branch').length > 0) {
820
+ childs.push({
821
+ 'label': 'Critical',
822
+ 'function_call': func,
823
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
824
+ 'type': 'critical',
825
+ 'params': [self.adaptor.description.elements.critical, node]
826
+ });
827
+ }
828
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
829
+ childs.push({'label': 'Parallel Branch',
830
+ 'function_call': func,
831
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
832
+ 'type': 'parallel_branch',
833
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}
834
+ );
835
+ } else {
836
+ childs.push({'label': 'Parallel',
837
+ 'function_call': func,
838
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
839
+ 'type': 'parallel',
840
+ 'params': [self.adaptor.description.elements.parallel, node]}
841
+ );
842
+ }
843
+ return childs;
844
+ }, //}}}
845
+ 'adaptor': {//{{{
846
+ 'mousedown': function (node,e) {
847
+ self.events.mousedown(node,e,true,true);
848
+ },
849
+ 'click': self.events.click,
850
+ 'dblclick': self.events.dblclick,
851
+ 'mouseover': self.events.mouseover,
852
+ 'mouseout': self.events.mouseout,
853
+ }//}}}
854
+ }; /*}}}*/
855
+ this.elements.closed_loop = { /*{{{*/
856
+ 'type': 'complex',
857
+ 'illustrator': {//{{{
858
+ 'endnodes': 'aggregate',
859
+ 'closeblock': false,
860
+ 'col_shift': function(node) {
861
+ return true;
862
+ },
863
+ 'closing_symbol': 'closed_loop_finish',
864
+ 'expansion': function(node) {
865
+ return 'horizontal';
866
+ },
867
+ 'label': function(node){
868
+ var avg = $('> _probability_avg',$(node).children('_probability')).text();
869
+ var ret = [ { column: 'Label', value: $(node).attr('overrun') } ];
870
+ if (avg != '') {
871
+ ret.push({ column: 'Average', value: avg + '%' });
872
+ }
873
+ return ret;
874
+ },
875
+ 'svg': self.adaptor.theme_dir + 'symbols/closed_loop.svg'
876
+ },//}}}
877
+ 'description': self.adaptor.theme_dir + 'rngs/closed_loop.rng',
878
+ 'permissible_children': function(node,mode) { //{{{
879
+ var func = null;
880
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
881
+ else { func = self.adaptor.description.insert_after }
882
+ var childs = [
883
+ {'label': 'Measuring',
884
+ 'function_call': func,
885
+ 'menu_icon': self.elements.closed_loop_measuring.illustrator.svg.clone(),
886
+ 'type': 'closed_loop_measuring',
887
+ 'params': [self.adaptor.description.elements.closed_loop_measuring, node]} ,
888
+ {'label': 'Control',
889
+ 'function_call': func,
890
+ 'menu_icon': self.elements.closed_loop_control.illustrator.svg.clone(),
891
+ 'type': 'closed_loop_control',
892
+ 'params': [self.adaptor.description.elements.closed_loop_control, node]},
893
+ {'label': 'Cancel',
894
+ 'function_call': func,
895
+ 'menu_icon': self.elements.closed_loop_cancel.illustrator.svg.clone(),
896
+ 'type': 'closed_loop_cancel',
897
+ 'params': [self.adaptor.description.elements.closed_loop_cancel, node]}
898
+ ];
899
+ return childs;
900
+ }, //}}}
901
+ 'adaptor': {//{{{
902
+ 'mousedown': function (node,e) {
903
+ self.events.mousedown(node,e,true,true);
904
+ },
905
+ 'click': self.events.click,
906
+ 'dblclick': self.events.dblclick,
907
+ 'mouseover': self.events.mouseover,
908
+ 'mouseout': self.events.mouseout,
909
+ }//}}}
910
+ }; /*}}}*/
911
+ this.elements.closed_loop_measuring = { /*{{{*/
912
+ 'type': 'complex',
913
+ 'illustrator': {//{{{
914
+ 'endnodes': 'passthrough',
915
+ 'closeblock': false,
916
+ 'noarrow': true,
917
+ 'expansion': function(node) {
918
+ return 'vertical';
919
+ },
920
+ 'col_shift': function(node) {
921
+ return false;
922
+ },
923
+ 'label': function(node){
924
+ var vals = [];
925
+ $('> value',$(node).children('_expected')).each((k,v) => {
926
+ vals.push($(v).text());
927
+ });
928
+ var valtext = '';
929
+ if (vals.length > 0) {
930
+ valtext = ' (' + vals.join(', ') + ')';
931
+ } else {
932
+ valtext = '';
933
+ }
934
+ var ret = [ { column: 'Label', value: 'measure: f = ' + $(node).attr('frequency') + ' Hz' + valtext } ];
935
+ return ret;
936
+ },
937
+ 'svg': self.adaptor.theme_dir + 'symbols/closed_loop_measuring.svg'
938
+ },//}}}
939
+ 'description': self.adaptor.theme_dir + 'rngs/closed_loop_measuring.rng',
940
+ 'permissible_children': function(node,mode) { //{{{
941
+ var func = null;
942
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
943
+ else { func = self.adaptor.description.insert_after }
944
+ var childs = [
945
+ {'label': 'Service Call with Scripts',
946
+ 'function_call': func,
947
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
948
+ 'type': 'callmanipulate',
949
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
950
+ {'label': 'Service Call',
951
+ 'function_call': func,
952
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
953
+ 'type': 'call',
954
+ 'params': [self.adaptor.description.elements.call, node]},
955
+ {'label': 'Script',
956
+ 'function_call': func,
957
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
958
+ 'type': 'manipulate',
959
+ 'params': [self.adaptor.description.elements.manipulate, node]},
960
+ {'label': 'Parallel',
961
+ 'function_call': func,
962
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
963
+ 'type': 'parallel',
964
+ 'params': [self.adaptor.description.elements.parallel, node]},
965
+ {'label': 'Decision',
966
+ 'function_call': func,
967
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
968
+ 'type': 'choose',
969
+ 'params': [self.adaptor.description.elements.choose, node]},
970
+ {'label': 'Loop',
971
+ 'function_call': func,
972
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
973
+ 'type': 'loop',
974
+ 'params': [self.adaptor.description.elements.loop, node]},
975
+ {'label': 'Stop',
976
+ 'function_call': func,
977
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
978
+ 'type': 'stop',
979
+ 'params': [self.adaptor.description.elements.stop, node]}
980
+ ];
981
+ return childs;
982
+ }, //}}}
983
+ 'adaptor': {//{{{
984
+ 'mousedown': function (node,e) {
985
+ self.events.mousedown(node,e,true,true);
986
+ },
987
+ 'click': self.events.click,
988
+ 'dblclick': self.events.dblclick,
989
+ 'mouseover': self.events.mouseover,
990
+ 'mouseout': self.events.mouseout,
991
+ }//}}}
992
+ }; /*}}}*/
993
+ this.elements.closed_loop_control = { /*{{{*/
994
+ 'type': 'complex',
995
+ 'illustrator': {//{{{
996
+ 'endnodes': 'passthrough',
997
+ 'closeblock': false,
998
+ 'noarrow': true,
999
+ 'expansion': function(node) {
1000
+ return 'vertical';
1001
+ },
1002
+ 'col_shift': function(node) {
1003
+ return false;
1004
+ },
1005
+ 'label': function(node){
1006
+ var vals = [];
1007
+ $('> change > value',$(node).children('_expected')).each((k,v) => {
1008
+ vals.push($(v).text());
1009
+ });
1010
+ var valtext = '';
1011
+ if (vals.length > 0) {
1012
+ valtext = ' (' + vals.join(', ') + ')';
1013
+ } else {
1014
+ valtext = '';
1015
+ }
1016
+ var ret = [ { column: 'Label', value: 'control: f = ' + $(node).attr('frequency') + ' Hz' + valtext } ];
1017
+ return ret;
1018
+ },
1019
+ 'svg': self.adaptor.theme_dir + 'symbols/closed_loop_control.svg'
1020
+ },//}}}
1021
+ 'description': self.adaptor.theme_dir + 'rngs/closed_loop_control.rng',
1022
+ 'permissible_children': function(node,mode) { //{{{
1023
+ var func = null;
1024
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1025
+ else { func = self.adaptor.description.insert_after }
1026
+ var childs = [
1027
+ {'label': 'Service Call with Scripts',
1028
+ 'function_call': func,
1029
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1030
+ 'type': 'callmanipulate',
1031
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1032
+ {'label': 'Service Call',
1033
+ 'function_call': func,
1034
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1035
+ 'type': 'call',
1036
+ 'params': [self.adaptor.description.elements.call, node]},
1037
+ {'label': 'Control',
1038
+ 'function_call': func,
1039
+ 'menu_icon': self.elements.closed_loop_control.illustrator.svg.clone(),
1040
+ 'type': 'closed_loop_control',
1041
+ 'params': [self.adaptor.description.elements.closed_loop_control, node]},
1042
+ {'label': 'Script',
1043
+ 'function_call': func,
1044
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1045
+ 'type': 'manipulate',
1046
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1047
+ {'label': 'Parallel',
1048
+ 'function_call': func,
1049
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1050
+ 'type': 'parallel',
1051
+ 'params': [self.adaptor.description.elements.parallel, node]},
1052
+ {'label': 'Decision',
1053
+ 'function_call': func,
1054
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1055
+ 'type': 'choose',
1056
+ 'params': [self.adaptor.description.elements.choose, node]},
1057
+ {'label': 'Loop',
1058
+ 'function_call': func,
1059
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1060
+ 'type': 'loop',
1061
+ 'params': [self.adaptor.description.elements.loop, node]},
1062
+ {'label': 'Stop',
1063
+ 'function_call': func,
1064
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1065
+ 'type': 'stop',
1066
+ 'params': [self.adaptor.description.elements.stop, node]}
1067
+ ];
1068
+ return childs;
1069
+ }, //}}}
1070
+ 'adaptor': {//{{{
1071
+ 'mousedown': function (node,e) {
1072
+ self.events.mousedown(node,e,true,true);
1073
+ },
1074
+ 'click': self.events.click,
1075
+ 'dblclick': self.events.dblclick,
1076
+ 'mouseover': self.events.mouseover,
1077
+ 'mouseout': self.events.mouseout,
1078
+ }//}}}
1079
+ }; /*}}}*/
1080
+ this.elements.closed_loop_cancel = { /*{{{*/
1081
+ 'type': 'complex',
1082
+ 'illustrator': {//{{{
1083
+ 'endnodes': 'passthrough',
1084
+ 'closeblock': false,
1085
+ 'noarrow': true,
1086
+ 'expansion': function(node) {
1087
+ return 'vertical';
1088
+ },
1089
+ 'col_shift': function(node) {
1090
+ return false;
1091
+ },
1092
+ 'label': function(node){
1093
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
1094
+ return ret;
1095
+ },
1096
+ 'svg': self.adaptor.theme_dir + 'symbols/closed_loop_cancel.svg'
1097
+ },//}}}
1098
+ 'description': self.adaptor.theme_dir + 'rngs/closed_loop_cancel.rng',
1099
+ 'permissible_children': function(node,mode) { //{{{
1100
+ var func = null;
1101
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1102
+ else { func = self.adaptor.description.insert_after }
1103
+ var childs = [
1104
+ {'label': 'Service Call with Scripts',
1105
+ 'function_call': func,
1106
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1107
+ 'type': 'callmanipulate',
1108
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1109
+ {'label': 'Service Call',
1110
+ 'function_call': func,
1111
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1112
+ 'type': 'call',
1113
+ 'params': [self.adaptor.description.elements.call, node]},
1114
+ {'label': 'Script',
1115
+ 'function_call': func,
1116
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1117
+ 'type': 'manipulate',
1118
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1119
+ {'label': 'Parallel',
1120
+ 'function_call': func,
1121
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1122
+ 'type': 'parallel',
1123
+ 'params': [self.adaptor.description.elements.parallel, node]},
1124
+ {'label': 'Decision',
1125
+ 'function_call': func,
1126
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1127
+ 'type': 'choose',
1128
+ 'params': [self.adaptor.description.elements.choose, node]},
1129
+ {'label': 'Loop',
1130
+ 'function_call': func,
1131
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1132
+ 'type': 'loop',
1133
+ 'params': [self.adaptor.description.elements.loop, node]},
1134
+ {'label': 'Stop',
1135
+ 'function_call': func,
1136
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1137
+ 'type': 'stop',
1138
+ 'params': [self.adaptor.description.elements.stop, node]}
1139
+ ];
1140
+ return childs;
1141
+ }, //}}}
1142
+ 'adaptor': {//{{{
1143
+ 'mousedown': function (node,e) {
1144
+ self.events.mousedown(node,e,true,true);
1145
+ },
1146
+ 'click': self.events.click,
1147
+ 'dblclick': self.events.dblclick,
1148
+ 'mouseover': self.events.mouseover,
1149
+ 'mouseout': self.events.mouseout,
1150
+ }//}}}
1151
+ }; /*}}}*/
1152
+ this.elements.parallel = { /*{{{*/
1153
+ 'type': 'complex',
1154
+ 'illustrator': {//{{{
1155
+ 'endnodes': 'aggregate',
1156
+ 'closeblock': false,
1157
+ 'closing_symbol': 'parallel_finish',
1158
+ 'expansion': function(node) {
1159
+ // check if any sibling other than 'parallel_branch' is present
1160
+ if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
1161
+ return 'horizontal';
1162
+ },
1163
+ 'col_shift': function(node) {
1164
+ return true;
1165
+ },
1166
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1167
+ },//}}}
1168
+ 'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
1169
+ 'permissible_children': function(node,mode) { //{{{
1170
+ var func = null;
1171
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1172
+ else { func = self.adaptor.description.insert_after }
1173
+ var childs = [
1174
+ {'label': 'Parallel Branch',
1175
+ 'function_call': func,
1176
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
1177
+ 'type': 'parallel_branch',
1178
+ 'params': [self.adaptor.description.elements.parallel_branch, node]},
1179
+ ];
1180
+ return childs;
1181
+ }, //}}}
1182
+ 'permissible_children_expert': function(node,mode) { //{{{
1183
+ var func = null;
1184
+ if (mode.match(/into/)) { func = self.adaptor.description.insert_first_into }
1185
+ else { func = self.adaptor.description.insert_after }
1186
+ var childs = [
1187
+ {'label': 'Service Call with Scripts',
1188
+ 'function_call': func,
1189
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1190
+ 'type': 'callmanipulate',
1191
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1192
+ {'label': 'Service Call',
1193
+ 'function_call': func,
1194
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1195
+ 'type': 'call',
1196
+ 'params': [self.adaptor.description.elements.call, node]},
1197
+ {'label': 'Script',
1198
+ 'function_call': func,
1199
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1200
+ 'type': 'manipulate',
1201
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1202
+ {'label': 'Decision',
1203
+ 'function_call': func,
1204
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1205
+ 'type': 'choose',
1206
+ 'params': [self.adaptor.description.elements.choose, node]},
1207
+ {'label': 'Loop',
1208
+ 'function_call': func,
1209
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1210
+ 'type': 'loop',
1211
+ 'params': [self.adaptor.description.elements.loop, node]},
1212
+ {'label': 'Closed Loop',
1213
+ 'function_call': func,
1214
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
1215
+ 'type': 'closed_loop',
1216
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
1217
+ {'label': 'Stop',
1218
+ 'function_call': func,
1219
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1220
+ 'type': 'stop',
1221
+ 'params': [self.adaptor.description.elements.stop, node]}
1222
+ ];
1223
+ if(node.get(0).tagName != 'parallel')
1224
+ childs.push({'label': 'Parallel',
1225
+ 'function_call': self.adaptor.description.insert_last_into,
1226
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1227
+ 'type': 'parallel',
1228
+ 'params': [self.adaptor.description.elements.parallel, node]});
1229
+ return childs;
1230
+ }, //}}}
1231
+ 'adaptor': {//{{{
1232
+ 'mousedown': function (node,e) {
1233
+ self.events.mousedown(node,e,true,true);
1234
+ },
1235
+ 'click': self.events.click,
1236
+ 'dblclick': self.events.dblclick,
1237
+ 'mouseover': self.events.mouseover,
1238
+ 'mouseout': self.events.mouseout,
1239
+ }//}}}
1240
+ }; /*}}}*/
1241
+ this.elements.parallel_branch = { /*{{{*/
1242
+ 'type': 'complex',
1243
+ 'illustrator': {//{{{
1244
+ 'endnodes': 'passthrough',
1245
+ 'closeblock': false,
1246
+ 'noarrow': true,
1247
+ 'expansion': function(node) {
1248
+ return 'vertical';
1249
+ },
1250
+ 'resolve_symbol': function(node,shift) {
1251
+ if(shift == true) {
1252
+ return 'parallel_branch_event';
1253
+ } else {
1254
+ return 'parallel_branch_normal';
1255
+ }
1256
+ },
1257
+ 'col_shift': function(node) {
1258
+ if(node.parentNode.tagName == 'choose') return false;
1259
+ if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
1260
+ return false;
1261
+ },
1262
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
1263
+ },//}}}
1264
+ 'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
1265
+ 'permissible_children': function(node,mode) { //{{{
1266
+ var func = null;
1267
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1268
+ else { func = self.adaptor.description.insert_after }
1269
+ var childs = [
1270
+ {'label': 'Service Call with Scripts',
1271
+ 'function_call': func,
1272
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1273
+ 'type': 'callmanipulate',
1274
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1275
+ {'label': 'Service Call',
1276
+ 'function_call': func,
1277
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1278
+ 'type': 'call',
1279
+ 'params': [self.adaptor.description.elements.call, node]},
1280
+ {'label': 'Script',
1281
+ 'function_call': func,
1282
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1283
+ 'type': 'manipulate',
1284
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1285
+ {'label': 'Parallel',
1286
+ 'function_call': func,
1287
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1288
+ 'type': 'parallel',
1289
+ 'params': [self.adaptor.description.elements.parallel, node]},
1290
+ {'label': 'Decision',
1291
+ 'function_call': func,
1292
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1293
+ 'type': 'choose',
1294
+ 'params': [self.adaptor.description.elements.choose, node]},
1295
+ {'label': 'Loop',
1296
+ 'function_call': func,
1297
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1298
+ 'type': 'loop',
1299
+ 'params': [self.adaptor.description.elements.loop, node]},
1300
+ {'label': 'Closed Loop',
1301
+ 'function_call': func,
1302
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
1303
+ 'type': 'closed_loop',
1304
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
1305
+ {'label': 'Terminate',
1306
+ 'function_call': func,
1307
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1308
+ 'type': 'terminate',
1309
+ 'params': [self.adaptor.description.elements.terminate, node]},
1310
+ {'label': 'Stop',
1311
+ 'function_call': func,
1312
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1313
+ 'type': 'stop',
1314
+ 'params': [self.adaptor.description.elements.stop, node]},
1315
+ {'label': 'Critical',
1316
+ 'function_call': func,
1317
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1318
+ 'type': 'critical',
1319
+ 'params': [self.adaptor.description.elements.critical, node]}
1320
+ ];
1321
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
1322
+ return [{'label': 'Alternative',
1323
+ 'function_call': func,
1324
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
1325
+ 'type': 'alternative',
1326
+ 'params': [self.adaptor.description.elements.alternative, node]}];
1327
+ }
1328
+ return childs;
1329
+ }, //}}}
1330
+ 'adaptor': {//{{{
1331
+ 'mousedown': function (node,e) {
1332
+ self.events.mousedown(node,e,true,true);
1333
+ },
1334
+ 'click': self.events.click,
1335
+ 'dblclick': self.events.dblclick,
1336
+ 'mouseover': self.events.mouseover,
1337
+ 'mouseout': self.events.mouseout,
1338
+ }//}}}
1339
+ }; /*}}}*/
1340
+ this.elements.critical = { /*{{{*/
1341
+ 'type': 'complex',
1342
+ 'illustrator': {//{{{
1343
+ 'endnodes': 'aggregate',
1344
+ 'closeblock': false,
1345
+ 'border': true,
1346
+ 'expansion': function(node) {
1347
+ return 'vertical';
1348
+ },
1349
+ 'col_shift': function(node) {
1350
+ return true;
1351
+ },
1352
+ 'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
1353
+ },//}}}
1354
+ 'description': self.adaptor.theme_dir + 'rngs/critical.rng',
1355
+ 'permissible_children': function(node,mode) { //{{{
1356
+ var func = null;
1357
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1358
+ else { func = self.adaptor.description.insert_after }
1359
+ var childs = [
1360
+ {'label': 'Service Call with Scripts',
1361
+ 'function_call': func,
1362
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1363
+ 'type': 'callmanipulate',
1364
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1365
+ {'label': 'Service Call',
1366
+ 'function_call': func,
1367
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1368
+ 'type': 'call',
1369
+ 'params': [self.adaptor.description.elements.call, node]},
1370
+ {'label': 'Script',
1371
+ 'function_call': func,
1372
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1373
+ 'type': 'manipulate',
1374
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1375
+ {'label': 'Parallel',
1376
+ 'function_call': func,
1377
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1378
+ 'type': 'parallel',
1379
+ 'params': [self.adaptor.description.elements.parallel, node]},
1380
+ {'label': 'Decision',
1381
+ 'function_call': func,
1382
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1383
+ 'type': 'choose',
1384
+ 'params': [self.adaptor.description.elements.choose, node]},
1385
+ {'label': 'Loop',
1386
+ 'function_call': func,
1387
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1388
+ 'type': 'loop',
1389
+ 'params': [self.adaptor.description.elements.loop, node]},
1390
+ {'label': 'Closed Loop',
1391
+ 'function_call': func,
1392
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
1393
+ 'type': 'closed_loop',
1394
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
1395
+ {'label': 'Terminate',
1396
+ 'function_call': func,
1397
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1398
+ 'type': 'terminate',
1399
+ 'params': [self.adaptor.description.elements.terminate, node]},
1400
+ {'label': 'Stop',
1401
+ 'function_call': func,
1402
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1403
+ 'type': 'stop',
1404
+ 'params': [self.adaptor.description.elements.stop, node]}
1405
+ ];
1406
+ if(node.parent('parallel_branch').length > 0) {
1407
+ childs.push({
1408
+ 'label': 'Critical',
1409
+ 'function_call': func,
1410
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1411
+ 'type': 'critical',
1412
+ 'params': [self.adaptor.description.elements.critical, node]
1413
+ });
1414
+ }
1415
+ return childs;
1416
+ }, //}}}
1417
+ 'adaptor': {//{{{
1418
+ 'mousedown': function (node,e) {
1419
+ self.events.mousedown(node,e,true,true);
1420
+ },
1421
+ 'click': self.events.click,
1422
+ 'dblclick': self.events.dblclick,
1423
+ 'mouseover': self.events.mouseover,
1424
+ 'mouseout': self.events.mouseout,
1425
+ }//}}}
1426
+ }; /*}}}*/
1427
+ this.elements.group = { /*{{{*/
1428
+ 'type': 'complex',
1429
+ 'illustrator': {//{{{
1430
+ 'endnodes': 'aggregate',
1431
+ 'closeblock': false,
1432
+ 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
1433
+ 'expansion': function(node) {
1434
+ return 'vertical';
1435
+ },
1436
+ 'col_shift': function(node) {
1437
+ return true;
1438
+ },
1439
+ 'svg': null
1440
+ },//}}}
1441
+ 'description': self.adaptor.theme_dir + 'rngs/group.rng',
1442
+ 'permissible_children': function(node,mode) { //{{{
1443
+ var func = null;
1444
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1445
+ else { func = self.adaptor.description.insert_after }
1446
+ return [
1447
+ ];
1448
+ }, //}}}
1449
+ 'adaptor': {//{{{
1450
+ 'mousedown': function (node,e) {
1451
+ self.events.mousedown(node,e,true,true);
1452
+ },
1453
+ 'click': self.events.click,
1454
+ 'dblclick': self.events.dblclick,
1455
+ 'mouseover': self.events.mouseover,
1456
+ 'mouseout': self.events.mouseout,
1457
+ }//}}}
1458
+ }; /*}}}*/
1459
+ this.elements.start = this.elements.description = { /*{{{*/
1460
+ 'type': 'description',
1461
+ 'illustrator': {//{{{
1462
+ 'endnodes': 'passthrough',
1463
+ 'label': function(node){ return [ { column: 'Label'}, { column: 'ID' }, { column: 'Resource' }, { column: 'RP' }, { column: 'R#' } ]; },
1464
+ 'closeblock': false,
1465
+ 'balance': true,
1466
+ 'expansion': function(node) {
1467
+ return 'vertical';
1468
+ },
1469
+ 'closing_symbol': 'end',
1470
+ 'col_shift': function(node) {
1471
+ return true;
1472
+ },
1473
+ 'svg': self.adaptor.theme_dir + 'symbols/start.svg'
1474
+ },//}}}
1475
+ 'description': null,
1476
+ 'permissible_children': function(node,mode) { //{{{
1477
+ var func = null;
1478
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1479
+ else { func = self.adaptor.description.insert_after }
1480
+ var childs = [
1481
+ {'label': 'Service Call with Scripts',
1482
+ 'function_call': func,
1483
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1484
+ 'type': 'callmanipulate',
1485
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1486
+ {'label': 'Service Call',
1487
+ 'function_call': func,
1488
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1489
+ 'type': 'call',
1490
+ 'params': [self.adaptor.description.elements.call, node]},
1491
+ {'label': 'Script',
1492
+ 'function_call': func,
1493
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1494
+ 'type': 'manipulate',
1495
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1496
+ {'label': 'Parallel',
1497
+ 'function_call': func,
1498
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1499
+ 'type': 'parallel',
1500
+ 'params': [self.adaptor.description.elements.parallel, node]},
1501
+ {'label': 'Decision',
1502
+ 'function_call': func,
1503
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1504
+ 'type': 'choose',
1505
+ 'params': [self.adaptor.description.elements.choose, node]},
1506
+ {'label': 'Loop',
1507
+ 'function_call': func,
1508
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1509
+ 'type': 'loop',
1510
+ 'params': [self.adaptor.description.elements.loop, node]},
1511
+ {'label': 'Closed Loop',
1512
+ 'function_call': func,
1513
+ 'menu_icon': self.elements.closed_loop.illustrator.svg.clone(),
1514
+ 'type': 'closed_loop',
1515
+ 'params': [self.adaptor.description.elements.closed_loop, node]},
1516
+ {'label': 'Stop',
1517
+ 'function_call': func,
1518
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1519
+ 'type': 'stop',
1520
+ 'params': [self.adaptor.description.elements.stop, node]}
1521
+ ];
1522
+ if(node.parent('parallel_branch').length > 0) {
1523
+ childs.push({
1524
+ 'label': 'Critical',
1525
+ 'function_call': func,
1526
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1527
+ 'type': 'critical',
1528
+ 'params': [self.adaptor.description.elements.critical, node]
1529
+ });
1530
+ }
1531
+ return childs;
1532
+ }, //}}}
1533
+ 'adaptor': {//{{{
1534
+ 'mousedown': function (node,e) {
1535
+ self.events.mousedown(node,e,true,false);
1536
+ },
1537
+ 'click': self.events.click,
1538
+ 'dblclick': self.events.dblclick,
1539
+ 'mouseover': self.events.mouseover,
1540
+ 'mouseout': self.events.mouseout,
1541
+ }//}}}
1542
+ }; /*}}}*/
1543
+
1544
+ // Abstract Elements
1545
+ // * they may only have an illustrator (or other parts)
1546
+ // * they HAVE TO have a parent
1547
+ this.elements.callmanipulate = { /*{{{*/
1548
+ 'parent': 'call',
1549
+ 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1550
+ 'illustrator': {//{{{
1551
+ 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
1552
+ 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
1553
+ },//}}}
1554
+ }; /*}}}*/
1555
+ this.elements.loop_head = { /*{{{*/
1556
+ 'parent': 'loop',
1557
+ 'illustrator': {//{{{
1558
+ 'endnodes': 'this',
1559
+ 'closeblock': true,
1560
+ 'label': function(node){
1561
+ var avg = $('> _probability_avg',$(node).children('_probability')).text();
1562
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
1563
+ if (avg != '') {
1564
+ ret.push({ column: 'Average', value: avg + 'x' });
1565
+ }
1566
+ return ret;
1567
+ },
1568
+ }//}}}
1569
+ }; /*}}}*/
1570
+ this.elements.loop_tail = { /*{{{*/
1571
+ 'parent': 'loop',
1572
+ 'illustrator': {//{{{
1573
+ 'endnodes': 'aggregate',
1574
+ 'closeblock': false,
1575
+ 'closing_symbol': 'loop_finish'
1576
+ },//}}}
1577
+ }; /*}}}*/
1578
+ this.elements.choose_inclusive = { /*{{{*/
1579
+ 'parent': 'choose',
1580
+ 'illustrator': {//{{{
1581
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1582
+ }//}}}
1583
+ }; /*}}}*/
1584
+ this.elements.choose_exclusive = { /*{{{*/
1585
+ 'parent': 'choose',
1586
+ 'illustrator': {//{{{
1587
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1588
+ },//}}}
1589
+ }; /*}}}*/
1590
+ this.elements.choose_inclusive_finish = { /*{{{*/
1591
+ 'parent': 'choose_finish',
1592
+ 'illustrator': {//{{{
1593
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1594
+ }//}}}
1595
+ }; /*}}}*/
1596
+ this.elements.choose_exclusive_finish = { /*{{{*/
1597
+ 'parent': 'choose_finish',
1598
+ 'illustrator': {//{{{
1599
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1600
+ },//}}}
1601
+ }; /*}}}*/
1602
+ this.elements.loop_head_finish = { /*{{{*/
1603
+ 'parent': 'loop_finish',
1604
+ 'illustrator': {//{{{
1605
+ 'endnodes': 'this',
1606
+ 'closeblock': true,
1607
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1608
+ }//}}}
1609
+ }; /*}}}*/
1610
+ this.elements.loop_tail_finish = { /*{{{*/
1611
+ 'parent': 'loop_finish',
1612
+ 'illustrator': {//{{{
1613
+ 'endnodes': 'this',
1614
+ 'closeblock': false,
1615
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1616
+ },//}}}
1617
+ }; /*}}}*/
1618
+ this.elements.closed_loop_finish = { /*{{{*/
1619
+ 'parent': 'closed_loop_finish',
1620
+ 'illustrator': {//{{{
1621
+ 'endnodes': 'this',
1622
+ 'closeblock': true,
1623
+ 'svg': self.adaptor.theme_dir + 'symbols/closed_loop.svg'
1624
+ }//}}}
1625
+ }; /*}}}*/
1626
+ this.elements.parallel_simple = { /*{{{*/
1627
+ 'parent': 'parallel_finish',
1628
+ 'illustrator': {//{{{
1629
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1630
+ }//}}}
1631
+ }; /*}}}*/
1632
+ this.elements.parallel_complex = { /*{{{*/
1633
+ 'parent': 'parallel_finish',
1634
+ 'illustrator': {//{{{
1635
+ 'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1636
+ },//}}}
1637
+ }; /*}}}*/
1638
+ this.elements.parallel_branch_normal = { /*{{{*/
1639
+ 'parent': 'parallel_branch',
1640
+ 'illustrator': {//{{{
1641
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
1642
+ }//}}}
1643
+ }; /*}}}*/
1644
+ this.elements.parallel_branch_event = { /*{{{*/
1645
+ 'parent': 'parallel_branch',
1646
+ 'illustrator': {//{{{
1647
+ 'endnodes': 'this',
1648
+ 'noarrow': false,
1649
+ 'border': true,
1650
+ 'wide': true,
1651
+ 'closing_symbol': 'event_end',
1652
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
1653
+ }//}}}
1654
+ }; /*}}}*/
1655
+ this.elements.parallel_branch_compact = { /*{{{*/
1656
+ 'parent': 'parallel_branch',
1657
+ 'illustrator': {//{{{
1658
+ 'endnodes': 'this',
1659
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
1660
+ }//}}}
1661
+ }; /*}}}*/
1662
+ this.elements.scripts = { /*{{{*/
1663
+ 'description': [self.adaptor.theme_dir + 'rngs/scripts.rng']
1664
+ }; /*}}}*/
1665
+ }