cpee 2.0.19 → 2.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/wfadaptor.css +17 -0
  3. data/cockpit/js/instance.js +0 -1
  4. data/cockpit/js_libs.zip +0 -0
  5. data/cockpit/themes/model/rngs/call.rng +2 -1
  6. data/cockpit/themes/model/rngs/callmanipulate.rng +2 -1
  7. data/cockpit/themes/model/theme.js +1 -1
  8. data/cpee.gemspec +2 -2
  9. data/lib/cpee/controller.rb +6 -3
  10. data/lib/cpee/implementation.rb +23 -8
  11. data/lib/cpee/implementation_notifications.rb +1 -1
  12. data/lib/cpee/persistence.rb +2 -1
  13. data/lib/cpee/redis.rb +57 -0
  14. data/server/routing/end.rb +16 -4
  15. data/server/routing/forward-events.rb +19 -7
  16. data/server/routing/forward-votes.rb +19 -7
  17. data/server/routing/persist.rb +26 -14
  18. data/tools/cpee +5 -5
  19. data/tools/test/README +4 -0
  20. data/tools/test/config.json +3 -0
  21. data/tools/test/contrib/graph_example.svg +1166 -0
  22. data/tools/test/contrib/legend.svg +817 -0
  23. data/tools/test/contrib/symbols.svg +224 -0
  24. data/tools/test/contrib/transformation1.xsl +264 -0
  25. data/tools/test/contrib/transformation2.xsl +10 -0
  26. data/tools/test/contrib/tree_example.svg +788 -0
  27. data/tools/test/css/model.css +24 -0
  28. data/tools/test/css/track.css +60 -0
  29. data/tools/test/css/ui.css +214 -0
  30. data/tools/test/css/wfadaptor.css +422 -0
  31. data/tools/test/edit.html +258 -0
  32. data/tools/test/graph.html +69 -0
  33. data/tools/test/index.html +258 -0
  34. data/tools/test/js/details.js +109 -0
  35. data/tools/test/js/instance.js +1344 -0
  36. data/tools/test/js/model.js +41 -0
  37. data/tools/test/js/parameters.js +82 -0
  38. data/tools/test/js/track.js +18 -0
  39. data/tools/test/js/ui.js +104 -0
  40. data/tools/test/js/wfadaptor.js +763 -0
  41. data/tools/test/js_libs.zip +0 -0
  42. data/tools/test/js_libs/Makefile +2 -0
  43. data/tools/test/js_libs/ansi_up.js +333 -0
  44. data/tools/test/js_libs/console.js +80 -0
  45. data/tools/test/js_libs/custommenu.css +84 -0
  46. data/tools/test/js_libs/custommenu.js +104 -0
  47. data/tools/test/js_libs/experiments1/relaxngui.css +185 -0
  48. data/tools/test/js_libs/experiments1/relaxngui.js +488 -0
  49. data/tools/test/js_libs/experiments1/rngtest9.html +60 -0
  50. data/tools/test/js_libs/experiments1/rngtest9.rng +35 -0
  51. data/tools/test/js_libs/experiments1/rngtest9.xml +8 -0
  52. data/tools/test/js_libs/jquery-2.2.4.min.js +4 -0
  53. data/tools/test/js_libs/jquery-3.2.1.min.js +4 -0
  54. data/tools/test/js_libs/jquery-3.3.1.min.js +2 -0
  55. data/tools/test/js_libs/jquery.browser.js +40 -0
  56. data/tools/test/js_libs/jquery.caret.min.js +10 -0
  57. data/tools/test/js_libs/jquery.cookie.js +117 -0
  58. data/tools/test/js_libs/jquery.min.js +1 -0
  59. data/tools/test/js_libs/jquery.svg.min.js +6 -0
  60. data/tools/test/js_libs/jquery.svgdom.min.js +6 -0
  61. data/tools/test/js_libs/markdown.min.js +1 -0
  62. data/tools/test/js_libs/parsequery.js +21 -0
  63. data/tools/test/js_libs/printf.js +368 -0
  64. data/tools/test/js_libs/relaxngui.css +213 -0
  65. data/tools/test/js_libs/relaxngui.js +543 -0
  66. data/tools/test/js_libs/strftime.min.js +1 -0
  67. data/tools/test/js_libs/tests/dataelements.html +59 -0
  68. data/tools/test/js_libs/tests/dataelements.rng +8 -0
  69. data/tools/test/js_libs/tests/dataelements.xml +3 -0
  70. data/tools/test/js_libs/tests/relaxngui.css +203 -0
  71. data/tools/test/js_libs/tests/relaxngui.js +502 -0
  72. data/tools/test/js_libs/tests/rngtest1.html +66 -0
  73. data/tools/test/js_libs/tests/rngtest1.rng +147 -0
  74. data/tools/test/js_libs/tests/rngtest1.xml +13 -0
  75. data/tools/test/js_libs/tests/rngtest2.html +60 -0
  76. data/tools/test/js_libs/tests/rngtest2.rng +6 -0
  77. data/tools/test/js_libs/tests/rngtest2.xml +3 -0
  78. data/tools/test/js_libs/tests/rngtest3.html +60 -0
  79. data/tools/test/js_libs/tests/rngtest3.rng +23 -0
  80. data/tools/test/js_libs/tests/rngtest3.xml +9 -0
  81. data/tools/test/js_libs/tests/rngtest4.html +60 -0
  82. data/tools/test/js_libs/tests/rngtest4.rng +19 -0
  83. data/tools/test/js_libs/tests/rngtest4.xml +12 -0
  84. data/tools/test/js_libs/tests/rngtest5.html +60 -0
  85. data/tools/test/js_libs/tests/rngtest5.rng +75 -0
  86. data/tools/test/js_libs/tests/rngtest5.xml +40 -0
  87. data/tools/test/js_libs/tests/rngtest6.html +60 -0
  88. data/tools/test/js_libs/tests/rngtest6.rng +24 -0
  89. data/tools/test/js_libs/tests/rngtest6.xml +6 -0
  90. data/tools/test/js_libs/tests/rngtest8.html +60 -0
  91. data/tools/test/js_libs/tests/rngtest8.rng +13 -0
  92. data/tools/test/js_libs/tests/rngtest8.xml +2 -0
  93. data/tools/test/js_libs/tests/rngtest9.html +60 -0
  94. data/tools/test/js_libs/tests/rngtest9.rng +31 -0
  95. data/tools/test/js_libs/tests/rngtest9.xml +8 -0
  96. data/tools/test/js_libs/ui.css +333 -0
  97. data/tools/test/js_libs/ui.html +168 -0
  98. data/tools/test/js_libs/ui.js +177 -0
  99. data/tools/test/js_libs/underscore.min.js +27 -0
  100. data/tools/test/js_libs/util.js +81 -0
  101. data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +358 -0
  102. data/tools/test/js_libs/vkbeautify.js +1 -0
  103. data/tools/test/js_libs/webcomponents.min.js +196 -0
  104. data/tools/test/model.html +192 -0
  105. data/tools/test/rngs/attributes.rng +8 -0
  106. data/tools/test/rngs/dataelements.rng +8 -0
  107. data/tools/test/rngs/endpoints.rng +8 -0
  108. data/tools/test/templates.legacy/Async.xml +46 -0
  109. data/tools/test/templates.legacy/BCO.xml +70 -0
  110. data/tools/test/templates.legacy/BCS.xml +70 -0
  111. data/tools/test/templates.legacy/Centurio.xml +75 -0
  112. data/tools/test/templates.legacy/Concurrent.xml +40 -0
  113. data/tools/test/templates.legacy/Coopis Testset.xml +76 -0
  114. data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +30 -0
  115. data/tools/test/templates.legacy/ICSOC Testset.xml +95 -0
  116. data/tools/test/templates.legacy/Infinity.xml +28 -0
  117. data/tools/test/templates.legacy/Lego Boxer.xml +31 -0
  118. data/tools/test/templates.legacy/Lego Conveyor.xml +31 -0
  119. data/tools/test/templates.legacy/Lego Crane.xml +87 -0
  120. data/tools/test/templates.legacy/Lego Ejector.xml +55 -0
  121. data/tools/test/templates.legacy/Lego Full.xml +142 -0
  122. data/tools/test/templates.legacy/Lego Liddy.xml +40 -0
  123. data/tools/test/templates.legacy/Lego Plate.xml +31 -0
  124. data/tools/test/templates.legacy/Lego Transporter.xml +43 -0
  125. data/tools/test/templates.legacy/Lego_Part_1.xml +85 -0
  126. data/tools/test/templates.legacy/LgLinear.xml +65 -0
  127. data/tools/test/templates.legacy/Linear.xml +77 -0
  128. data/tools/test/templates.legacy/Log.xml +117 -0
  129. data/tools/test/templates.legacy/Mangler 1.xml +87 -0
  130. data/tools/test/templates.legacy/Mangler 2.xml +103 -0
  131. data/tools/test/templates.legacy/Manuel Labels.xml +55 -0
  132. data/tools/test/templates.legacy/Promise.xml +275 -0
  133. data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +83 -0
  134. data/tools/test/templates.legacy/Subprocess.xml +56 -0
  135. data/tools/test/templates.legacy/Syncing P34 1.xml +77 -0
  136. data/tools/test/templates.legacy/Syncing P34 2.xml +77 -0
  137. data/tools/test/templates.legacy/Syncing P34 3.xml +77 -0
  138. data/tools/test/templates.legacy/Syncing P34.xml +77 -0
  139. data/tools/test/templates.legacy/TEST - Bad Loop.xml +173 -0
  140. data/tools/test/templates.legacy/TEST - Wrong Positions.xml +174 -0
  141. data/tools/test/templates.legacy/Take_5.xml +48 -0
  142. data/tools/test/templates.legacy/Update.xml +32 -0
  143. data/tools/test/templates.legacy/Worklist Parallel.xml +104 -0
  144. data/tools/test/templates.legacy/Worklist Test CPEE.xml +40 -0
  145. data/tools/test/templates.legacy/Worklist Test.xml +42 -0
  146. data/tools/test/templates.legacy/Worklist Test2.xml +43 -0
  147. data/tools/test/templates.legacy/convert_cpee2.rb +15 -0
  148. data/tools/test/templates.legacy/convert_preset.rb +32 -0
  149. data/tools/test/templates.legacy/testsets.xml +37 -0
  150. data/tools/test/templates.legacy/transformations.xml +4 -0
  151. data/tools/test/templates/Coopis 2010.xml +76 -0
  152. data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +77 -0
  153. data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +77 -0
  154. data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +77 -0
  155. data/tools/test/templates/Track Test Local.xml +82 -0
  156. data/tools/test/templates/Track Test.xml +82 -0
  157. data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +182 -0
  158. data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +203 -0
  159. data/tools/test/templates/UR-VUE 2020 Solution NN.xml +197 -0
  160. data/tools/test/templates/UR-VUE 2020 Solution View.xml +151 -0
  161. data/tools/test/templates/UR-VUE 2020.xml +26 -0
  162. data/tools/test/templates/Worklist.xml +42 -0
  163. data/tools/test/templates/instantiate.local/Take_Sub.xml +59 -0
  164. data/tools/test/templates/instantiate/Take_Perf.xml +46 -0
  165. data/tools/test/templates/instantiate/Take_Sub.xml +58 -0
  166. data/tools/test/templates/instantiate/Take_X.xml +48 -0
  167. data/tools/test/themes/compact/theme.js +1285 -0
  168. data/tools/test/themes/diana/theme.js +1650 -0
  169. data/tools/test/themes/extended/theme.js +1325 -0
  170. data/tools/test/themes/model/rngs/alternative.rng +1 -0
  171. data/tools/test/themes/model/rngs/call.rng +67 -0
  172. data/tools/test/themes/model/rngs/callmanipulate.rng +72 -0
  173. data/tools/test/themes/model/rngs/choose.rng +1 -0
  174. data/tools/test/themes/model/rngs/critical.rng +1 -0
  175. data/tools/test/themes/model/rngs/escape.rng +1 -0
  176. data/tools/test/themes/model/rngs/group.rng +1 -0
  177. data/tools/test/themes/model/rngs/loop.rng +1 -0
  178. data/tools/test/themes/model/rngs/manipulate.rng +1 -0
  179. data/tools/test/themes/model/rngs/otherwise.rng +1 -0
  180. data/tools/test/themes/model/rngs/parallel.rng +1 -0
  181. data/tools/test/themes/model/rngs/parallel_branch.rng +1 -0
  182. data/tools/test/themes/model/rngs/scripts.rng +7 -0
  183. data/tools/test/themes/model/rngs/stop.rng +1 -0
  184. data/tools/test/themes/model/rngs/terminate.rng +1 -0
  185. data/tools/test/themes/model/theme.js +1268 -0
  186. data/tools/test/themes/packed/theme.js +1286 -0
  187. data/tools/test/themes/preset/rngs/alternative.rng +25 -0
  188. data/tools/test/themes/preset/rngs/call.rng +122 -0
  189. data/tools/test/themes/preset/rngs/callmanipulate.rng +145 -0
  190. data/tools/test/themes/preset/rngs/choose.rng +14 -0
  191. data/tools/test/themes/preset/rngs/closed_loop.rng +62 -0
  192. data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +5 -0
  193. data/tools/test/themes/preset/rngs/closed_loop_control.rng +31 -0
  194. data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +12 -0
  195. data/tools/test/themes/preset/rngs/critical.rng +5 -0
  196. data/tools/test/themes/preset/rngs/escape.rng +1 -0
  197. data/tools/test/themes/preset/rngs/group.rng +3 -0
  198. data/tools/test/themes/preset/rngs/loop.rng +22 -0
  199. data/tools/test/themes/preset/rngs/manipulate.rng +9 -0
  200. data/tools/test/themes/preset/rngs/otherwise.rng +22 -0
  201. data/tools/test/themes/preset/rngs/parallel.rng +21 -0
  202. data/tools/test/themes/preset/rngs/parallel_branch.rng +8 -0
  203. data/tools/test/themes/preset/rngs/scripts.rng +23 -0
  204. data/tools/test/themes/preset/rngs/stop.rng +5 -0
  205. data/tools/test/themes/preset/rngs/terminate.rng +1 -0
  206. data/tools/test/themes/preset/symbols/alternative.svg +5 -0
  207. data/tools/test/themes/preset/symbols/arrow.svg +3 -0
  208. data/tools/test/themes/preset/symbols/call.svg +6 -0
  209. data/tools/test/themes/preset/symbols/callmanipulate.svg +8 -0
  210. data/tools/test/themes/preset/symbols/choose.svg +5 -0
  211. data/tools/test/themes/preset/symbols/choose_exclusive.svg +5 -0
  212. data/tools/test/themes/preset/symbols/choose_inclusive.svg +4 -0
  213. data/tools/test/themes/preset/symbols/closed_loop.svg +5 -0
  214. data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +5 -0
  215. data/tools/test/themes/preset/symbols/closed_loop_control.svg +5 -0
  216. data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +6 -0
  217. data/tools/test/themes/preset/symbols/complex.svg +8 -0
  218. data/tools/test/themes/preset/symbols/critical.svg +4 -0
  219. data/tools/test/themes/preset/symbols/end.svg +3 -0
  220. data/tools/test/themes/preset/symbols/escape.svg +5 -0
  221. data/tools/test/themes/preset/symbols/event_end.svg +3 -0
  222. data/tools/test/themes/preset/symbols/loop.svg +5 -0
  223. data/tools/test/themes/preset/symbols/manipulate.svg +4 -0
  224. data/tools/test/themes/preset/symbols/otherwise.svg +5 -0
  225. data/tools/test/themes/preset/symbols/parallel.svg +5 -0
  226. data/tools/test/themes/preset/symbols/parallel_branch.svg +5 -0
  227. data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +4 -0
  228. data/tools/test/themes/preset/symbols/parallel_branch_event.svg +14 -0
  229. data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +5 -0
  230. data/tools/test/themes/preset/symbols/scripts.svg +4 -0
  231. data/tools/test/themes/preset/symbols/start.svg +3 -0
  232. data/tools/test/themes/preset/symbols/stop.svg +5 -0
  233. data/tools/test/themes/preset/symbols/terminate.svg +4 -0
  234. data/tools/test/themes/preset/theme.js +1287 -0
  235. data/tools/test/track.html +142 -0
  236. metadata +221 -2
