cpee 2.0.30 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/js/instance.js +3 -3
  3. data/cockpit/js/wfadaptor.js +2 -0
  4. data/cockpit/templates.legacy/Async.xml +12 -12
  5. data/cockpit/templates.legacy/BCO.xml +9 -11
  6. data/cockpit/templates.legacy/BCS.xml +9 -11
  7. data/cockpit/templates.legacy/Centurio.xml +7 -7
  8. data/cockpit/templates.legacy/Concurrent.xml +7 -7
  9. data/cockpit/templates.legacy/Coopis Testset.xml +7 -7
  10. data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -7
  11. data/cockpit/templates.legacy/ICSOC Testset.xml +7 -7
  12. data/cockpit/templates.legacy/Infinity.xml +7 -7
  13. data/cockpit/templates.legacy/Lego Boxer.xml +13 -13
  14. data/cockpit/templates.legacy/Lego Conveyor.xml +13 -13
  15. data/cockpit/templates.legacy/Lego Crane.xml +16 -16
  16. data/cockpit/templates.legacy/Lego Ejector.xml +16 -16
  17. data/cockpit/templates.legacy/Lego Full.xml +12 -12
  18. data/cockpit/templates.legacy/Lego Liddy.xml +13 -13
  19. data/cockpit/templates.legacy/Lego Plate.xml +13 -13
  20. data/cockpit/templates.legacy/Lego Transporter.xml +14 -14
  21. data/cockpit/templates.legacy/Lego_Part_1.xml +12 -12
  22. data/cockpit/templates.legacy/LgLinear.xml +7 -10
  23. data/cockpit/templates.legacy/Linear.xml +11 -14
  24. data/cockpit/templates.legacy/Log.xml +11 -12
  25. data/cockpit/templates.legacy/Mangler 1.xml +7 -7
  26. data/cockpit/templates.legacy/Mangler 2.xml +7 -7
  27. data/cockpit/templates.legacy/Manuel Labels.xml +11 -11
  28. data/cockpit/templates.legacy/Promise.xml +30 -30
  29. data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +7 -7
  30. data/cockpit/templates.legacy/Subprocess.xml +15 -15
  31. data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
  32. data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
  33. data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
  34. data/cockpit/templates.legacy/Syncing P34.xml +8 -11
  35. data/cockpit/templates.legacy/TEST - Bad Loop.xml +7 -7
  36. data/cockpit/templates.legacy/TEST - Wrong Positions.xml +7 -7
  37. data/cockpit/templates.legacy/Take_5.xml +14 -14
  38. data/cockpit/templates.legacy/Update.xml +11 -11
  39. data/cockpit/templates.legacy/Worklist Parallel.xml +17 -17
  40. data/cockpit/templates.legacy/Worklist Test CPEE.xml +14 -14
  41. data/cockpit/templates.legacy/Worklist Test.xml +14 -14
  42. data/cockpit/templates.legacy/Worklist Test2.xml +14 -14
  43. data/cockpit/templates/Coopis 2010.xml +8 -8
  44. data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +8 -11
  45. data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +8 -11
  46. data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +8 -11
  47. data/cockpit/templates/Track Test Local.xml +2 -2
  48. data/cockpit/templates/Track Test.xml +1 -1
  49. data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +1 -1
  50. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +1 -1
  51. data/cockpit/templates/UR-VUE 2020 Solution NN.xml +1 -1
  52. data/cockpit/templates/UR-VUE 2020 Solution View.xml +1 -1
  53. data/cockpit/templates/UR-VUE 2020.xml +1 -1
  54. data/cockpit/templates/Worklist.xml +14 -14
  55. data/cockpit/templates/instantiate.local/Take_Sub.xml +2 -2
  56. data/cockpit/templates/instantiate/Take_Perf.xml +1 -1
  57. data/cockpit/templates/instantiate/Take_Sub.xml +2 -2
  58. data/cockpit/templates/instantiate/Take_X.xml +2 -2
  59. data/cockpit/themes/compact/rngs/start.rng +83 -0
  60. data/cockpit/themes/compact/symbols/start.svg +1 -1
  61. data/cockpit/themes/control/rngs/start.rng +83 -0
  62. data/cockpit/themes/control/symbols/start.svg +1 -1
  63. data/cockpit/themes/default/rngs/start.rng +83 -0
  64. data/cockpit/themes/default/symbols/start.svg +1 -1
  65. data/cockpit/themes/default/theme.js +1 -1
  66. data/cockpit/themes/extended/rngs/start.rng +83 -0
  67. data/cockpit/themes/extended/symbols/start.svg +1 -1
  68. data/cockpit/themes/model/symbols/start.svg +1 -1
  69. data/cockpit/themes/packed/rngs/start.rng +83 -0
  70. data/cockpit/themes/packed/symbols/start.svg +1 -1
  71. data/cockpit/themes/preset/rngs/start.rng +83 -0
  72. data/cockpit/themes/preset/symbols/start.svg +1 -1
  73. data/cockpit/themes/preset/theme.js +1 -1
  74. data/cpee.gemspec +2 -2
  75. data/lib/cpee/attributes_helper.rb +14 -0
  76. data/lib/cpee/implementation.rb +10 -8
  77. data/lib/cpee/implementation_callbacks.rb +14 -0
  78. data/lib/cpee/implementation_notifications.rb +14 -0
  79. data/lib/cpee/implementation_properties.rb +128 -24
  80. data/lib/cpee/persistence.rb +0 -27
  81. data/lib/cpee/statemachine.rb +14 -0
  82. data/lib/cpee/value_helper.rb +14 -0
  83. data/lib/properties.xml +4 -4
  84. data/lib/properties/{handlerwrapper.rng → executionhandler.rng} +2 -2
  85. data/lib/properties/properties.rng +2 -2
  86. data/lib/properties/set-properties.rng +2 -2
  87. data/lib/properties/set-some-properties.rng +2 -2
  88. data/server/{resources → executionhandlers/ruby}/backend/README.md +0 -0
  89. data/server/{resources → executionhandlers/ruby}/backend/instance.template +2 -4
  90. data/server/{resources → executionhandlers/ruby}/backend/opts.yaml +2 -2
  91. data/server/executionhandlers/ruby/backend/run +37 -0
  92. data/server/{handlerwrappers/default.rb → executionhandlers/ruby/connection.rb} +3 -3
  93. data/server/executionhandlers/ruby/controller.rb +195 -0
  94. data/server/{resources/transformation_dslx.xsl → executionhandlers/ruby/dsl_to_dslx.xsl} +53 -8
  95. data/server/executionhandlers/ruby/execution.rb +81 -0
  96. data/server/resources/properties.empty +1 -1
  97. data/server/resources/properties.init +1 -1
  98. data/server/resources/topics.xml +2 -2
  99. data/server/routing/persist.rb +3 -3
  100. data/tools/cpee +9 -3
  101. data/tools/server/cpee +1 -1
  102. data/tools/server/resources/properties.init +1 -1
  103. metadata +19 -237
  104. data/cockpit/templates.legacy/convert_cpee2.rb +0 -15
  105. data/lib/cpee/controller.rb +0 -199
  106. data/lib/cpee/transform.rb +0 -95
  107. data/server/resources/backend/instance.rb +0 -23
  108. data/server/resources/backend/run +0 -33
  109. data/server/routing/end.pid +0 -1
  110. data/server/routing/forward-events.pid +0 -1
  111. data/server/routing/forward-votes.pid +0 -1
  112. data/server/routing/persist.pid +0 -1
  113. data/server/server.pid +0 -1
  114. data/tools/test/README +0 -4
  115. data/tools/test/config.json +0 -3
  116. data/tools/test/contrib/graph_example.svg +0 -1166
  117. data/tools/test/contrib/legend.svg +0 -817
  118. data/tools/test/contrib/symbols.svg +0 -224
  119. data/tools/test/contrib/transformation1.xsl +0 -264
  120. data/tools/test/contrib/transformation2.xsl +0 -10
  121. data/tools/test/contrib/tree_example.svg +0 -788
  122. data/tools/test/css/model.css +0 -24
  123. data/tools/test/css/track.css +0 -60
  124. data/tools/test/css/ui.css +0 -214
  125. data/tools/test/css/wfadaptor.css +0 -422
  126. data/tools/test/edit.html +0 -258
  127. data/tools/test/graph.html +0 -69
  128. data/tools/test/index.html +0 -258
  129. data/tools/test/js/details.js +0 -109
  130. data/tools/test/js/instance.js +0 -1344
  131. data/tools/test/js/model.js +0 -41
  132. data/tools/test/js/parameters.js +0 -82
  133. data/tools/test/js/track.js +0 -18
  134. data/tools/test/js/ui.js +0 -104
  135. data/tools/test/js/wfadaptor.js +0 -763
  136. data/tools/test/js_libs.zip +0 -0
  137. data/tools/test/js_libs/Makefile +0 -2
  138. data/tools/test/js_libs/ansi_up.js +0 -333
  139. data/tools/test/js_libs/console.js +0 -80
  140. data/tools/test/js_libs/custommenu.css +0 -84
  141. data/tools/test/js_libs/custommenu.js +0 -104
  142. data/tools/test/js_libs/experiments1/relaxngui.css +0 -185
  143. data/tools/test/js_libs/experiments1/relaxngui.js +0 -488
  144. data/tools/test/js_libs/experiments1/rngtest9.html +0 -60
  145. data/tools/test/js_libs/experiments1/rngtest9.rng +0 -35
  146. data/tools/test/js_libs/experiments1/rngtest9.xml +0 -8
  147. data/tools/test/js_libs/jquery-2.2.4.min.js +0 -4
  148. data/tools/test/js_libs/jquery-3.2.1.min.js +0 -4
  149. data/tools/test/js_libs/jquery-3.3.1.min.js +0 -2
  150. data/tools/test/js_libs/jquery.browser.js +0 -40
  151. data/tools/test/js_libs/jquery.caret.min.js +0 -10
  152. data/tools/test/js_libs/jquery.cookie.js +0 -117
  153. data/tools/test/js_libs/jquery.min.js +0 -1
  154. data/tools/test/js_libs/jquery.svg.min.js +0 -6
  155. data/tools/test/js_libs/jquery.svgdom.min.js +0 -6
  156. data/tools/test/js_libs/markdown.min.js +0 -1
  157. data/tools/test/js_libs/parsequery.js +0 -21
  158. data/tools/test/js_libs/printf.js +0 -368
  159. data/tools/test/js_libs/relaxngui.css +0 -213
  160. data/tools/test/js_libs/relaxngui.js +0 -543
  161. data/tools/test/js_libs/strftime.min.js +0 -1
  162. data/tools/test/js_libs/tests/dataelements.html +0 -59
  163. data/tools/test/js_libs/tests/dataelements.rng +0 -8
  164. data/tools/test/js_libs/tests/dataelements.xml +0 -3
  165. data/tools/test/js_libs/tests/relaxngui.css +0 -203
  166. data/tools/test/js_libs/tests/relaxngui.js +0 -502
  167. data/tools/test/js_libs/tests/rngtest1.html +0 -66
  168. data/tools/test/js_libs/tests/rngtest1.rng +0 -147
  169. data/tools/test/js_libs/tests/rngtest1.xml +0 -13
  170. data/tools/test/js_libs/tests/rngtest2.html +0 -60
  171. data/tools/test/js_libs/tests/rngtest2.rng +0 -6
  172. data/tools/test/js_libs/tests/rngtest2.xml +0 -3
  173. data/tools/test/js_libs/tests/rngtest3.html +0 -60
  174. data/tools/test/js_libs/tests/rngtest3.rng +0 -23
  175. data/tools/test/js_libs/tests/rngtest3.xml +0 -9
  176. data/tools/test/js_libs/tests/rngtest4.html +0 -60
  177. data/tools/test/js_libs/tests/rngtest4.rng +0 -19
  178. data/tools/test/js_libs/tests/rngtest4.xml +0 -12
  179. data/tools/test/js_libs/tests/rngtest5.html +0 -60
  180. data/tools/test/js_libs/tests/rngtest5.rng +0 -75
  181. data/tools/test/js_libs/tests/rngtest5.xml +0 -40
  182. data/tools/test/js_libs/tests/rngtest6.html +0 -60
  183. data/tools/test/js_libs/tests/rngtest6.rng +0 -24
  184. data/tools/test/js_libs/tests/rngtest6.xml +0 -6
  185. data/tools/test/js_libs/tests/rngtest8.html +0 -60
  186. data/tools/test/js_libs/tests/rngtest8.rng +0 -13
  187. data/tools/test/js_libs/tests/rngtest8.xml +0 -2
  188. data/tools/test/js_libs/tests/rngtest9.html +0 -60
  189. data/tools/test/js_libs/tests/rngtest9.rng +0 -31
  190. data/tools/test/js_libs/tests/rngtest9.xml +0 -8
  191. data/tools/test/js_libs/ui.css +0 -333
  192. data/tools/test/js_libs/ui.html +0 -168
  193. data/tools/test/js_libs/ui.js +0 -177
  194. data/tools/test/js_libs/underscore.min.js +0 -27
  195. data/tools/test/js_libs/util.js +0 -81
  196. data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +0 -358
  197. data/tools/test/js_libs/vkbeautify.js +0 -1
  198. data/tools/test/js_libs/webcomponents.min.js +0 -196
  199. data/tools/test/model.html +0 -192
  200. data/tools/test/rngs/attributes.rng +0 -8
  201. data/tools/test/rngs/dataelements.rng +0 -8
  202. data/tools/test/rngs/endpoints.rng +0 -8
  203. data/tools/test/templates.legacy/Async.xml +0 -46
  204. data/tools/test/templates.legacy/BCO.xml +0 -70
  205. data/tools/test/templates.legacy/BCS.xml +0 -70
  206. data/tools/test/templates.legacy/Centurio.xml +0 -75
  207. data/tools/test/templates.legacy/Concurrent.xml +0 -40
  208. data/tools/test/templates.legacy/Coopis Testset.xml +0 -76
  209. data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +0 -30
  210. data/tools/test/templates.legacy/ICSOC Testset.xml +0 -95
  211. data/tools/test/templates.legacy/Infinity.xml +0 -28
  212. data/tools/test/templates.legacy/Lego Boxer.xml +0 -31
  213. data/tools/test/templates.legacy/Lego Conveyor.xml +0 -31
  214. data/tools/test/templates.legacy/Lego Crane.xml +0 -87
  215. data/tools/test/templates.legacy/Lego Ejector.xml +0 -55
  216. data/tools/test/templates.legacy/Lego Full.xml +0 -142
  217. data/tools/test/templates.legacy/Lego Liddy.xml +0 -40
  218. data/tools/test/templates.legacy/Lego Plate.xml +0 -31
  219. data/tools/test/templates.legacy/Lego Transporter.xml +0 -43
  220. data/tools/test/templates.legacy/Lego_Part_1.xml +0 -85
  221. data/tools/test/templates.legacy/LgLinear.xml +0 -65
  222. data/tools/test/templates.legacy/Linear.xml +0 -77
  223. data/tools/test/templates.legacy/Log.xml +0 -117
  224. data/tools/test/templates.legacy/Mangler 1.xml +0 -87
  225. data/tools/test/templates.legacy/Mangler 2.xml +0 -103
  226. data/tools/test/templates.legacy/Manuel Labels.xml +0 -55
  227. data/tools/test/templates.legacy/Promise.xml +0 -275
  228. data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +0 -83
  229. data/tools/test/templates.legacy/Subprocess.xml +0 -56
  230. data/tools/test/templates.legacy/Syncing P34 1.xml +0 -77
  231. data/tools/test/templates.legacy/Syncing P34 2.xml +0 -77
  232. data/tools/test/templates.legacy/Syncing P34 3.xml +0 -77
  233. data/tools/test/templates.legacy/Syncing P34.xml +0 -77
  234. data/tools/test/templates.legacy/TEST - Bad Loop.xml +0 -173
  235. data/tools/test/templates.legacy/TEST - Wrong Positions.xml +0 -174
  236. data/tools/test/templates.legacy/Take_5.xml +0 -48
  237. data/tools/test/templates.legacy/Update.xml +0 -32
  238. data/tools/test/templates.legacy/Worklist Parallel.xml +0 -104
  239. data/tools/test/templates.legacy/Worklist Test CPEE.xml +0 -40
  240. data/tools/test/templates.legacy/Worklist Test.xml +0 -42
  241. data/tools/test/templates.legacy/Worklist Test2.xml +0 -43
  242. data/tools/test/templates.legacy/convert_cpee2.rb +0 -15
  243. data/tools/test/templates.legacy/convert_preset.rb +0 -32
  244. data/tools/test/templates.legacy/testsets.xml +0 -37
  245. data/tools/test/templates.legacy/transformations.xml +0 -4
  246. data/tools/test/templates/Coopis 2010.xml +0 -76
  247. data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +0 -77
  248. data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +0 -77
  249. data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +0 -77
  250. data/tools/test/templates/Track Test Local.xml +0 -82
  251. data/tools/test/templates/Track Test.xml +0 -82
  252. data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +0 -182
  253. data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +0 -203
  254. data/tools/test/templates/UR-VUE 2020 Solution NN.xml +0 -197
  255. data/tools/test/templates/UR-VUE 2020 Solution View.xml +0 -151
  256. data/tools/test/templates/UR-VUE 2020.xml +0 -26
  257. data/tools/test/templates/Worklist.xml +0 -42
  258. data/tools/test/templates/instantiate.local/Take_Sub.xml +0 -59
  259. data/tools/test/templates/instantiate/Take_Perf.xml +0 -46
  260. data/tools/test/templates/instantiate/Take_Sub.xml +0 -58
  261. data/tools/test/templates/instantiate/Take_X.xml +0 -48
  262. data/tools/test/themes/compact/theme.js +0 -1285
  263. data/tools/test/themes/diana/theme.js +0 -1650
  264. data/tools/test/themes/extended/theme.js +0 -1325
  265. data/tools/test/themes/model/rngs/alternative.rng +0 -1
  266. data/tools/test/themes/model/rngs/call.rng +0 -67
  267. data/tools/test/themes/model/rngs/callmanipulate.rng +0 -72
  268. data/tools/test/themes/model/rngs/choose.rng +0 -1
  269. data/tools/test/themes/model/rngs/critical.rng +0 -1
  270. data/tools/test/themes/model/rngs/escape.rng +0 -1
  271. data/tools/test/themes/model/rngs/group.rng +0 -1
  272. data/tools/test/themes/model/rngs/loop.rng +0 -1
  273. data/tools/test/themes/model/rngs/manipulate.rng +0 -1
  274. data/tools/test/themes/model/rngs/otherwise.rng +0 -1
  275. data/tools/test/themes/model/rngs/parallel.rng +0 -1
  276. data/tools/test/themes/model/rngs/parallel_branch.rng +0 -1
  277. data/tools/test/themes/model/rngs/scripts.rng +0 -7
  278. data/tools/test/themes/model/rngs/stop.rng +0 -1
  279. data/tools/test/themes/model/rngs/terminate.rng +0 -1
  280. data/tools/test/themes/model/theme.js +0 -1268
  281. data/tools/test/themes/packed/theme.js +0 -1286
  282. data/tools/test/themes/preset/rngs/alternative.rng +0 -25
  283. data/tools/test/themes/preset/rngs/call.rng +0 -122
  284. data/tools/test/themes/preset/rngs/callmanipulate.rng +0 -145
  285. data/tools/test/themes/preset/rngs/choose.rng +0 -14
  286. data/tools/test/themes/preset/rngs/closed_loop.rng +0 -62
  287. data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +0 -5
  288. data/tools/test/themes/preset/rngs/closed_loop_control.rng +0 -31
  289. data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +0 -12
  290. data/tools/test/themes/preset/rngs/critical.rng +0 -5
  291. data/tools/test/themes/preset/rngs/escape.rng +0 -1
  292. data/tools/test/themes/preset/rngs/group.rng +0 -3
  293. data/tools/test/themes/preset/rngs/loop.rng +0 -22
  294. data/tools/test/themes/preset/rngs/manipulate.rng +0 -9
  295. data/tools/test/themes/preset/rngs/otherwise.rng +0 -22
  296. data/tools/test/themes/preset/rngs/parallel.rng +0 -21
  297. data/tools/test/themes/preset/rngs/parallel_branch.rng +0 -8
  298. data/tools/test/themes/preset/rngs/scripts.rng +0 -23
  299. data/tools/test/themes/preset/rngs/stop.rng +0 -5
  300. data/tools/test/themes/preset/rngs/terminate.rng +0 -1
  301. data/tools/test/themes/preset/symbols/alternative.svg +0 -5
  302. data/tools/test/themes/preset/symbols/arrow.svg +0 -3
  303. data/tools/test/themes/preset/symbols/call.svg +0 -6
  304. data/tools/test/themes/preset/symbols/callmanipulate.svg +0 -8
  305. data/tools/test/themes/preset/symbols/choose.svg +0 -5
  306. data/tools/test/themes/preset/symbols/choose_exclusive.svg +0 -5
  307. data/tools/test/themes/preset/symbols/choose_inclusive.svg +0 -4
  308. data/tools/test/themes/preset/symbols/closed_loop.svg +0 -5
  309. data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +0 -5
  310. data/tools/test/themes/preset/symbols/closed_loop_control.svg +0 -5
  311. data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +0 -6
  312. data/tools/test/themes/preset/symbols/complex.svg +0 -8
  313. data/tools/test/themes/preset/symbols/critical.svg +0 -4
  314. data/tools/test/themes/preset/symbols/end.svg +0 -3
  315. data/tools/test/themes/preset/symbols/escape.svg +0 -5
  316. data/tools/test/themes/preset/symbols/event_end.svg +0 -3
  317. data/tools/test/themes/preset/symbols/loop.svg +0 -5
  318. data/tools/test/themes/preset/symbols/manipulate.svg +0 -4
  319. data/tools/test/themes/preset/symbols/otherwise.svg +0 -5
  320. data/tools/test/themes/preset/symbols/parallel.svg +0 -5
  321. data/tools/test/themes/preset/symbols/parallel_branch.svg +0 -5
  322. data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +0 -4
  323. data/tools/test/themes/preset/symbols/parallel_branch_event.svg +0 -14
  324. data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +0 -5
  325. data/tools/test/themes/preset/symbols/scripts.svg +0 -4
  326. data/tools/test/themes/preset/symbols/start.svg +0 -3
  327. data/tools/test/themes/preset/symbols/stop.svg +0 -5
  328. data/tools/test/themes/preset/symbols/terminate.svg +0 -4
  329. data/tools/test/themes/preset/theme.js +0 -1287
  330. data/tools/test/track.html +0 -142