@@ -0,0 +1,9 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="manipulate" rngui:label="Script" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <attribute name="id" rngui:label="ID" rngui:default="javascript:get_free_id()">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ <attribute name="label" rngui:label="Label">
6
+ <data type="string" rngui:label="Short description of the task"/>
7
+ </attribute>
8
+ <text rngui:label="Script that is executed"/>
9
+ </element>
@@ -0,0 +1,22 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="otherwise" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <element name="_probability" rngui:mark="true" rngui:header="Execution Probability">
3
+ <element name="_probability_min" rngui:label="Min in %">
4
+ <data type="integer" rngui:label="Percent 0-100">
5
+ <param name="minInclusive">1</param>
6
+ <param name="maxInclusive">100</param>
7
+ </data>
8
+ </element>
9
+ <element name="_probability_max" rngui:label="Max in %">
10
+ <data type="integer" rngui:label="Percent 0-100">
11
+ <param name="minInclusive">1</param>
12
+ <param name="maxInclusive">100</param>
13
+ </data>
14
+ </element>
15
+ <element name="_probability_avg" rngui:label="Avg in %">
16
+ <data type="integer" rngui:label="Percent 0-100">
17
+ <param name="minInclusive">1</param>
18
+ <param name="maxInclusive">100</param>
19
+ </data>
20
+ </element>
21
+ </element>
22
+ </element>
@@ -0,0 +1,21 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="parallel" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <attribute name="wait" rngui:label="Wait" rngui:default="-1" rngui:hint="-1 to wait for all branches.">
3
+ <data type="integer"/>
4
+ </attribute>
5
+ <element rngui:ignore="true" name="parallel_branch">
6
+ <attribute name="pass">
7
+ <data type="string"/>
8
+ </attribute>
9
+ <attribute name="local">
10
+ <data type="string"/>
11
+ </attribute>
12
+ </element>
13
+ <element rngui:ignore="true" name="parallel_branch">
14
+ <attribute name="pass">
15
+ <data type="string"/>
16
+ </attribute>
17
+ <attribute name="local">
18
+ <data type="string"/>
19
+ </attribute>
20
+ </element>
21
+ </element>
@@ -0,0 +1,8 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="parallel_branch" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <attribute name="pass" rngui:label="Pass to branch">
3
+ <data type="string" rngui:label="Data element passed to the local scope, thus not affected by global changes ..."/>
4
+ </attribute>
5
+ <attribute name="local" rngui:label="Local scope">
6
+ <data type="string" rngui:label="Name of the passed data element in the local scope ..."/>
7
+ </attribute>
8
+ </element>
@@ -0,0 +1,23 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="code" rngui:header="Implementation" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <element name="prepare" rngui:header="Prepare" rngui:label="Code" rngui:fold="closed_conditional">
3
+ <text rngui:label="Script that is executed, before a service call"/>
4
+ </element>
5
+ <element name="finalize" rngui:header="Finalize" rngui:label="Code" rngui:fold="closed_conditional">
6
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
7
+ <data type="string" rngui:readonly="true"/>
8
+ </attribute>
9
+ <text rngui:label="Script that is executed, when a service returns data"/>
10
+ </element>
11
+ <element name="update" rngui:header="Update" rngui:label="Code" rngui:fold="closed_conditional">
12
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
13
+ <data type="string" rngui:readonly="true"/>
14
+ </attribute>
15
+ <text rngui:label="Script that is executed, when a service sends intermediate data"/>
16
+ </element>
17
+ <element name="rescue" rngui:header="Rescue" rngui:label="Code" rngui:fold="closed_conditional">
18
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
19
+ <data type="string" rngui:readonly="true"/>
20
+ </attribute>
21
+ <text rngui:label="Script that is executed, if a service call fails"/>
22
+ </element>
23
+ </element>
@@ -0,0 +1,5 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="stop" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0">
2
+ <attribute name="id" rngui:label="ID" rngui:default="javascript:get_free_id()">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ </element>
@@ -0,0 +1 @@
1
+ <element xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org" rngui:version="1.2" name="terminate" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" ns="http://cpee.org/ns/description/1.0"/>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="11" y="6" width="9" height="18" rx="0" class="hline white"/>
3
+ <path class="cline hfill stand" d="M 11,5 C 2,9 2,21 11,25 M 20,5 C 29,9 29,21 20,25" style="stroke-dasharray:1,4;"/>
4
+ <line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <path class="rfill stand" d="m 5 10 l 10 0 l 0 -5 l 10 10 l -10 10 l 0 -5 l -10 0 z"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <g class="replace">
3
+ <rect x="1" y="1" width="28" height="28" rx="4" class="hfill rfill cline stand"/>
4
+ <path class="normal" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
5
+ </g>
6
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <g class="replace">
3
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
4
+ <path class="normal" transform="translate(-2,-2)" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
5
+ </g>
6
+ <circle cx="28" cy="27" r="9" class="cline rfill stand"/>
7
+ <text transform="translate(28,31)" class="small">s</text>
8
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
+ <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
+ <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <circle cx="15.5" cy="15.5" r="7" class="stand"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <path d="m 17.620194,6.2873424 c 7.577463,7.5774646 -7.577463,10.5124376 0,18.0898996" class="stand" style="fill-opacity: 0"/>
4
+ <path d="m 14.036033,6.2873424 c 7.577463,7.5774646 -7.5774629,10.5124376 0,18.0898996" class="stand" style="fill-opacity: 0"/>
5
+ </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="cline stand"/>
3
+ <circle cx="15" cy="15" r="11" class="rfill hfill cline stand"/>
4
+ <path d="M 7.8583963,10.061007 10.29692,7.6153325 15.17399,12.506704 20.051062,7.6153325 22.489583,10.06103 17.612536,14.952378 22.489583,19.84375 20.051062,22.289424 15.17399,17.398076 10.296942,22.289424 7.8583963,19.84375 12.735466,14.952378 Z" class="stand"/>
5
+ </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="cline stand"/>
3
+ <circle cx="15" cy="15" r="11" class="rfill hfill cline stand"/>
4
+ <circle cx="15" cy="15" r="7" class="stand"/> <path d="M 17,17 19.84375,19.84375" class="black stand"/>
5
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="14" class="cline stand"/>
3
+ <circle cx="15" cy="15" r="11" class="rfill hfill cline stand"/>
4
+ <path d="M 14.904335,6.0646408 A 9.0152948,9.0152948 0 0 0 5.9550908,15.079625 H 23.985106 a 9.0152948,9.0152948 0 0 0 -9.015008,-9.0149842 9.0152948,9.0152948 0 0 0 -0.06567,0 z" class="standfat"/>
5
+ <path d="M 14.970098,15.079625 11.963937,10.870986" class="black stand"/>
6
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
+ <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
+ <line x1="8.5" y1="15.5" x2="22.5" y2="15.5" class="stand"/>
6
+ <line x1="15.5" y1="8.5" x2="15.5" y2="22.5" class="stand"/>
7
+ </svg>
8
+
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <path class="cline hfill rfill stand" d="m 3 27 l 12 -24 l 12 24 z"/>
3
+ <text transform="translate(15,23)" class="small">!</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="standfat"/>
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="stand cline"/>
3
+ <circle cx="15" cy="15" r="11" class="stand cline hfill"/>
4
+ <polygon points="10.5,20.5 15,8.5 20.5,20.5 15,15.5 10.5,20.5" class="black"/>
5
+ </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="rfill hfill cline standfat"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
+ <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
+ </svg>
@@ -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="rfill hfill cline stand"/>
3
+ <text transform="translate(15,21)" class="normal">s</text>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="11" class="hfill standtrans"/>
3
+ <line x1="9" y1="21" x2="21" y2="9" class="stand cline hline"/>
4
+ <line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <text transform="translate(15,25)" class="normallarge">+</text>
4
+ </svg>
5
+
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="11" y="6" width="9" height="18" rx="0" class="hline white"/>
3
+ <path class="cline hfill stand" d="M 11,5 C 2,9 2,21 11,25 M 20,5 C 29,9 29,21 20,25" style="stroke-dasharray:1,4;"/>
4
+ <line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
5
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <text transform="translate(15,20)" class="small">|||</text>
4
+ </svg>
@@ -0,0 +1,14 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="3" width="24" height="24" rx="4" class="hfill rfill cline stand"/>
3
+
4
+ <circle cx="24" cy="15" r="10" class="cline rfill stand" style="stroke-dasharray: 1,3"/>
5
+ <circle cx="24" cy="15" r="7" class="cline rfill stand" style="stroke-dasharray: 1,3"/>
6
+ <line x1="24" y1="11" x2="20" y2="18" class="stand"/>
7
+ <line x1="20" y1="18" x2="28" y2="18" class="stand"/>
8
+ <line x1="28" y1="18" x2="24" y2="11" class="stand"/>
9
+
10
+ <circle cx="55.5" cy="15" r="14" class="cline hfill rfill stand"/>
11
+ <line x1="55.5" y1="11" x2="51.5" y2="18" class="stand"/>
12
+ <line x1="51.5" y1="18" x2="59.5" y2="18" class="stand"/>
13
+ <line x1="59.5" y1="18" x2="55.5" y2="11" class="stand"/>
14
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="11" y="6" width="9" height="18" rx="0" class="hline white"/>
3
+ <path class="cline hfill stand" d="M 11,5 C 2,9 2,21 11,25 M 20,5 C 29,9 29,21 20,25" style="stroke-dasharray:1,4;"/>
4
+ <line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
5
+ </svg>
@@ -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,1287 @@
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 = 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 || e.metaKey)) {
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
+ 'closing_symbol': 'choose_finish',
479
+ 'expansion': function(node) {
480
+ return 'horizontal';
481
+ },
482
+ 'resolve_symbol': function(node) {
483
+ if($(node).attr('mode') == 'exclusive') {
484
+ return 'choose_exclusive';
485
+ } else {
486
+ return 'choose_inclusive';
487
+ }
488
+ },
489
+ 'col_shift': function(node) {
490
+ return false;
491
+ },
492
+ 'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
493
+ },//}}}
494
+ 'description': self.adaptor.theme_dir + 'rngs/choose.rng',
495
+ 'permissible_children': function(node,mode) { //{{{
496
+ var func = null;
497
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
498
+ else { func = self.adaptor.description.insert_after }
499
+ if(node.children('parallel_branch').length > 0) {
500
+ return [{'label': 'Parallel Branch',
501
+ 'function_call': func,
502
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
503
+ 'type': 'parallel_branch',
504
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
505
+ }
506
+ var childs = [{'label': 'Alternative',
507
+ 'function_call': func,
508
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
509
+ 'type': 'alternative',
510
+ 'params': [self.adaptor.description.elements.alternative, node]}];
511
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length && node.parent('choose').length == 0)
512
+ childs.push({'label': 'Otherwise',
513
+ 'function_call': self.adaptor.description.insert_last_into,
514
+ 'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
515
+ 'type': 'otherwise',
516
+ 'params': [self.adaptor.description.elements.otherwise, node]});
517
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
518
+ childs.push({'label': 'Parallel Branch',
519
+ 'function_call': func,
520
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
521
+ 'type': 'parallel_branch',
522
+ 'params': [self.adaptor.description.elements.parallel_branch, node]});
523
+ return childs;
524
+ }, //}}}
525
+ 'adaptor': {//{{{
526
+ 'mousedown': function (node,e) {
527
+ self.events.mousedown(node,e,true,true);
528
+ },
529
+ 'click': self.events.click,
530
+ 'dblclick': self.events.dblclick,
531
+ 'mouseover': self.events.mouseover,
532
+ 'mouseout': self.events.mouseout
533
+ }//}}}
534
+ }; /*}}}*/
535
+ this.elements.otherwise = { /*{{{*/
536
+ 'type': 'complex',
537
+ 'illustrator': {//{{{
538
+ 'endnodes': 'passthrough',
539
+ 'closeblock': false,
540
+ 'noarrow': true,
541
+ 'expansion': function(node) {
542
+ return 'vertical';
543
+ },
544
+ 'col_shift': function(node) {
545
+ return false;
546
+ },
547
+ 'svg': self.adaptor.theme_dir + 'symbols/otherwise.svg'
548
+ },//}}}
549
+ 'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
550
+ 'neverdelete': true,
551
+ 'permissible_children': function(node,mode) { //{{{
552
+ var func = null;
553
+ var childs = null;
554
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
555
+ else { func = self.adaptor.description.insert_after }
556
+ var childs = [
557
+ {'label': 'Service Call with Scripts',
558
+ 'function_call': func,
559
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
560
+ 'type': 'callmanipulate',
561
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
562
+ {'label': 'Service Call',
563
+ 'function_call': func,
564
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
565
+ 'type': 'call',
566
+ 'params': [self.adaptor.description.elements.call, node]},
567
+ {'label': 'Script',
568
+ 'function_call': func,
569
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
570
+ 'type': 'manipulate',
571
+ 'params': [self.adaptor.description.elements.manipulate, node]},
572
+ {'label': 'Parallel',
573
+ 'function_call': func,
574
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
575
+ 'type': 'parallel',
576
+ 'params': [self.adaptor.description.elements.parallel, node]},
577
+ {'label': 'Decision',
578
+ 'function_call': func,
579
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
580
+ 'type': 'choose',
581
+ 'params': [self.adaptor.description.elements.choose, node]},
582
+ {'label': 'Loop',
583
+ 'function_call': func,
584
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
585
+ 'type': 'loop',
586
+ 'params': [self.adaptor.description.elements.loop, node]},
587
+ {'label': 'Terminate',
588
+ 'function_call': func,
589
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
590
+ 'type': 'terminate',
591
+ 'params': [self.adaptor.description.elements.terminate, node]},
592
+ {'label': 'Stop',
593
+ 'function_call': func,
594
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
595
+ 'type': 'stop',
596
+ 'params': [self.adaptor.description.elements.stop, node]}
597
+ ];
598
+ if(node.parent('parallel_branch').length > 0) {
599
+ childs.push({
600
+ 'label': 'Critical',
601
+ 'function_call': func,
602
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
603
+ 'type': 'critical',
604
+ 'params': [self.adaptor.description.elements.critical, node]
605
+ });
606
+ }
607
+ return childs;
608
+ }, //}}}
609
+ 'adaptor': {//{{{
610
+ 'mousedown': function (node,e) {
611
+ self.events.mousedown(node,e,true,false);
612
+ },
613
+ 'click': self.events.click,
614
+ 'dblclick': self.events.dblclick,
615
+ 'mouseover': self.events.mouseover,
616
+ 'mouseout': self.events.mouseout,
617
+ }//}}}
618
+ }; /*}}}*/
619
+ this.elements.alternative = { /*{{{*/
620
+ 'type': 'complex',
621
+ 'illustrator': {//{{{
622
+ 'label': function(node){
623
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
624
+ return ret;
625
+ },
626
+ 'endnodes': 'passthrough',
627
+ 'noarrow': true,
628
+ 'closeblock':false,
629
+ 'expansion': function(node) {
630
+ return 'vertical';
631
+ },
632
+ 'col_shift': function(node) {
633
+ return false;
634
+ },
635
+ 'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
636
+ },//}}}
637
+ 'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
638
+ 'permissible_children': function(node,mode) { //{{{
639
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
640
+ else { func = self.adaptor.description.insert_after }
641
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
642
+ return [{'label': 'Parallel Branch',
643
+ 'function_call': func,
644
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
645
+ 'type': 'parallel_branch',
646
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
647
+ }
648
+ var childs = [
649
+ {'label': 'Service Call with Scripts',
650
+ 'function_call': func,
651
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
652
+ 'type': 'callmanipulate',
653
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
654
+ {'label': 'Service Call',
655
+ 'function_call': func,
656
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
657
+ 'type': 'call',
658
+ 'params': [self.adaptor.description.elements.call, node]},
659
+ {'label': 'Script',
660
+ 'function_call': func,
661
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
662
+ 'type': 'manipulate',
663
+ 'params': [self.adaptor.description.elements.manipulate, node]},
664
+ {'label': 'Parallel',
665
+ 'function_call': func,
666
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
667
+ 'type': 'parallel',
668
+ 'params': [self.adaptor.description.elements.parallel, node]},
669
+ {'label': 'Decision',
670
+ 'function_call': func,
671
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
672
+ 'type': 'choose',
673
+ 'params': [self.adaptor.description.elements.choose, node]},
674
+ {'label': 'Loop',
675
+ 'function_call': func,
676
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
677
+ 'type': 'loop',
678
+ 'params': [self.adaptor.description.elements.loop, node]},
679
+ {'label': 'Terminate',
680
+ 'function_call': func,
681
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
682
+ 'type': 'terminate',
683
+ 'params': [self.adaptor.description.elements.terminate, node]},
684
+ {'label': 'Stop',
685
+ 'function_call': func,
686
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
687
+ 'type': 'stop',
688
+ 'params': [self.adaptor.description.elements.stop, node]}
689
+ ];
690
+ if(node.parent('parallel_branch').length > 0) {
691
+ childs.push({
692
+ 'label': 'Critical',
693
+ 'function_call': func,
694
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
695
+ 'type': 'critical',
696
+ 'params': [self.adaptor.description.elements.critical, node]
697
+ });
698
+ }
699
+ return childs;
700
+ }, //}}}
701
+ 'adaptor': {//{{{
702
+ 'mousedown': function (node,e) {
703
+ self.events.mousedown(node,e,true,true);
704
+ },
705
+ 'click': self.events.click,
706
+ 'dblclick': self.events.dblclick,
707
+ 'mouseover': self.events.mouseover,
708
+ 'mouseout': self.events.mouseout,
709
+ }//}}}
710
+ }; /*}}}*/
711
+ this.elements.loop = { /*{{{*/
712
+ 'type': 'complex',
713
+ 'illustrator': {//{{{
714
+ 'resolve_symbol': function(node) {
715
+ if($(node).attr('mode') == 'pre_test') {
716
+ return 'loop_head';
717
+ } else {
718
+ return 'loop_tail';
719
+ }
720
+ },
721
+ 'expansion': function(node) {
722
+ return 'vertical';
723
+ },
724
+ 'col_shift': function(node) {
725
+ return true;
726
+ },
727
+ 'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
728
+ },// }}}
729
+ 'description': self.adaptor.theme_dir + 'rngs/loop.rng',
730
+ 'permissible_children': function(node,mode) { //{{{
731
+ var func = null;
732
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
733
+ else { func = self.adaptor.description.insert_after }
734
+ var childs = [
735
+ {'label': 'Service Call with Scripts',
736
+ 'function_call': func,
737
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
738
+ 'type': 'callmanipulate',
739
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
740
+ {'label': 'Service Call',
741
+ 'function_call': func,
742
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
743
+ 'type': 'call',
744
+ 'params': [self.adaptor.description.elements.call, node]},
745
+ {'label': 'Script',
746
+ 'function_call': func,
747
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
748
+ 'type': 'manipulate',
749
+ 'params': [self.adaptor.description.elements.manipulate, node]},
750
+ {'label': 'Decision',
751
+ 'function_call': func,
752
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
753
+ 'type': 'choose',
754
+ 'params': [self.adaptor.description.elements.choose, node]},
755
+ {'label': 'Loop',
756
+ 'function_call': func,
757
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
758
+ 'type': 'loop',
759
+ 'params': [self.adaptor.description.elements.loop, node]},
760
+ {'label': 'Terminate',
761
+ 'function_call': func,
762
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
763
+ 'type': 'terminate',
764
+ 'params': [self.adaptor.description.elements.terminate, node]},
765
+ {'label': 'Stop',
766
+ 'function_call': func,
767
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
768
+ 'type': 'stop',
769
+ 'params': [self.adaptor.description.elements.stop, node]}
770
+ ];
771
+ if(node.parent('parallel_branch').length > 0) {
772
+ childs.push({
773
+ 'label': 'Critical',
774
+ 'function_call': func,
775
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
776
+ 'type': 'critical',
777
+ 'params': [self.adaptor.description.elements.critical, node]
778
+ });
779
+ }
780
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
781
+ childs.push({'label': 'Parallel Branch',
782
+ 'function_call': func,
783
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
784
+ 'type': 'parallel_branch',
785
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}
786
+ );
787
+ } else {
788
+ childs.push({'label': 'Parallel',
789
+ 'function_call': func,
790
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
791
+ 'type': 'parallel',
792
+ 'params': [self.adaptor.description.elements.parallel, node]}
793
+ );
794
+ }
795
+ return childs;
796
+ }, //}}}
797
+ 'adaptor': {//{{{
798
+ 'mousedown': function (node,e) {
799
+ self.events.mousedown(node,e,true,true);
800
+ },
801
+ 'click': self.events.click,
802
+ 'dblclick': self.events.dblclick,
803
+ 'mouseover': self.events.mouseover,
804
+ 'mouseout': self.events.mouseout,
805
+ }//}}}
806
+ }; /*}}}*/
807
+ this.elements.parallel = { /*{{{*/
808
+ 'type': 'complex',
809
+ 'illustrator': {//{{{
810
+ 'endnodes': 'aggregate',
811
+ 'closeblock': false,
812
+ 'closing_symbol': 'parallel_finish',
813
+ 'expansion': function(node) {
814
+ // check if any sibling other than 'parallel_branch' is present
815
+ if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
816
+ return 'horizontal';
817
+ },
818
+ 'col_shift': function(node) {
819
+ return true;
820
+ },
821
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
822
+ },//}}}
823
+ 'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
824
+ 'permissible_children': function(node,mode) { //{{{
825
+ var func = null;
826
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
827
+ else { func = self.adaptor.description.insert_after }
828
+ var childs = [
829
+ {'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
+ return childs;
836
+ }, //}}}
837
+ 'permissible_children_expert': function(node,mode) { //{{{
838
+ var func = null;
839
+ if (mode.match(/into/)) { func = self.adaptor.description.insert_first_into }
840
+ else { func = self.adaptor.description.insert_after }
841
+ var childs = [
842
+ {'label': 'Service Call with Scripts',
843
+ 'function_call': func,
844
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
845
+ 'type': 'callmanipulate',
846
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
847
+ {'label': 'Service Call',
848
+ 'function_call': func,
849
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
850
+ 'type': 'call',
851
+ 'params': [self.adaptor.description.elements.call, node]},
852
+ {'label': 'Script',
853
+ 'function_call': func,
854
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
855
+ 'type': 'manipulate',
856
+ 'params': [self.adaptor.description.elements.manipulate, node]},
857
+ {'label': 'Decision',
858
+ 'function_call': func,
859
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
860
+ 'type': 'choose',
861
+ 'params': [self.adaptor.description.elements.choose, node]},
862
+ {'label': 'Loop',
863
+ 'function_call': func,
864
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
865
+ 'type': 'loop',
866
+ 'params': [self.adaptor.description.elements.loop, node]},
867
+ {'label': 'Stop',
868
+ 'function_call': func,
869
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
870
+ 'type': 'stop',
871
+ 'params': [self.adaptor.description.elements.stop, node]}
872
+ ];
873
+ if(node.get(0).tagName != 'parallel')
874
+ childs.push({'label': 'Parallel',
875
+ 'function_call': self.adaptor.description.insert_last_into,
876
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
877
+ 'type': 'parallel',
878
+ 'params': [self.adaptor.description.elements.parallel, node]});
879
+ return childs;
880
+ }, //}}}
881
+ 'adaptor': {//{{{
882
+ 'mousedown': function (node,e) {
883
+ self.events.mousedown(node,e,true,true);
884
+ },
885
+ 'click': self.events.click,
886
+ 'dblclick': self.events.dblclick,
887
+ 'mouseover': self.events.mouseover,
888
+ 'mouseout': self.events.mouseout,
889
+ }//}}}
890
+ }; /*}}}*/
891
+ this.elements.parallel_branch = { /*{{{*/
892
+ 'type': 'complex',
893
+ 'illustrator': {//{{{
894
+ 'endnodes': 'passthrough',
895
+ 'closeblock': false,
896
+ 'noarrow': true,
897
+ 'expansion': function(node) {
898
+ return 'vertical';
899
+ },
900
+ 'resolve_symbol': function(node,shift) {
901
+ if(shift == true) {
902
+ return 'parallel_branch_event';
903
+ } else {
904
+ return 'parallel_branch_normal';
905
+ }
906
+ },
907
+ 'col_shift': function(node) {
908
+ if(node.parentNode.tagName == 'choose') return false;
909
+ if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
910
+ return false;
911
+ },
912
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
913
+ },//}}}
914
+ 'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
915
+ 'permissible_children': function(node,mode) { //{{{
916
+ var func = null;
917
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
918
+ else { func = self.adaptor.description.insert_after }
919
+ var childs = [
920
+ {'label': 'Service Call with Scripts',
921
+ 'function_call': func,
922
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
923
+ 'type': 'callmanipulate',
924
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
925
+ {'label': 'Service Call',
926
+ 'function_call': func,
927
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
928
+ 'type': 'call',
929
+ 'params': [self.adaptor.description.elements.call, node]},
930
+ {'label': 'Script',
931
+ 'function_call': func,
932
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
933
+ 'type': 'manipulate',
934
+ 'params': [self.adaptor.description.elements.manipulate, node]},
935
+ {'label': 'Parallel',
936
+ 'function_call': func,
937
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
938
+ 'type': 'parallel',
939
+ 'params': [self.adaptor.description.elements.parallel, node]},
940
+ {'label': 'Decision',
941
+ 'function_call': func,
942
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
943
+ 'type': 'choose',
944
+ 'params': [self.adaptor.description.elements.choose, node]},
945
+ {'label': 'Loop',
946
+ 'function_call': func,
947
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
948
+ 'type': 'loop',
949
+ 'params': [self.adaptor.description.elements.loop, node]},
950
+ {'label': 'Terminate',
951
+ 'function_call': func,
952
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
953
+ 'type': 'terminate',
954
+ 'params': [self.adaptor.description.elements.terminate, node]},
955
+ {'label': 'Stop',
956
+ 'function_call': func,
957
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
958
+ 'type': 'stop',
959
+ 'params': [self.adaptor.description.elements.stop, node]},
960
+ {'label': 'Critical',
961
+ 'function_call': func,
962
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
963
+ 'type': 'critical',
964
+ 'params': [self.adaptor.description.elements.critical, node]}
965
+ ];
966
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
967
+ return [{'label': 'Alternative',
968
+ 'function_call': func,
969
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
970
+ 'type': 'alternative',
971
+ 'params': [self.adaptor.description.elements.alternative, node]}];
972
+ }
973
+ return childs;
974
+ }, //}}}
975
+ 'adaptor': {//{{{
976
+ 'mousedown': function (node,e) {
977
+ self.events.mousedown(node,e,true,true);
978
+ },
979
+ 'click': self.events.click,
980
+ 'dblclick': self.events.dblclick,
981
+ 'mouseover': self.events.mouseover,
982
+ 'mouseout': self.events.mouseout,
983
+ }//}}}
984
+ }; /*}}}*/
985
+ this.elements.critical = { /*{{{*/
986
+ 'type': 'complex',
987
+ 'illustrator': {//{{{
988
+ 'endnodes': 'aggregate',
989
+ 'closeblock': false,
990
+ 'border': true,
991
+ 'expansion': function(node) {
992
+ return 'vertical';
993
+ },
994
+ 'col_shift': function(node) {
995
+ return true;
996
+ },
997
+ 'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
998
+ },//}}}
999
+ 'description': self.adaptor.theme_dir + 'rngs/critical.rng',
1000
+ 'permissible_children': function(node,mode) { //{{{
1001
+ var func = null;
1002
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1003
+ else { func = self.adaptor.description.insert_after }
1004
+ var childs = [
1005
+ {'label': 'Service Call with Scripts',
1006
+ 'function_call': func,
1007
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1008
+ 'type': 'callmanipulate',
1009
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1010
+ {'label': 'Service Call',
1011
+ 'function_call': func,
1012
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1013
+ 'type': 'call',
1014
+ 'params': [self.adaptor.description.elements.call, node]},
1015
+ {'label': 'Script',
1016
+ 'function_call': func,
1017
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1018
+ 'type': 'manipulate',
1019
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1020
+ {'label': 'Parallel',
1021
+ 'function_call': func,
1022
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1023
+ 'type': 'parallel',
1024
+ 'params': [self.adaptor.description.elements.parallel, node]},
1025
+ {'label': 'Decision',
1026
+ 'function_call': func,
1027
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1028
+ 'type': 'choose',
1029
+ 'params': [self.adaptor.description.elements.choose, node]},
1030
+ {'label': 'Loop',
1031
+ 'function_call': func,
1032
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1033
+ 'type': 'loop',
1034
+ 'params': [self.adaptor.description.elements.loop, node]},
1035
+ {'label': 'Terminate',
1036
+ 'function_call': func,
1037
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1038
+ 'type': 'terminate',
1039
+ 'params': [self.adaptor.description.elements.terminate, node]},
1040
+ {'label': 'Stop',
1041
+ 'function_call': func,
1042
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1043
+ 'type': 'stop',
1044
+ 'params': [self.adaptor.description.elements.stop, node]}
1045
+ ];
1046
+ if(node.parent('parallel_branch').length > 0) {
1047
+ childs.push({
1048
+ 'label': 'Critical',
1049
+ 'function_call': func,
1050
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1051
+ 'type': 'critical',
1052
+ 'params': [self.adaptor.description.elements.critical, node]
1053
+ });
1054
+ }
1055
+ return childs;
1056
+ }, //}}}
1057
+ 'adaptor': {//{{{
1058
+ 'mousedown': function (node,e) {
1059
+ self.events.mousedown(node,e,true,true);
1060
+ },
1061
+ 'click': self.events.click,
1062
+ 'dblclick': self.events.dblclick,
1063
+ 'mouseover': self.events.mouseover,
1064
+ 'mouseout': self.events.mouseout,
1065
+ }//}}}
1066
+ }; /*}}}*/
1067
+ this.elements.group = { /*{{{*/
1068
+ 'type': 'complex',
1069
+ 'illustrator': {//{{{
1070
+ 'endnodes': 'aggregate',
1071
+ 'closeblock': false,
1072
+ 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
1073
+ 'expansion': function(node) {
1074
+ return 'vertical';
1075
+ },
1076
+ 'col_shift': function(node) {
1077
+ return true;
1078
+ },
1079
+ 'svg': null
1080
+ },//}}}
1081
+ 'description': self.adaptor.theme_dir + 'rngs/group.rng',
1082
+ 'permissible_children': function(node,mode) { //{{{
1083
+ var func = null;
1084
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1085
+ else { func = self.adaptor.description.insert_after }
1086
+ return [
1087
+ ];
1088
+ }, //}}}
1089
+ 'adaptor': {//{{{
1090
+ 'mousedown': function (node,e) {
1091
+ self.events.mousedown(node,e,true,true);
1092
+ },
1093
+ 'click': self.events.click,
1094
+ 'dblclick': self.events.dblclick,
1095
+ 'mouseover': self.events.mouseover,
1096
+ 'mouseout': self.events.mouseout,
1097
+ }//}}}
1098
+ }; /*}}}*/
1099
+ this.elements.start = this.elements.description = { /*{{{*/
1100
+ 'type': 'description',
1101
+ 'illustrator': {//{{{
1102
+ 'endnodes': 'passthrough',
1103
+ 'closeblock': false,
1104
+ 'balance': true,
1105
+ 'expansion': function(node) {
1106
+ return 'vertical';
1107
+ },
1108
+ 'closing_symbol': 'end',
1109
+ 'col_shift': function(node) {
1110
+ return true;
1111
+ },
1112
+ 'svg': self.adaptor.theme_dir + 'symbols/start.svg'
1113
+ },//}}}
1114
+ 'description': null,
1115
+ 'permissible_children': function(node,mode) { //{{{
1116
+ var func = null;
1117
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1118
+ else { func = self.adaptor.description.insert_after }
1119
+ var childs = [
1120
+ {'label': 'Service Call with Scripts',
1121
+ 'function_call': func,
1122
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1123
+ 'type': 'callmanipulate',
1124
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1125
+ {'label': 'Service Call',
1126
+ 'function_call': func,
1127
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1128
+ 'type': 'call',
1129
+ 'params': [self.adaptor.description.elements.call, node]},
1130
+ {'label': 'Script',
1131
+ 'function_call': func,
1132
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1133
+ 'type': 'manipulate',
1134
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1135
+ {'label': 'Parallel',
1136
+ 'function_call': func,
1137
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1138
+ 'type': 'parallel',
1139
+ 'params': [self.adaptor.description.elements.parallel, node]},
1140
+ {'label': 'Decision',
1141
+ 'function_call': func,
1142
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1143
+ 'type': 'choose',
1144
+ 'params': [self.adaptor.description.elements.choose, node]},
1145
+ {'label': 'Loop',
1146
+ 'function_call': func,
1147
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1148
+ 'type': 'loop',
1149
+ 'params': [self.adaptor.description.elements.loop, node]},
1150
+ {'label': 'Stop',
1151
+ 'function_call': func,
1152
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1153
+ 'type': 'stop',
1154
+ 'params': [self.adaptor.description.elements.stop, node]}
1155
+ ];
1156
+ if(node.parent('parallel_branch').length > 0) {
1157
+ childs.push({
1158
+ 'label': 'Critical',
1159
+ 'function_call': func,
1160
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1161
+ 'type': 'critical',
1162
+ 'params': [self.adaptor.description.elements.critical, node]
1163
+ });
1164
+ }
1165
+ return childs;
1166
+ }, //}}}
1167
+ 'adaptor': {//{{{
1168
+ 'mousedown': function (node,e) {
1169
+ self.events.mousedown(node,e,true,false);
1170
+ },
1171
+ 'click': self.events.click,
1172
+ 'dblclick': self.events.dblclick,
1173
+ 'mouseover': self.events.mouseover,
1174
+ 'mouseout': self.events.mouseout,
1175
+ }//}}}
1176
+ }; /*}}}*/
1177
+
1178
+ // Abstract Elements
1179
+ // * they may only have an illustrator (or other parts)
1180
+ // * they HAVE TO have a parent
1181
+ this.elements.callmanipulate = { /*{{{*/
1182
+ 'parent': 'call',
1183
+ 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1184
+ 'illustrator': {//{{{
1185
+ 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
1186
+ 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
1187
+ },//}}}
1188
+ }; /*}}}*/
1189
+ this.elements.loop_head = { /*{{{*/
1190
+ 'parent': 'loop',
1191
+ 'illustrator': {//{{{
1192
+ 'endnodes': 'this',
1193
+ 'closeblock': true,
1194
+ 'label': function(node){
1195
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
1196
+ return ret;
1197
+ },
1198
+ }//}}}
1199
+ }; /*}}}*/
1200
+ this.elements.loop_tail = { /*{{{*/
1201
+ 'parent': 'loop',
1202
+ 'illustrator': {//{{{
1203
+ 'endnodes': 'aggregate',
1204
+ 'closeblock': false,
1205
+ 'closing_symbol': 'loop_finish'
1206
+ },//}}}
1207
+ }; /*}}}*/
1208
+ this.elements.choose_inclusive = { /*{{{*/
1209
+ 'parent': 'choose',
1210
+ 'illustrator': {//{{{
1211
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1212
+ }//}}}
1213
+ }; /*}}}*/
1214
+ this.elements.choose_exclusive = { /*{{{*/
1215
+ 'parent': 'choose',
1216
+ 'illustrator': {//{{{
1217
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1218
+ },//}}}
1219
+ }; /*}}}*/
1220
+ this.elements.choose_inclusive_finish = { /*{{{*/
1221
+ 'parent': 'choose_finish',
1222
+ 'illustrator': {//{{{
1223
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1224
+ }//}}}
1225
+ }; /*}}}*/
1226
+ this.elements.choose_exclusive_finish = { /*{{{*/
1227
+ 'parent': 'choose_finish',
1228
+ 'illustrator': {//{{{
1229
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1230
+ },//}}}
1231
+ }; /*}}}*/
1232
+ this.elements.loop_head_finish = { /*{{{*/
1233
+ 'parent': 'loop_finish',
1234
+ 'illustrator': {//{{{
1235
+ 'endnodes': 'this',
1236
+ 'closeblock': true,
1237
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1238
+ }//}}}
1239
+ }; /*}}}*/
1240
+ this.elements.loop_tail_finish = { /*{{{*/
1241
+ 'parent': 'loop_finish',
1242
+ 'illustrator': {//{{{
1243
+ 'endnodes': 'this',
1244
+ 'closeblock': false,
1245
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1246
+ },//}}}
1247
+ }; /*}}}*/
1248
+ this.elements.parallel_simple = { /*{{{*/
1249
+ 'parent': 'parallel_finish',
1250
+ 'illustrator': {//{{{
1251
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1252
+ }//}}}
1253
+ }; /*}}}*/
1254
+ this.elements.parallel_complex = { /*{{{*/
1255
+ 'parent': 'parallel_finish',
1256
+ 'illustrator': {//{{{
1257
+ 'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1258
+ },//}}}
1259
+ }; /*}}}*/
1260
+ this.elements.parallel_branch_normal = { /*{{{*/
1261
+ 'parent': 'parallel_branch',
1262
+ 'illustrator': {//{{{
1263
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
1264
+ }//}}}
1265
+ }; /*}}}*/
1266
+ this.elements.parallel_branch_event = { /*{{{*/
1267
+ 'parent': 'parallel_branch',
1268
+ 'illustrator': {//{{{
1269
+ 'endnodes': 'this',
1270
+ 'noarrow': false,
1271
+ 'border': true,
1272
+ 'wide': true,
1273
+ 'closing_symbol': 'event_end',
1274
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
1275
+ }//}}}
1276
+ }; /*}}}*/
1277
+ this.elements.parallel_branch_compact = { /*{{{*/
1278
+ 'parent': 'parallel_branch',
1279
+ 'illustrator': {//{{{
1280
+ 'endnodes': 'this',
1281
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
1282
+ }//}}}
1283
+ }; /*}}}*/
1284
+ this.elements.scripts = { /*{{{*/
1285
+ 'description': [self.adaptor.theme_dir + 'rngs/scripts.rng']
1286
+ }; /*}}}*/
1287
+ }