@@ -1,1286 +0,0 @@
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 = true;
9
- this.striped = false;
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 ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
267
- return ret;
268
- },
269
- 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
270
- 'resolve_symbol': function(node) {
271
- if($('code', node).length > 0) {
272
- return 'callmanipulate';
273
- } else {
274
- return 'call';
275
- }
276
- },
277
- 'svg': self.adaptor.theme_dir + 'symbols/call.svg'
278
- },//}}}
279
- 'description': self.adaptor.theme_dir + 'rngs/call.rng',
280
- 'permissible_children': function(node,mode) { //{{{
281
- if(node.children('code').length < 1)
282
- return [
283
- {'label': 'Scripts',
284
- 'function_call': self.adaptor.description.insert_last_into,
285
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
286
- 'type': undefined,
287
- 'params': [self.adaptor.description.elements.scripts, node]}
288
- ];
289
- return [];
290
- }, //}}}
291
- 'adaptor': {//{{{
292
- 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
293
- 'click': self.events.click,
294
- 'dragstart': self.events.dragstart,
295
- 'mouseover': self.events.mouseover,
296
- 'mouseout': self.events.mouseout
297
- }//}}}
298
- }; /*}}}*/
299
- this.elements.manipulate = { /*{{{*/
300
- 'type': 'primitive',
301
- 'illustrator': {//{{{
302
- 'endnodes': 'this',
303
- 'label': function(node){
304
- var lab = $(node).attr('label');
305
- if (lab) {
306
- return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') } ];
307
- } else {
308
- return [];
309
- }
310
- },
311
- 'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
312
- },//}}}
313
- 'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
314
- 'permissible_children': function(node,mode) { //{{{
315
- return [];
316
- }, //}}}
317
- 'adaptor': {//{{{
318
- 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
319
- 'click': self.events.click,
320
- 'mouseover': self.events.mouseover,
321
- 'mouseout': self.events.mouseout
322
- }//}}}
323
- }; /*}}}*/
324
- this.elements.escape = { /*{{{*/
325
- 'type': 'primitive',
326
- 'illustrator': {//{{{
327
- 'endnodes': 'this',
328
- 'svg': self.adaptor.theme_dir + 'symbols/escape.svg'
329
- },//}}}
330
- 'description': self.adaptor.theme_dir + 'rngs/escape.rng',
331
- 'permissible_children': function(node,mode) { //{{{
332
- return [];
333
- }, //}}}
334
- 'adaptor': {//{{{
335
- 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
336
- 'click': self.events.click,
337
- 'mouseover': self.events.mouseover,
338
- 'mouseout': self.events.mouseout
339
- }//}}}
340
- }; /*}}}*/
341
- this.elements.stop = { /*{{{*/
342
- 'type': 'primitive',
343
- 'illustrator': {//{{{
344
- 'endnodes': 'this',
345
- 'svg': self.adaptor.theme_dir + 'symbols/stop.svg'
346
- },//}}}
347
- 'description': self.adaptor.theme_dir + 'rngs/stop.rng',
348
- 'permissible_children': function(node,mode) { //{{{
349
- return [];
350
- }, //}}}
351
- 'adaptor': {//{{{
352
- 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
353
- 'click': self.events.click,
354
- 'mouseover': self.events.mouseover,
355
- 'mouseout': self.events.mouseout
356
- }//}}}
357
- }; /*}}}*/
358
- this.elements.terminate = { /*{{{*/
359
- 'type': 'primitive',
360
- 'illustrator': {//{{{
361
- 'endnodes': 'this',
362
- 'final': true,
363
- 'svg': self.adaptor.theme_dir + 'symbols/terminate.svg'
364
- },//}}}
365
- 'description': self.adaptor.theme_dir + 'rngs/terminate.rng',
366
- 'permissible_children': function(node,mode) { //{{{
367
- return [];
368
- }, //}}}
369
- 'adaptor': {//{{{
370
- 'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
371
- 'mouseover': self.events.mouseover,
372
- 'mouseout': self.events.mouseout
373
- }//}}}
374
- }; /*}}}*/
375
- this.elements.end = { /*{{{*/
376
- 'type': 'primitive',
377
- 'illustrator': {//{{{
378
- 'endnodes': 'this',
379
- 'svg': self.adaptor.theme_dir + 'symbols/end.svg'
380
- }, //}}}
381
- 'adaptor': {//{{{
382
- 'mousedown': function (node,e) {
383
- self.events.suppress();
384
- }
385
- }//}}}
386
- }; /*}}}*/
387
- this.elements.event_end = { /*{{{*/
388
- 'type': 'primitive',
389
- 'illustrator': {//{{{
390
- 'endnodes': 'this',
391
- 'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
392
- }, //}}}
393
- 'adaptor': {//{{{
394
- 'mousedown': function (node,e) {
395
- self.events.suppress();
396
- },
397
- 'click': self.events.click,
398
- 'dblclick': self.events.dblclick,
399
- 'mouseover': self.events.mouseover,
400
- 'mouseout': self.events.mouseout
401
- }//}}}
402
- }; /*}}}*/
403
- this.elements.choose_finish = { /*{{{*/
404
- 'type': 'primitive',
405
- 'illustrator': {//{{{
406
- 'endnodes': 'this',
407
- 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg',
408
- 'resolve_symbol': function(node) {
409
- if($(node).attr('mode') == 'exclusive') {
410
- return 'choose_exclusive_finish';
411
- } else {
412
- return 'choose_inclusive_finish';
413
- }
414
- },
415
- }, //}}}
416
- 'adaptor': {//{{{
417
- 'mousedown': function (node,e) {
418
- self.events.mousedown(node,e,true,true);
419
- },
420
- 'click': self.events.click,
421
- 'dblclick': self.events.dblclick,
422
- 'mouseover': self.events.mouseover,
423
- 'mouseout': self.events.mouseout
424
- }//}}}
425
- }; /*}}}*/
426
- this.elements.loop_finish = { /*{{{*/
427
- 'type': 'primitive',
428
- 'illustrator': {//{{{
429
- 'endnodes': 'this',
430
- 'closeblock': true,
431
- 'label': function(node){
432
- var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
433
- return ret;
434
- },
435
- 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg',
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.parallel_finish = { /*{{{*/
448
- 'type': 'primitive',
449
- 'illustrator': {//{{{
450
- 'endnodes': 'this',
451
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
452
- 'resolve_symbol': function(node) {
453
- if($(node).attr('wait') == '-1') {
454
- return 'parallel_simple';
455
- } else {
456
- return 'parallel_complex';
457
- }
458
- },
459
- }, //}}}
460
- 'adaptor': {//{{{
461
- 'mousedown': function (node,e) {
462
- self.events.mousedown(node,e,true,true);
463
- },
464
- 'click': self.events.click,
465
- 'dblclick': self.events.dblclick,
466
- 'mouseover': self.events.mouseover,
467
- 'mouseout': self.events.mouseout
468
- }//}}}
469
- }; /*}}}*/
470
-
471
- // Complex Elements
472
- this.elements.choose = { /*{{{*/
473
- 'type': 'complex',
474
- 'illustrator': {//{{{
475
- 'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
476
- 'endnodes': 'aggregate',
477
- 'closeblock': false,
478
- 'expansion': function(node) {
479
- return 'horizontal';
480
- },
481
- 'resolve_symbol': function(node) {
482
- if($(node).attr('mode') == 'exclusive') {
483
- return 'choose_exclusive';
484
- } else {
485
- return 'choose_inclusive';
486
- }
487
- },
488
- 'col_shift': function(node) {
489
- return false;
490
- },
491
- 'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
492
- },//}}}
493
- 'description': self.adaptor.theme_dir + 'rngs/choose.rng',
494
- 'permissible_children': function(node,mode) { //{{{
495
- var func = null;
496
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
497
- else { func = self.adaptor.description.insert_after }
498
- if(node.children('parallel_branch').length > 0) {
499
- return [{'label': 'Parallel Branch',
500
- 'function_call': func,
501
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
502
- 'type': 'parallel_branch',
503
- 'params': [self.adaptor.description.elements.parallel_branch, node]}];
504
- }
505
- var childs = [{'label': 'Alternative',
506
- 'function_call': func,
507
- 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
508
- 'type': 'alternative',
509
- 'params': [self.adaptor.description.elements.alternative, node]}];
510
- if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length && node.parent('choose').length == 0)
511
- childs.push({'label': 'Otherwise',
512
- 'function_call': self.adaptor.description.insert_last_into,
513
- 'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
514
- 'type': 'otherwise',
515
- 'params': [self.adaptor.description.elements.otherwise, node]});
516
- if(node.parents('parallel').length > node.parents('parallel_branch').length)
517
- childs.push({'label': 'Parallel Branch',
518
- 'function_call': func,
519
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
520
- 'type': 'parallel_branch',
521
- 'params': [self.adaptor.description.elements.parallel_branch, node]});
522
- return childs;
523
- }, //}}}
524
- 'adaptor': {//{{{
525
- 'mousedown': function (node,e) {
526
- self.events.mousedown(node,e,true,true);
527
- },
528
- 'click': self.events.click,
529
- 'dblclick': self.events.dblclick,
530
- 'mouseover': self.events.mouseover,
531
- 'mouseout': self.events.mouseout
532
- }//}}}
533
- }; /*}}}*/
534
- this.elements.otherwise = { /*{{{*/
535
- 'type': 'complex',
536
- 'illustrator': {//{{{
537
- 'endnodes': 'passthrough',
538
- 'closeblock': false,
539
- 'noarrow': true,
540
- 'expansion': function(node) {
541
- return 'vertical';
542
- },
543
- 'col_shift': function(node) {
544
- return false;
545
- },
546
- 'svg': self.adaptor.theme_dir + 'symbols/otherwise.svg'
547
- },//}}}
548
- 'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
549
- 'neverdelete': true,
550
- 'permissible_children': function(node,mode) { //{{{
551
- var func = null;
552
- var childs = null;
553
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
554
- else { func = self.adaptor.description.insert_after }
555
- var childs = [
556
- {'label': 'Service Call with Scripts',
557
- 'function_call': func,
558
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
559
- 'type': 'callmanipulate',
560
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
561
- {'label': 'Service Call',
562
- 'function_call': func,
563
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
564
- 'type': 'call',
565
- 'params': [self.adaptor.description.elements.call, node]},
566
- {'label': 'Script',
567
- 'function_call': func,
568
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
569
- 'type': 'manipulate',
570
- 'params': [self.adaptor.description.elements.manipulate, node]},
571
- {'label': 'Parallel',
572
- 'function_call': func,
573
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
574
- 'type': 'parallel',
575
- 'params': [self.adaptor.description.elements.parallel, node]},
576
- {'label': 'Decision',
577
- 'function_call': func,
578
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
579
- 'type': 'choose',
580
- 'params': [self.adaptor.description.elements.choose, node]},
581
- {'label': 'Loop',
582
- 'function_call': func,
583
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
584
- 'type': 'loop',
585
- 'params': [self.adaptor.description.elements.loop, node]},
586
- {'label': 'Terminate',
587
- 'function_call': func,
588
- 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
589
- 'type': 'terminate',
590
- 'params': [self.adaptor.description.elements.terminate, node]},
591
- {'label': 'Stop',
592
- 'function_call': func,
593
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
594
- 'type': 'stop',
595
- 'params': [self.adaptor.description.elements.stop, node]}
596
- ];
597
- if(node.parent('parallel_branch').length > 0) {
598
- childs.push({
599
- 'label': 'Critical',
600
- 'function_call': func,
601
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
602
- 'type': 'critical',
603
- 'params': [self.adaptor.description.elements.critical, node]
604
- });
605
- }
606
- return childs;
607
- }, //}}}
608
- 'adaptor': {//{{{
609
- 'mousedown': function (node,e) {
610
- self.events.mousedown(node,e,true,false);
611
- },
612
- 'click': self.events.click,
613
- 'dblclick': self.events.dblclick,
614
- 'mouseover': self.events.mouseover,
615
- 'mouseout': self.events.mouseout,
616
- }//}}}
617
- }; /*}}}*/
618
- this.elements.alternative = { /*{{{*/
619
- 'type': 'complex',
620
- 'illustrator': {//{{{
621
- 'label': function(node){
622
- var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
623
- return ret;
624
- },
625
- 'endnodes': 'passthrough',
626
- 'noarrow': true,
627
- 'closeblock':false,
628
- 'expansion': function(node) {
629
- return 'vertical';
630
- },
631
- 'col_shift': function(node) {
632
- return false;
633
- },
634
- 'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
635
- },//}}}
636
- 'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
637
- 'permissible_children': function(node,mode) { //{{{
638
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
639
- else { func = self.adaptor.description.insert_after }
640
- if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
641
- return [{'label': 'Parallel Branch',
642
- 'function_call': func,
643
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
644
- 'type': 'parallel_branch',
645
- 'params': [self.adaptor.description.elements.parallel_branch, node]}];
646
- }
647
- var childs = [
648
- {'label': 'Service Call with Scripts',
649
- 'function_call': func,
650
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
651
- 'type': 'callmanipulate',
652
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
653
- {'label': 'Service Call',
654
- 'function_call': func,
655
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
656
- 'type': 'call',
657
- 'params': [self.adaptor.description.elements.call, node]},
658
- {'label': 'Script',
659
- 'function_call': func,
660
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
661
- 'type': 'manipulate',
662
- 'params': [self.adaptor.description.elements.manipulate, node]},
663
- {'label': 'Parallel',
664
- 'function_call': func,
665
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
666
- 'type': 'parallel',
667
- 'params': [self.adaptor.description.elements.parallel, node]},
668
- {'label': 'Decision',
669
- 'function_call': func,
670
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
671
- 'type': 'choose',
672
- 'params': [self.adaptor.description.elements.choose, node]},
673
- {'label': 'Loop',
674
- 'function_call': func,
675
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
676
- 'type': 'loop',
677
- 'params': [self.adaptor.description.elements.loop, node]},
678
- {'label': 'Terminate',
679
- 'function_call': func,
680
- 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
681
- 'type': 'terminate',
682
- 'params': [self.adaptor.description.elements.terminate, node]},
683
- {'label': 'Stop',
684
- 'function_call': func,
685
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
686
- 'type': 'stop',
687
- 'params': [self.adaptor.description.elements.stop, node]}
688
- ];
689
- if(node.parent('parallel_branch').length > 0) {
690
- childs.push({
691
- 'label': 'Critical',
692
- 'function_call': func,
693
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
694
- 'type': 'critical',
695
- 'params': [self.adaptor.description.elements.critical, node]
696
- });
697
- }
698
- return childs;
699
- }, //}}}
700
- 'adaptor': {//{{{
701
- 'mousedown': function (node,e) {
702
- self.events.mousedown(node,e,true,true);
703
- },
704
- 'click': self.events.click,
705
- 'dblclick': self.events.dblclick,
706
- 'mouseover': self.events.mouseover,
707
- 'mouseout': self.events.mouseout,
708
- }//}}}
709
- }; /*}}}*/
710
- this.elements.loop = { /*{{{*/
711
- 'type': 'complex',
712
- 'illustrator': {//{{{
713
- 'resolve_symbol': function(node) {
714
- if($(node).attr('mode') == 'pre_test') {
715
- return 'loop_head';
716
- } else {
717
- return 'loop_tail';
718
- }
719
- },
720
- 'expansion': function(node) {
721
- return 'vertical';
722
- },
723
- 'col_shift': function(node) {
724
- return true;
725
- },
726
- 'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
727
- },// }}}
728
- 'description': self.adaptor.theme_dir + 'rngs/loop.rng',
729
- 'permissible_children': function(node,mode) { //{{{
730
- var func = null;
731
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
732
- else { func = self.adaptor.description.insert_after }
733
- var childs = [
734
- {'label': 'Service Call with Scripts',
735
- 'function_call': func,
736
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
737
- 'type': 'callmanipulate',
738
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
739
- {'label': 'Service Call',
740
- 'function_call': func,
741
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
742
- 'type': 'call',
743
- 'params': [self.adaptor.description.elements.call, node]},
744
- {'label': 'Script',
745
- 'function_call': func,
746
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
747
- 'type': 'manipulate',
748
- 'params': [self.adaptor.description.elements.manipulate, node]},
749
- {'label': 'Decision',
750
- 'function_call': func,
751
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
752
- 'type': 'choose',
753
- 'params': [self.adaptor.description.elements.choose, node]},
754
- {'label': 'Loop',
755
- 'function_call': func,
756
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
757
- 'type': 'loop',
758
- 'params': [self.adaptor.description.elements.loop, node]},
759
- {'label': 'Terminate',
760
- 'function_call': func,
761
- 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
762
- 'type': 'terminate',
763
- 'params': [self.adaptor.description.elements.terminate, node]},
764
- {'label': 'Stop',
765
- 'function_call': func,
766
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
767
- 'type': 'stop',
768
- 'params': [self.adaptor.description.elements.stop, node]}
769
- ];
770
- if(node.parent('parallel_branch').length > 0) {
771
- childs.push({
772
- 'label': 'Critical',
773
- 'function_call': func,
774
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
775
- 'type': 'critical',
776
- 'params': [self.adaptor.description.elements.critical, node]
777
- });
778
- }
779
- if(node.parent('parallel').length > node.parent('parallel_branch').length) {
780
- childs.push({'label': 'Parallel Branch',
781
- 'function_call': func,
782
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
783
- 'type': 'parallel_branch',
784
- 'params': [self.adaptor.description.elements.parallel_branch, node]}
785
- );
786
- } else {
787
- childs.push({'label': 'Parallel',
788
- 'function_call': func,
789
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
790
- 'type': 'parallel',
791
- 'params': [self.adaptor.description.elements.parallel, node]}
792
- );
793
- }
794
- return childs;
795
- }, //}}}
796
- 'adaptor': {//{{{
797
- 'mousedown': function (node,e) {
798
- self.events.mousedown(node,e,true,true);
799
- },
800
- 'click': self.events.click,
801
- 'dblclick': self.events.dblclick,
802
- 'mouseover': self.events.mouseover,
803
- 'mouseout': self.events.mouseout,
804
- }//}}}
805
- }; /*}}}*/
806
- this.elements.parallel = { /*{{{*/
807
- 'type': 'complex',
808
- 'illustrator': {//{{{
809
- 'endnodes': 'aggregate',
810
- 'closeblock': false,
811
- 'closing_symbol': 'parallel_finish',
812
- 'expansion': function(node) {
813
- // check if any sibling other than 'parallel_branch' is present
814
- if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
815
- return 'horizontal';
816
- },
817
- 'col_shift': function(node) {
818
- return true;
819
- },
820
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
821
- },//}}}
822
- 'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
823
- 'permissible_children': function(node,mode) { //{{{
824
- var func = null;
825
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
826
- else { func = self.adaptor.description.insert_after }
827
- var childs = [
828
- {'label': 'Parallel Branch',
829
- 'function_call': func,
830
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
831
- 'type': 'parallel_branch',
832
- 'params': [self.adaptor.description.elements.parallel_branch, node]},
833
- ];
834
- return childs;
835
- }, //}}}
836
- 'permissible_children_expert': function(node,mode) { //{{{
837
- var func = null;
838
- if (mode.match(/into/)) { func = self.adaptor.description.insert_first_into }
839
- else { func = self.adaptor.description.insert_after }
840
- var childs = [
841
- {'label': 'Service Call with Scripts',
842
- 'function_call': func,
843
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
844
- 'type': 'callmanipulate',
845
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
846
- {'label': 'Service Call',
847
- 'function_call': func,
848
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
849
- 'type': 'call',
850
- 'params': [self.adaptor.description.elements.call, node]},
851
- {'label': 'Script',
852
- 'function_call': func,
853
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
854
- 'type': 'manipulate',
855
- 'params': [self.adaptor.description.elements.manipulate, node]},
856
- {'label': 'Decision',
857
- 'function_call': func,
858
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
859
- 'type': 'choose',
860
- 'params': [self.adaptor.description.elements.choose, node]},
861
- {'label': 'Loop',
862
- 'function_call': func,
863
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
864
- 'type': 'loop',
865
- 'params': [self.adaptor.description.elements.loop, node]},
866
- {'label': 'Stop',
867
- 'function_call': func,
868
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
869
- 'type': 'stop',
870
- 'params': [self.adaptor.description.elements.stop, node]}
871
- ];
872
- if(node.get(0).tagName != 'parallel')
873
- childs.push({'label': 'Parallel',
874
- 'function_call': self.adaptor.description.insert_last_into,
875
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
876
- 'type': 'parallel',
877
- 'params': [self.adaptor.description.elements.parallel, node]});
878
- return childs;
879
- }, //}}}
880
- 'adaptor': {//{{{
881
- 'mousedown': function (node,e) {
882
- self.events.mousedown(node,e,true,true);
883
- },
884
- 'click': self.events.click,
885
- 'dblclick': self.events.dblclick,
886
- 'mouseover': self.events.mouseover,
887
- 'mouseout': self.events.mouseout,
888
- }//}}}
889
- }; /*}}}*/
890
- this.elements.parallel_branch = { /*{{{*/
891
- 'type': 'complex',
892
- 'illustrator': {//{{{
893
- 'endnodes': 'passthrough',
894
- 'closeblock': false,
895
- 'noarrow': true,
896
- 'expansion': function(node) {
897
- return 'vertical';
898
- },
899
- 'resolve_symbol': function(node,shift) {
900
- if(shift == true) {
901
- return 'parallel_branch_compact';
902
- } else {
903
- return 'parallel_branch_normal';
904
- }
905
- },
906
- 'col_shift': function(node) {
907
- if(node.parentNode.tagName == 'choose') return false;
908
- if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
909
- return false;
910
- },
911
- 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
912
- },//}}}
913
- 'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
914
- 'permissible_children': function(node,mode) { //{{{
915
- var func = null;
916
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
917
- else { func = self.adaptor.description.insert_after }
918
- var childs = [
919
- {'label': 'Service Call with Scripts',
920
- 'function_call': func,
921
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
922
- 'type': 'callmanipulate',
923
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
924
- {'label': 'Service Call',
925
- 'function_call': func,
926
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
927
- 'type': 'call',
928
- 'params': [self.adaptor.description.elements.call, node]},
929
- {'label': 'Script',
930
- 'function_call': func,
931
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
932
- 'type': 'manipulate',
933
- 'params': [self.adaptor.description.elements.manipulate, node]},
934
- {'label': 'Parallel',
935
- 'function_call': func,
936
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
937
- 'type': 'parallel',
938
- 'params': [self.adaptor.description.elements.parallel, node]},
939
- {'label': 'Decision',
940
- 'function_call': func,
941
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
942
- 'type': 'choose',
943
- 'params': [self.adaptor.description.elements.choose, node]},
944
- {'label': 'Loop',
945
- 'function_call': func,
946
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
947
- 'type': 'loop',
948
- 'params': [self.adaptor.description.elements.loop, node]},
949
- {'label': 'Terminate',
950
- 'function_call': func,
951
- 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
952
- 'type': 'terminate',
953
- 'params': [self.adaptor.description.elements.terminate, node]},
954
- {'label': 'Stop',
955
- 'function_call': func,
956
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
957
- 'type': 'stop',
958
- 'params': [self.adaptor.description.elements.stop, node]},
959
- {'label': 'Critical',
960
- 'function_call': func,
961
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
962
- 'type': 'critical',
963
- 'params': [self.adaptor.description.elements.critical, node]}
964
- ];
965
- if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
966
- return [{'label': 'Alternative',
967
- 'function_call': func,
968
- 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
969
- 'type': 'alternative',
970
- 'params': [self.adaptor.description.elements.alternative, node]}];
971
- }
972
- return childs;
973
- }, //}}}
974
- 'adaptor': {//{{{
975
- 'mousedown': function (node,e) {
976
- self.events.mousedown(node,e,true,true);
977
- },
978
- 'click': self.events.click,
979
- 'dblclick': self.events.dblclick,
980
- 'mouseover': self.events.mouseover,
981
- 'mouseout': self.events.mouseout,
982
- }//}}}
983
- }; /*}}}*/
984
- this.elements.critical = { /*{{{*/
985
- 'type': 'complex',
986
- 'illustrator': {//{{{
987
- 'endnodes': 'aggregate',
988
- 'closeblock': false,
989
- 'border': true,
990
- 'expansion': function(node) {
991
- return 'vertical';
992
- },
993
- 'col_shift': function(node) {
994
- return true;
995
- },
996
- 'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
997
- },//}}}
998
- 'description': self.adaptor.theme_dir + 'rngs/critical.rng',
999
- 'permissible_children': function(node,mode) { //{{{
1000
- var func = null;
1001
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1002
- else { func = self.adaptor.description.insert_after }
1003
- var childs = [
1004
- {'label': 'Service Call with Scripts',
1005
- 'function_call': func,
1006
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1007
- 'type': 'callmanipulate',
1008
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
1009
- {'label': 'Service Call',
1010
- 'function_call': func,
1011
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
1012
- 'type': 'call',
1013
- 'params': [self.adaptor.description.elements.call, node]},
1014
- {'label': 'Script',
1015
- 'function_call': func,
1016
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1017
- 'type': 'manipulate',
1018
- 'params': [self.adaptor.description.elements.manipulate, node]},
1019
- {'label': 'Parallel',
1020
- 'function_call': func,
1021
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1022
- 'type': 'parallel',
1023
- 'params': [self.adaptor.description.elements.parallel, node]},
1024
- {'label': 'Decision',
1025
- 'function_call': func,
1026
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1027
- 'type': 'choose',
1028
- 'params': [self.adaptor.description.elements.choose, node]},
1029
- {'label': 'Loop',
1030
- 'function_call': func,
1031
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1032
- 'type': 'loop',
1033
- 'params': [self.adaptor.description.elements.loop, node]},
1034
- {'label': 'Terminate',
1035
- 'function_call': func,
1036
- 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1037
- 'type': 'terminate',
1038
- 'params': [self.adaptor.description.elements.terminate, node]},
1039
- {'label': 'Stop',
1040
- 'function_call': func,
1041
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1042
- 'type': 'stop',
1043
- 'params': [self.adaptor.description.elements.stop, node]}
1044
- ];
1045
- if(node.parent('parallel_branch').length > 0) {
1046
- childs.push({
1047
- 'label': 'Critical',
1048
- 'function_call': func,
1049
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1050
- 'type': 'critical',
1051
- 'params': [self.adaptor.description.elements.critical, node]
1052
- });
1053
- }
1054
- return childs;
1055
- }, //}}}
1056
- 'adaptor': {//{{{
1057
- 'mousedown': function (node,e) {
1058
- self.events.mousedown(node,e,true,true);
1059
- },
1060
- 'click': self.events.click,
1061
- 'dblclick': self.events.dblclick,
1062
- 'mouseover': self.events.mouseover,
1063
- 'mouseout': self.events.mouseout,
1064
- }//}}}
1065
- }; /*}}}*/
1066
- this.elements.group = { /*{{{*/
1067
- 'type': 'complex',
1068
- 'illustrator': {//{{{
1069
- 'endnodes': 'aggregate',
1070
- 'closeblock': false,
1071
- 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
1072
- 'expansion': function(node) {
1073
- return 'vertical';
1074
- },
1075
- 'col_shift': function(node) {
1076
- return true;
1077
- },
1078
- 'svg': null
1079
- },//}}}
1080
- 'description': self.adaptor.theme_dir + 'rngs/group.rng',
1081
- 'permissible_children': function(node,mode) { //{{{
1082
- var func = null;
1083
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1084
- else { func = self.adaptor.description.insert_after }
1085
- return [
1086
- ];
1087
- }, //}}}
1088
- 'adaptor': {//{{{
1089
- 'mousedown': function (node,e) {
1090
- self.events.mousedown(node,e,true,true);
1091
- },
1092
- 'click': self.events.click,
1093
- 'dblclick': self.events.dblclick,
1094
- 'mouseover': self.events.mouseover,
1095
- 'mouseout': self.events.mouseout,
1096
- }//}}}
1097
- }; /*}}}*/
1098
- this.elements.start = this.elements.description = { /*{{{*/
1099
- 'type': 'description',
1100
- 'illustrator': {//{{{
1101
- 'endnodes': 'passthrough',
1102
- 'closeblock': false,
1103
- 'balance': true,
1104
- 'expansion': function(node) {
1105
- return 'vertical';
1106
- },
1107
- 'closing_symbol': 'end',
1108
- 'col_shift': function(node) {
1109
- return true;
1110
- },
1111
- 'svg': self.adaptor.theme_dir + 'symbols/start.svg'
1112
- },//}}}
1113
- 'description': null,
1114
- 'permissible_children': function(node,mode) { //{{{
1115
- var func = null;
1116
- if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1117
- else { func = self.adaptor.description.insert_after }
1118
- var childs = [
1119
- {'label': 'Service Call with Scripts',
1120
- 'function_call': func,
1121
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1122
- 'type': 'callmanipulate',
1123
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
1124
- {'label': 'Service Call',
1125
- 'function_call': func,
1126
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
1127
- 'type': 'call',
1128
- 'params': [self.adaptor.description.elements.call, node]},
1129
- {'label': 'Script',
1130
- 'function_call': func,
1131
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1132
- 'type': 'manipulate',
1133
- 'params': [self.adaptor.description.elements.manipulate, node]},
1134
- {'label': 'Parallel',
1135
- 'function_call': func,
1136
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1137
- 'type': 'parallel',
1138
- 'params': [self.adaptor.description.elements.parallel, node]},
1139
- {'label': 'Decision',
1140
- 'function_call': func,
1141
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1142
- 'type': 'choose',
1143
- 'params': [self.adaptor.description.elements.choose, node]},
1144
- {'label': 'Loop',
1145
- 'function_call': func,
1146
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1147
- 'type': 'loop',
1148
- 'params': [self.adaptor.description.elements.loop, node]},
1149
- {'label': 'Stop',
1150
- 'function_call': func,
1151
- 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1152
- 'type': 'stop',
1153
- 'params': [self.adaptor.description.elements.stop, node]}
1154
- ];
1155
- if(node.parent('parallel_branch').length > 0) {
1156
- childs.push({
1157
- 'label': 'Critical',
1158
- 'function_call': func,
1159
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1160
- 'type': 'critical',
1161
- 'params': [self.adaptor.description.elements.critical, node]
1162
- });
1163
- }
1164
- return childs;
1165
- }, //}}}
1166
- 'adaptor': {//{{{
1167
- 'mousedown': function (node,e) {
1168
- self.events.mousedown(node,e,true,false);
1169
- },
1170
- 'click': self.events.click,
1171
- 'dblclick': self.events.dblclick,
1172
- 'mouseover': self.events.mouseover,
1173
- 'mouseout': self.events.mouseout,
1174
- }//}}}
1175
- }; /*}}}*/
1176
-
1177
- // Abstract Elements
1178
- // * they may only have an illustrator (or other parts)
1179
- // * they HAVE TO have a parent
1180
- this.elements.callmanipulate = { /*{{{*/
1181
- 'parent': 'call',
1182
- 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1183
- 'illustrator': {//{{{
1184
- 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
1185
- 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
1186
- },//}}}
1187
- }; /*}}}*/
1188
- this.elements.loop_head = { /*{{{*/
1189
- 'parent': 'loop',
1190
- 'illustrator': {//{{{
1191
- 'endnodes': 'this',
1192
- 'closeblock': true,
1193
- 'label': function(node){
1194
- var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
1195
- return ret;
1196
- },
1197
- }//}}}
1198
- }; /*}}}*/
1199
- this.elements.loop_tail = { /*{{{*/
1200
- 'parent': 'loop',
1201
- 'illustrator': {//{{{
1202
- 'endnodes': 'aggregate',
1203
- 'closeblock': false,
1204
- 'closing_symbol': 'loop_finish'
1205
- },//}}}
1206
- }; /*}}}*/
1207
- this.elements.choose_inclusive = { /*{{{*/
1208
- 'parent': 'choose',
1209
- 'illustrator': {//{{{
1210
- 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1211
- }//}}}
1212
- }; /*}}}*/
1213
- this.elements.choose_exclusive = { /*{{{*/
1214
- 'parent': 'choose',
1215
- 'illustrator': {//{{{
1216
- 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1217
- },//}}}
1218
- }; /*}}}*/
1219
- this.elements.choose_inclusive_finish = { /*{{{*/
1220
- 'parent': 'choose_finish',
1221
- 'illustrator': {//{{{
1222
- 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1223
- }//}}}
1224
- }; /*}}}*/
1225
- this.elements.choose_exclusive_finish = { /*{{{*/
1226
- 'parent': 'choose_finish',
1227
- 'illustrator': {//{{{
1228
- 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1229
- },//}}}
1230
- }; /*}}}*/
1231
- this.elements.loop_head_finish = { /*{{{*/
1232
- 'parent': 'loop_finish',
1233
- 'illustrator': {//{{{
1234
- 'endnodes': 'this',
1235
- 'closeblock': true,
1236
- 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1237
- }//}}}
1238
- }; /*}}}*/
1239
- this.elements.loop_tail_finish = { /*{{{*/
1240
- 'parent': 'loop_finish',
1241
- 'illustrator': {//{{{
1242
- 'endnodes': 'this',
1243
- 'closeblock': false,
1244
- 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1245
- },//}}}
1246
- }; /*}}}*/
1247
- this.elements.parallel_simple = { /*{{{*/
1248
- 'parent': 'parallel_finish',
1249
- 'illustrator': {//{{{
1250
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1251
- }//}}}
1252
- }; /*}}}*/
1253
- this.elements.parallel_complex = { /*{{{*/
1254
- 'parent': 'parallel_finish',
1255
- 'illustrator': {//{{{
1256
- 'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1257
- },//}}}
1258
- }; /*}}}*/
1259
- this.elements.parallel_branch_normal = { /*{{{*/
1260
- 'parent': 'parallel_branch',
1261
- 'illustrator': {//{{{
1262
- 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
1263
- }//}}}
1264
- }; /*}}}*/
1265
- this.elements.parallel_branch_event = { /*{{{*/
1266
- 'parent': 'parallel_branch',
1267
- 'illustrator': {//{{{
1268
- 'endnodes': 'this',
1269
- 'noarrow': false,
1270
- 'border': true,
1271
- 'wide': true,
1272
- 'closing_symbol': 'event_end',
1273
- 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
1274
- }//}}}
1275
- }; /*}}}*/
1276
- this.elements.parallel_branch_compact = { /*{{{*/
1277
- 'parent': 'parallel_branch',
1278
- 'illustrator': {//{{{
1279
- 'endnodes': 'this',
1280
- 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
1281
- }//}}}
1282
- }; /*}}}*/
1283
- this.elements.scripts = { /*{{{*/
1284
- 'description': [self.adaptor.theme_dir + 'rngs/scripts.rng']
1285
- }; /*}}}*/
1286
- }