cpee 1.3.181 → 1.3.183

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +19 -60
  3. data/cockpit/css/wfadaptor.css +11 -0
  4. data/cockpit/index.html +45 -71
  5. data/cockpit/js/details.js +50 -139
  6. data/cockpit/js/instance.js +133 -185
  7. data/cockpit/js/parameters.js +57 -55
  8. data/cockpit/js/ui.js +4 -29
  9. data/cockpit/js/wfadaptor.js +190 -108
  10. data/cockpit/rngs/attributes.rng +8 -0
  11. data/cockpit/rngs/dataelements.rng +8 -0
  12. data/cockpit/rngs/endpoints.rng +8 -0
  13. data/cockpit/testsets/Concurrent.xml +6 -6
  14. data/cockpit/testsets/Coopis Testset.xml +12 -12
  15. data/cockpit/testsets/ICSOC Testset.xml +27 -27
  16. data/cockpit/testsets/Infinity.xml +4 -4
  17. data/cockpit/testsets/Linear.xml +10 -10
  18. data/cockpit/testsets/Mangler 1.xml +20 -20
  19. data/cockpit/testsets/Mangler 2.xml +18 -18
  20. data/cockpit/testsets/Promise.xml +258 -0
  21. data/cockpit/testsets/SOPROMO Test Sonification.xml +11 -11
  22. data/cockpit/testsets/Syncing P34 1.xml +12 -12
  23. data/cockpit/testsets/Syncing P34 2.xml +12 -12
  24. data/cockpit/testsets/Syncing P34 3.xml +12 -12
  25. data/cockpit/testsets/Syncing P34.xml +12 -12
  26. data/cockpit/testsets/TEST - Bad Loop.xml +39 -39
  27. data/cockpit/testsets/Update.xml +1 -1
  28. data/cockpit/testsets/Worklist Parallel.xml +8 -8
  29. data/cockpit/testsets/Worklist Test CPEE.xml +2 -2
  30. data/cockpit/testsets/Worklist Test.xml +2 -2
  31. data/cockpit/testsets/testsets.xml +2 -0
  32. data/cockpit/themes/adventure/rngs/alternative.rng +5 -0
  33. data/cockpit/themes/adventure/rngs/call.rng +29 -0
  34. data/cockpit/{rngtest2.rng → themes/adventure/rngs/callmanipulate.rng} +9 -9
  35. data/cockpit/themes/adventure/rngs/choose.rng +8 -0
  36. data/cockpit/themes/adventure/rngs/critical.rng +5 -0
  37. data/cockpit/themes/adventure/rngs/escape.rng +1 -0
  38. data/cockpit/themes/adventure/rngs/finalize.rng +6 -0
  39. data/cockpit/themes/adventure/rngs/group.rng +3 -0
  40. data/cockpit/themes/adventure/rngs/loop.rng +11 -0
  41. data/cockpit/themes/adventure/rngs/manipulate.rng +6 -0
  42. data/cockpit/themes/adventure/rngs/otherwise.rng +1 -0
  43. data/cockpit/themes/adventure/rngs/parallel.rng +5 -0
  44. data/cockpit/themes/adventure/rngs/parallel_branch.rng +8 -0
  45. data/cockpit/themes/adventure/rngs/update.rng +6 -0
  46. data/cockpit/themes/adventure/symbols/alternative.svg +4 -0
  47. data/cockpit/themes/adventure/symbols/call.svg +4 -0
  48. data/cockpit/themes/adventure/symbols/callmanipulate.svg +6 -0
  49. data/cockpit/themes/adventure/symbols/choose.svg +5 -0
  50. data/cockpit/themes/adventure/symbols/choose_exclusive.svg +5 -0
  51. data/cockpit/themes/adventure/symbols/choose_inclusive.svg +4 -0
  52. data/cockpit/themes/adventure/symbols/critical.svg +4 -0
  53. data/cockpit/themes/adventure/symbols/escape.svg +5 -0
  54. data/cockpit/themes/adventure/symbols/loop.svg +5 -0
  55. data/cockpit/themes/adventure/symbols/manipulate.svg +4 -0
  56. data/cockpit/themes/adventure/symbols/otherwise.svg +4 -0
  57. data/cockpit/themes/adventure/symbols/parallel.svg +5 -0
  58. data/cockpit/themes/adventure/symbols/parallel_branch.svg +4 -0
  59. data/cockpit/themes/adventure/symbols/scripts.svg +4 -0
  60. data/cockpit/themes/adventure/symbols/start.svg +3 -0
  61. data/cockpit/themes/adventure/theme.js +729 -0
  62. data/cockpit/themes/default/rngs/alternative.rng +5 -0
  63. data/cockpit/themes/default/rngs/call.rng +29 -0
  64. data/cockpit/themes/default/rngs/callmanipulate.rng +41 -0
  65. data/cockpit/themes/default/rngs/choose.rng +8 -0
  66. data/cockpit/themes/default/rngs/critical.rng +5 -0
  67. data/cockpit/themes/default/rngs/escape.rng +1 -0
  68. data/cockpit/themes/default/rngs/finalize.rng +6 -0
  69. data/cockpit/themes/default/rngs/group.rng +3 -0
  70. data/cockpit/themes/default/rngs/loop.rng +11 -0
  71. data/cockpit/themes/default/rngs/manipulate.rng +6 -0
  72. data/cockpit/themes/default/rngs/otherwise.rng +1 -0
  73. data/cockpit/themes/default/rngs/parallel.rng +5 -0
  74. data/cockpit/themes/default/rngs/parallel_branch.rng +8 -0
  75. data/cockpit/themes/default/rngs/update.rng +6 -0
  76. data/cockpit/themes/default/symbols/alternative.svg +4 -0
  77. data/cockpit/themes/default/symbols/call.svg +4 -0
  78. data/cockpit/themes/default/symbols/callmanipulate.svg +6 -0
  79. data/cockpit/themes/default/symbols/choose.svg +5 -0
  80. data/cockpit/themes/default/symbols/choose_exclusive.svg +5 -0
  81. data/cockpit/themes/default/symbols/choose_inclusive.svg +4 -0
  82. data/cockpit/themes/default/symbols/critical.svg +4 -0
  83. data/cockpit/themes/default/symbols/escape.svg +5 -0
  84. data/cockpit/themes/default/symbols/loop.svg +5 -0
  85. data/cockpit/themes/default/symbols/manipulate.svg +4 -0
  86. data/cockpit/themes/default/symbols/otherwise.svg +4 -0
  87. data/cockpit/themes/default/symbols/parallel.svg +5 -0
  88. data/cockpit/themes/default/symbols/parallel_branch.svg +4 -0
  89. data/cockpit/themes/default/symbols/scripts.svg +4 -0
  90. data/cockpit/themes/default/symbols/start.svg +3 -0
  91. data/cockpit/themes/default/theme.js +729 -0
  92. data/cockpit/themes/lego/rngs/alternative.rng +5 -0
  93. data/cockpit/themes/lego/rngs/call.rng +41 -0
  94. data/cockpit/themes/lego/rngs/choose.rng +8 -0
  95. data/cockpit/themes/lego/rngs/critical.rng +5 -0
  96. data/cockpit/themes/lego/rngs/loop.rng +11 -0
  97. data/cockpit/themes/lego/rngs/manipulate.rng +6 -0
  98. data/cockpit/themes/lego/rngs/parallel.rng +5 -0
  99. data/cockpit/themes/lego/rngs/parallel_branch.rng +8 -0
  100. data/cockpit/themes/lego/symbols/alternative.svg +4 -0
  101. data/cockpit/themes/lego/symbols/call.svg +4 -0
  102. data/cockpit/themes/lego/symbols/callmanipulate.svg +6 -0
  103. data/cockpit/themes/lego/symbols/callori.svg +4 -0
  104. data/cockpit/themes/lego/symbols/choose.svg +4 -0
  105. data/cockpit/themes/lego/symbols/choose_exclusive.svg +5 -0
  106. data/cockpit/themes/lego/symbols/choose_inclusive.svg +4 -0
  107. data/cockpit/themes/lego/symbols/critical.svg +4 -0
  108. data/cockpit/themes/lego/symbols/escape.svg +5 -0
  109. data/cockpit/themes/lego/symbols/lego.svg +72 -0
  110. data/cockpit/themes/lego/symbols/loop.svg +5 -0
  111. data/cockpit/themes/lego/symbols/manipulate.svg +4 -0
  112. data/cockpit/themes/lego/symbols/otherwise.svg +4 -0
  113. data/cockpit/themes/lego/symbols/parallel.svg +6 -0
  114. data/cockpit/themes/lego/symbols/parallel_branch.svg +4 -0
  115. data/cockpit/themes/lego/symbols/scripts.svg +4 -0
  116. data/cockpit/themes/lego/symbols/start.svg +3 -0
  117. data/cockpit/themes/lego/theme.js +742 -0
  118. data/cockpit/themes/promise/rngs/alternative.rng +5 -0
  119. data/cockpit/themes/promise/rngs/call.rng +41 -0
  120. data/cockpit/themes/promise/rngs/choose.rng +8 -0
  121. data/cockpit/themes/promise/rngs/critical.rng +5 -0
  122. data/cockpit/themes/promise/rngs/loop.rng +11 -0
  123. data/cockpit/themes/promise/rngs/manipulate.rng +6 -0
  124. data/cockpit/themes/promise/rngs/parallel.rng +5 -0
  125. data/cockpit/themes/promise/rngs/parallel_branch.rng +8 -0
  126. data/cockpit/themes/promise/symbols/alternative.svg +4 -0
  127. data/cockpit/themes/promise/symbols/call.svg +4 -0
  128. data/cockpit/themes/promise/symbols/callmanipulate.svg +6 -0
  129. data/cockpit/themes/promise/symbols/choose.svg +4 -0
  130. data/cockpit/themes/promise/symbols/choose_exclusive.svg +5 -0
  131. data/cockpit/themes/promise/symbols/choose_inclusive.svg +4 -0
  132. data/cockpit/themes/promise/symbols/critical.svg +4 -0
  133. data/cockpit/themes/promise/symbols/escape.svg +5 -0
  134. data/cockpit/themes/promise/symbols/loop.svg +5 -0
  135. data/cockpit/themes/promise/symbols/manipulate.svg +4 -0
  136. data/cockpit/themes/promise/symbols/otherwise.svg +4 -0
  137. data/cockpit/themes/promise/symbols/parallel.svg +6 -0
  138. data/cockpit/themes/promise/symbols/parallel_branch.svg +4 -0
  139. data/cockpit/themes/promise/symbols/preminder.svg +6 -0
  140. data/cockpit/themes/promise/symbols/scripts.svg +4 -0
  141. data/cockpit/themes/promise/symbols/start.svg +3 -0
  142. data/cockpit/themes/promise/theme.js +742 -0
  143. data/cpee.gemspec +2 -2
  144. data/lib/cpee/implementation.rb +15 -15
  145. data/server/handlerwrappers/default.rb +19 -19
  146. data/server/handlerwrappers/log.rb +264 -0
  147. data/server/instances/10/properties.xml +148 -0
  148. data/server/instances/11/properties.xml +149 -0
  149. data/server/instances/12/properties.xml +149 -0
  150. data/server/instances/13/properties.xml +149 -0
  151. data/server/instances/14/properties.xml +111 -0
  152. data/server/instances/15/properties.xml +113 -0
  153. data/server/instances/16/properties.xml +113 -0
  154. data/server/instances/17/properties.xml +149 -0
  155. data/server/instances/18/properties.xml +149 -0
  156. data/server/instances/19/properties.xml +114 -0
  157. data/server/instances/2/properties.xml +1 -1
  158. data/server/instances/20/properties.xml +113 -0
  159. data/server/instances/21/notifications/0851248d60c898cadd743d0dd5b6d273/consumer-secret +1 -0
  160. data/server/instances/21/notifications/0851248d60c898cadd743d0dd5b6d273/producer-secret +1 -0
  161. data/server/instances/21/notifications/0851248d60c898cadd743d0dd5b6d273/subscription.xml +6 -0
  162. data/server/instances/21/notifications/b7bac3f3010d433ce5d8f29338a06f9a/consumer-secret +1 -0
  163. data/server/instances/21/notifications/b7bac3f3010d433ce5d8f29338a06f9a/producer-secret +1 -0
  164. data/server/instances/21/notifications/b7bac3f3010d433ce5d8f29338a06f9a/subscription.xml +23 -0
  165. data/server/instances/21/properties.xml +149 -0
  166. data/server/instances/22/properties.xml +113 -0
  167. data/server/instances/23/properties.xml +88 -0
  168. data/server/instances/24/properties.xml +168 -0
  169. data/server/instances/25/properties.xml +149 -0
  170. data/server/instances/26/properties.xml +113 -0
  171. data/server/instances/27/properties.xml +141 -0
  172. data/server/instances/3/properties.xml +46 -0
  173. data/server/instances/4/properties.xml +148 -0
  174. data/server/instances/5/properties.xml +148 -0
  175. data/server/instances/6/properties.xml +148 -0
  176. data/server/instances/7/properties.xml +148 -0
  177. data/server/instances/8/properties.xml +148 -0
  178. data/server/instances/9/properties.xml +46 -0
  179. data/server/resources/properties.init +2 -1
  180. data/server/resources/transformation_dslx.xsl +12 -12
  181. data/server/server.pid +1 -0
  182. data/server/server.rb +2 -0
  183. metadata +152 -12
  184. data/cockpit/js/wfadaptor.cpee.js +0 -936
  185. data/cockpit/rngtest1.html +0 -53
  186. data/cockpit/rngtest1.rng +0 -38
  187. data/cockpit/rngtest1.xml +0 -16
  188. data/cockpit/rngtest2.html +0 -53
  189. data/cockpit/rngtest2.xml +0 -11
  190. data/cockpit/test.html +0 -46
@@ -0,0 +1,5 @@
1
+ <element rngui:version="1.2" name="alternative" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="condition" rngui:label="Condition">
3
+ <data type="string" rngui:label="Condition"/>
4
+ </attribute>
5
+ </element>
@@ -0,0 +1,41 @@
1
+ <element rngui:version="1.2" name="call" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
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="endpoint" rngui:label="Endpoint">
6
+ <data type="string"/>
7
+ </attribute>
8
+ <element name='parameters' rngui:header="Parameters">
9
+ <element name="label" rngui:label="Label">
10
+ <data type="string" rngui:label="Short description of the task"/>
11
+ </element>
12
+ <element name="method" rngui:label="Method">
13
+ <choice>
14
+ <value>:post</value>
15
+ <value>:get</value>
16
+ <value>:put</value>
17
+ <value>:delete</value>
18
+ </choice>
19
+ </element>
20
+ <element name="arguments" rngui:header="Arguments">
21
+ <zeroOrMore rngui:label="Create Argument Pair">
22
+ <element rngui:label='Name'>
23
+ <anyName/>
24
+ <data type="string" rngui:label="Value"/>
25
+ </element>
26
+ </zeroOrMore>
27
+ </element>
28
+ </element>
29
+ <element name="finalize" rngui:header="Finalize" rngui:label="Code">
30
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
31
+ <data type="string" rngui:readonly="true"/>
32
+ </attribute>
33
+ <text rngui:label='Script that is executed, when a service returns data'/>
34
+ </element>
35
+ <element name="update" rngui:header="Update" rngui:label="Code">
36
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
37
+ <data type="string" rngui:readonly="true"/>
38
+ </attribute>
39
+ <text rngui:label='Script that is executed, when a service sends intermediate data'/>
40
+ </element>
41
+ </element>
@@ -0,0 +1,8 @@
1
+ <element rngui:version="1.2" name="choose" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="mode" rngui:label="Mode" rngui:default="exclusive">
3
+ <choice>
4
+ <value>exclusive</value>
5
+ <value>inclusive</value>
6
+ </choice>
7
+ </attribute>
8
+ </element>
@@ -0,0 +1,5 @@
1
+ <element rngui:version="1.2" name="critical" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="sid" rngui:label="SID" rngui:default="section" rngui:hint="Identical SID's shared by between differnt 'critical' elements define mutual exclusive areas.">
3
+ <data type="string"/>
4
+ </attribute>
5
+ </element>
@@ -0,0 +1,11 @@
1
+ <element rngui:version="1.2" name="loop" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="mode" rngui:label="Mode" rngui:default="pre_test">
3
+ <choice>
4
+ <value>pre_test</value>
5
+ <value>post_test</value>
6
+ </choice>
7
+ </attribute>
8
+ <attribute name="condition" rngui:label="Condition">
9
+ <data type="string" rngui:label="Condition"/>
10
+ </attribute>
11
+ </element>
@@ -0,0 +1,6 @@
1
+ <element rngui:version="1.2" name="manipulate" rngui:label="Script" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="id" rngui:label="ID" rngui:default="javascript:get_free_id()">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ <text rngui:label='Script that is executed'/>
6
+ </element>
@@ -0,0 +1,5 @@
1
+ <element rngui:version="1.2" name="parallel" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
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>
@@ -0,0 +1,8 @@
1
+ <element rngui:version="1.2" name="parallel_branch" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
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,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="14" class="standwithout"/>
3
+ <text transform="translate(15,20)" class="normal">{..}</text>
4
+ </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 stand"/>
3
+ <path transform="scale(0.8) translate(10, 6) rotate(15,16,11)" class="stand" style="fill:#000000;" d="M 1,28 4,8 10,14 16,1 12,20 6,15.35 Z"/>
4
+ </svg>
@@ -0,0 +1,6 @@
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 stand"/>
3
+ <path transform="scale(0.8) translate(10, 6) rotate(15,16,11)" class="stand" style="fill:#000000;" d="M 1,28 4,8 10,14 16,1 12,20 6,15.35 Z"/>
4
+ <circle cx="28" cy="27" r="9" class="rfill stand"/>
5
+ <text transform="translate(28,31)" class="small">s</text>
6
+ </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="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="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="stand"/>
3
+ <circle cx="15.5" cy="15.5" r="7" class="stand"/>
4
+ </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="stand"/>
3
+ <text transform="translate(15,21)" class="normal">⚠</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="14" class="stand"/>
3
+ <circle cx="15" cy="15" r="11" class="stand"/>
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,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="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 stand"/>
3
+ <text transform="translate(15,21)" class="normal">s</text>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="15" cy="15" r="9" class="standtrans"/>
3
+ <line x1="9" y1="21" x2="21" y2="9" class="stand"/>
4
+ </svg>
@@ -0,0 +1,6 @@
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="stand"/>
3
+ <text transform="translate(12,25)" class="normallarge">+</text>
4
+ <text transform="translate(18,16)" class="small">=</text>
5
+ </svg>
6
+
@@ -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="stand"/>
3
+ <text transform="translate(15,20)" class="small">+|</text>
4
+ </svg>
@@ -0,0 +1,6 @@
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 stand"/>
3
+ <path transform="scale(0.8) translate(-51,-9)" class="normal" d="m 69.378704,39.269882 -0.976562,0 -0.0098,-2.939453 q -1.025391,-0.01953 -2.050781,-0.234375 -1.025391,-0.224609 -2.060547,-0.664062 l 0,-1.757813 q 0.996094,0.625 2.011719,0.947266 1.02539,0.3125 2.109375,0.322265 l 0,-4.453125 q -2.158204,-0.351562 -3.144532,-1.191406 -0.976562,-0.839844 -0.976562,-2.304687 0,-1.591797 1.064453,-2.509766 1.064453,-0.917969 3.056641,-1.054688 l 0,-2.294921 0.976562,0 0,2.265625 q 0.908203,0.03906 1.757813,0.195312 0.849609,0.146484 1.660156,0.410156 l 0,1.708985 Q 71.986126,25.305038 71.126751,25.080429 70.277142,24.85582 69.378704,24.816757 l 0,4.169922 q 2.216797,0.341797 3.261719,1.220703 1.044922,0.878906 1.044922,2.402344 0,1.650391 -1.113282,2.607422 -1.103515,0.947265 -3.193359,1.09375 l 0,2.958984 z m -0.976562,-10.458984 0,-4.003906 q -1.132813,0.126953 -1.728516,0.644531 -0.595703,0.517578 -0.595703,1.376953 0,0.839844 0.546875,1.308594 0.55664,0.46875 1.777344,0.673828 z m 0.976562,1.875 0,4.228515 q 1.240234,-0.166015 1.865234,-0.703125 0.634766,-0.537109 0.634766,-1.416015 0,-0.859375 -0.605469,-1.367188 -0.595703,-0.507812 -1.894531,-0.742187 z m -8.15465,-2.502013 -0.734542,0 -0.0074,-2.210971 q -0.771269,-0.01469 -1.542538,-0.17629 -0.771269,-0.168945 -1.549883,-0.499488 l 0,-1.322176 q 0.749233,0.470107 1.513156,0.712506 0.771269,0.235053 1.586611,0.242398 l 0,-3.349511 q -1.623338,-0.264435 -2.365226,-0.896141 -0.734541,-0.631706 -0.734541,-1.733518 0,-1.197304 0.80065,-1.887773 0.800651,-0.69047 2.299117,-0.793306 l 0,-1.726172 0.734541,0 0,1.704137 q 0.683124,0.02938 1.322176,0.146908 0.639051,0.110181 1.248721,0.308507 l 0,1.285449 q -0.609644,-0.308508 -1.256041,-0.477453 -0.639051,-0.168944 -1.31483,-0.198326 l 0,3.136494 q 1.66741,0.25709 2.45337,0.918177 0.78596,0.661088 0.78596,1.806973 0,1.241376 -0.837379,1.961227 -0.830031,0.712505 -2.401951,0.822687 l 0,2.225662 z m -0.734542,-7.866943 0,-3.011622 q -0.852069,0.09549 -1.300139,0.484797 -0.448071,0.389308 -0.448071,1.035704 0,0.631707 0.411344,0.984287 0.418688,0.35258 1.336866,0.506834 z m 0.734542,1.41032 0,3.180566 q 0.932868,-0.124872 1.402975,-0.52887 0.477452,-0.403998 0.477452,-1.065086 0,-0.646396 -0.455416,-1.028359 -0.448071,-0.381961 -1.425011,-0.558251 z m 17.183516,8.718098 -0.847484,0 -0.0085,-2.55093 q -0.889859,-0.01695 -1.779718,-0.203396 -0.889859,-0.194921 -1.788193,-0.576289 l 0,-1.525473 q 0.864435,0.54239 1.745819,0.82206 0.889858,0.271195 1.830567,0.27967 l 0,-3.864531 q -1.872942,-0.305094 -2.728902,-1.033932 -0.847484,-0.728837 -0.847484,-2.000063 0,-1.381401 0.923758,-2.178037 0.923759,-0.796636 2.652628,-0.915284 l 0,-1.991588 0.847485,0 0,1.966165 q 0.78816,0.0339 1.525473,0.169496 0.737311,0.127122 1.440724,0.355943 l 0,1.483099 q -0.703383,-0.355944 -1.44917,-0.550865 -0.737311,-0.194921 -1.516998,-0.228821 l 0,3.61876 q 1.923791,0.29662 2.8306,1.059356 0.906808,0.762736 0.906808,2.084813 0,1.43225 -0.966133,2.262785 -0.957657,0.82206 -2.771275,0.949183 l 0,2.567879 z m -0.847484,-9.076563 0,-3.474687 q -0.983083,0.110173 -1.500049,0.559339 -0.516965,0.449167 -0.516965,1.194954 0,0.728837 0.474591,1.13563 0.483066,0.406793 1.542423,0.584764 z m 0.847484,1.627171 0,3.669609 q 1.076305,-0.144072 1.618696,-0.610189 0.550865,-0.466116 0.550865,-1.228853 0,-0.745786 -0.525441,-1.186479 -0.516965,-0.440691 -1.64412,-0.644088 z"/>
4
+ <circle cx="28" cy="27" r="9" class="rfill stand"/>
5
+ <text transform="translate(28,31)" class="small">s</text>
6
+ </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 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,742 @@
1
+ function WFAdaptorManifestation(adaptor) {
2
+ this.adaptor = adaptor;
3
+ this.elements = elements = {};
4
+ this.events = events = {};
5
+
6
+ this.noarrow = noarrow = ['alternative', 'otherwise'];
7
+ this.description_extract = function(rng) {
8
+ return new RelaxNGui(rng,null).example();
9
+ }
10
+
11
+ // Events
12
+ this.events.mousedown = function(svgid, e, child, sibling) { // {{{
13
+ if(e.button == 0) { // left-click
14
+ } else if(e.button == 1) { // middle-click
15
+ } else if(e.button == 2) { // right-click
16
+ var xml_node = adaptor.description.get_node_by_svg_id(svgid);
17
+ var group = null;
18
+ var menu = {};
19
+
20
+ if(child) {
21
+ group = elements[xml_node.get(0).tagName].permissible_children(xml_node);
22
+ if(group.length > 0) menu['Insert into'] = group;
23
+ }
24
+ if(sibling) {
25
+ group = elements[xml_node.parent().get(0).tagName].permissible_children(xml_node);
26
+ if(group.length > 0) menu['Insert after'] = group;
27
+ }
28
+
29
+ if(xml_node.get(0).tagName != 'description' && !elements[xml_node.get(0).tagName].neverdelete)
30
+ menu['Remove Element'] = [{'label': 'Actual Element',
31
+ 'function_call': adaptor.description.remove,
32
+ 'menu_icon': function() {
33
+ var icon = elements[xml_node.get(0).tagName].illustrator.svg();
34
+ icon.children('.rfill').css({'fill':'red','fill-opacity':'0.5'});
35
+ return icon;
36
+ },
37
+ 'params': [null, xml_node]}];
38
+ if($('> manipulate', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
39
+ menu['Remove Element'].push({'label': 'Remove Scripts',
40
+ 'function_call': adaptor.description.remove,
41
+ 'menu_icon': function() {
42
+ var icon = elements.callmanipulate.illustrator.svg();
43
+ icon.children('.rfill:last').css({'fill':'red','fill-opacity':'0.5'});
44
+ return icon;
45
+ },
46
+ 'params': ['> manipulate', xml_node]});
47
+ }
48
+ new CustomMenu(e).contextmenu(menu);
49
+ }
50
+ return false;
51
+ } // }}}
52
+ this.events.click = function(svgid, e) { // {{{
53
+ if (adaptor.description.get_node_by_svg_id(svgid).length == 0) {
54
+ return;
55
+ }
56
+
57
+ if ($('#state').text() != 'finished')
58
+ $('#main ui-behind button').show();
59
+ if ($('#main ui-behind button').hasClass('highlight')) {
60
+ var check = confirm("Discard changes?");
61
+ if (check)
62
+ $('#main ui-behind button').removeClass('highlight');
63
+ else
64
+ return;
65
+ }
66
+
67
+ var visid = 'details';
68
+ var tab = $('#dat_' + visid);
69
+ var node = adaptor.description.get_node_by_svg_id(svgid).get(0);
70
+
71
+ save[visid + '_target'] = { 'svgid': svgid, 'model': adaptor.description };
72
+
73
+ tab.empty();
74
+ $.ajax({
75
+ type: "GET",
76
+ url: adaptor.theme_dir + "rngs/" + node.nodeName + ".rng",
77
+ success: function(rng){
78
+ save[visid] = new RelaxNGui(rng,tab);
79
+ save[visid].content(node,adaptor.description.context_eval);
80
+ }
81
+ });
82
+ } // }}}
83
+ this.events.dblclick = function(svgid, e) { // {{{
84
+ } // }}}
85
+ this.events.mouseover = function(svgid, e) { // {{{
86
+ $('.tile[element-id = "' + svgid + '"]').css('display','block');
87
+ return false;
88
+ } // }}}
89
+ this.events.mouseout = function(svgid, e) { // {{{
90
+ $('.tile[element-id = "' + svgid + '"]').css('display','none');
91
+ return false;
92
+ } // }}}
93
+ this.events.dragstart = function (svgid, e) { //{{{
94
+ } //}}}
95
+
96
+ // Abstract Elements (they only have an illustrator)
97
+ this.elements.callmanipulate = { /*{{{*/
98
+ 'illustrator': {//{{{
99
+ 'type' : 'abstract',
100
+ 'svg': adaptor.theme_dir + 'symbols/callmanipulate.svg'
101
+ },//}}}
102
+ }; /*}}}*/
103
+ this.elements.choose_inclusive = { /*{{{*/
104
+ 'illustrator': {//{{{
105
+ 'type' : 'abstract',
106
+ 'svg': adaptor.theme_dir + 'symbols/choose_inclusive.svg'
107
+ },//}}}
108
+ }; /*}}}*/
109
+ this.elements.choose_exclusive = { /*{{{*/
110
+ 'illustrator': {//{{{
111
+ 'type' : 'abstract',
112
+ 'svg': adaptor.theme_dir + 'symbols/choose_exclusive.svg'
113
+ },//}}}
114
+ }; /*}}}*/
115
+ this.elements.callpreminder = { /*{{{*/
116
+ 'illustrator': {//{{{
117
+ 'type' : 'abstract',
118
+ 'svg': adaptor.theme_dir + 'symbols/preminder.svg'
119
+ },//}}}
120
+ }; /*}}}*/
121
+
122
+ // Primitive Elements
123
+ this.elements.call = { /*{{{*/
124
+ 'illustrator': {//{{{
125
+ 'type' : 'primitive',
126
+ 'endnodes' : 'this',
127
+ 'resolve_symbol' : function(node) {
128
+ if($(node).attr('endpoint') == 'instantiation') {
129
+ return 'callinstantiation';
130
+ } else if($(node).attr('endpoint') == 'preminder1' || $(node).attr('endpoint') == 'preminder2' ) {
131
+ return 'callpreminder';
132
+ } else if($('parameters > service', node).length > 0) {
133
+ return 'callinjection';
134
+ } else if($('finalize,update', node).length > 0) {
135
+ return 'callmanipulate';
136
+ } else {
137
+ return'call';
138
+ }
139
+ },
140
+ 'svg': adaptor.theme_dir + 'symbols/call.svg'
141
+ },//}}}
142
+ 'description': '<call id="###" endpoint="" xmlns="http://cpee.org/ns/description/1.0"><parameters xmlns="http://cpee.org/ns/description/1.0"><label>""</label><method>:post</method><parameters/></parameters></call>',
143
+ 'permissible_children': function(node) { //{{{
144
+ if(node.children('finalize,update').length < 1)
145
+ return [
146
+ {'label': 'Scripts',
147
+ 'function_call': adaptor.description.insert_last_into,
148
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
149
+ 'params': [adaptor.description.elements.scripts, node]}
150
+ ];
151
+ return [];
152
+ }, //}}}
153
+ 'adaptor' : {//{{{
154
+ 'mousedown': function (node, e) { events.mousedown(node,e,true, true); },
155
+ 'click': events.click,
156
+ 'dragstart': events.dragstart,
157
+ }//}}}
158
+ }; /*}}}*/
159
+ this.elements.scripts = { /*{{{*/
160
+ 'illustrator': {//{{{
161
+ 'type' : 'primitive',
162
+ 'endnodes' : 'this',
163
+ 'svg': adaptor.theme_dir + 'symbols/scripts.svg'
164
+ },//}}}
165
+ 'description': ['<finalize xmlns="http://cpee.org/ns/description/1.0"/>','<update xmlns="http://cpee.org/ns/description/1.0"/>'],
166
+ 'permissible_children': function(node) { //{{{
167
+ return [];
168
+ }, //}}}
169
+ 'adaptor': { //{{{
170
+ 'mousedown': function (node, e) { events.mousedown(node,e,false, true); },
171
+ 'click': events.click,
172
+ } //}}}
173
+ }; /*}}}*/
174
+ this.elements.manipulate = { /*{{{*/
175
+ 'illustrator': {//{{{
176
+ 'type' : 'primitive',
177
+ 'endnodes' : 'this',
178
+ 'svg': adaptor.theme_dir + 'symbols/manipulate.svg'
179
+ },//}}}
180
+ 'description': '<manipulate id="###" xmlns="http://cpee.org/ns/description/1.0"/>',
181
+ 'permissible_children': function(node) { //{{{
182
+ return [];
183
+ }, //}}}
184
+ 'adaptor' : {//{{{
185
+ 'mousedown': function (node, e) { events.mousedown(node,e,false, true); },
186
+ 'click': events.click,
187
+ }//}}}
188
+ }; /*}}}*/
189
+ this.elements.escape = { /*{{{*/
190
+ 'illustrator': {//{{{
191
+ 'type' : 'primitive',
192
+ 'endnodes' : 'this',
193
+ 'svg': adaptor.theme_dir + 'symbols/escape.svg'
194
+ },//}}}
195
+ 'description': '<escape xmlns="http://cpee.org/ns/description/1.0"/>',
196
+ 'permissible_children': function(node) { //{{{
197
+ return [];
198
+ }, //}}}
199
+ 'adaptor' : {//{{{
200
+ 'mousedown': function (node, e) { events.mousedown(node,e,false, true); },
201
+ 'click': events.click,
202
+ }//}}}
203
+ }; /*}}}*/
204
+
205
+ // Complex Elements
206
+ this.elements.choose = { /*{{{*/
207
+ 'illustrator': {//{{{
208
+ 'type' : 'complex',
209
+ 'endnodes' : 'aggregate',
210
+ 'closeblock': false,
211
+ 'expansion' : function(node) {
212
+ return 'horizontal';
213
+ },
214
+ 'resolve_symbol' : function(node) {
215
+ if($(node).attr('mode') == 'exclusive') {
216
+ return 'choose_exclusive';
217
+ } else {
218
+ return 'choose_inclusive';
219
+ }
220
+ },
221
+ 'col_shift' : function(node) {
222
+ return false;
223
+ },
224
+ 'svg': adaptor.theme_dir + 'symbols/choose.svg'
225
+ },//}}}
226
+ 'description': '<choose mode="exclusive" xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>',
227
+ 'permissible_children': function(node) { //{{{
228
+ var func = null;
229
+ if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
230
+ else { func = adaptor.description.insert_after }
231
+ if(node.children('parallel_branch').length > 0) {
232
+ return [{'label': 'Parallel Branch',
233
+ 'function_call': func,
234
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
235
+ 'params': [adaptor.description.elements.parallel_branch, node]}];
236
+ }
237
+ var childs = [{'label': 'Alternative',
238
+ 'function_call': func,
239
+ 'menu_icon': elements.alternative.illustrator.svg,
240
+ 'params': [adaptor.description.elements.alternative, node]}];
241
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
242
+ childs.push({'label': 'Otherwise',
243
+ 'function_call': func,
244
+ 'menu_icon': elements.otherwise.illustrator.svg,
245
+ 'params': [adaptor.description.elements.otherwise, node]});
246
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
247
+ childs.push({'label': 'Parallel Branch',
248
+ 'function_call': func,
249
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
250
+ 'params': [adaptor.description.elements.parallel_branch, node]});
251
+ return childs;
252
+ }, //}}}
253
+ 'adaptor' : {//{{{
254
+ 'mousedown': function (node, e) {
255
+ events.mousedown(node,e,true, true);
256
+ },
257
+ 'click': events.click,
258
+ 'dblclick': events.dblclick,
259
+ 'mouseover': events.mouseover,
260
+ 'mouseout': events.mouseout,
261
+ }//}}}
262
+ }; /*}}}*/
263
+ this.elements.otherwise = { /*{{{*/
264
+ 'illustrator': {//{{{
265
+ 'type' : 'complex',
266
+ 'endnodes' : 'passthrough',
267
+ 'closeblock': false,
268
+ 'expansion' : function(node) {
269
+ return 'vertical';
270
+ },
271
+ 'col_shift' : function(node) {
272
+ return false;
273
+ },
274
+ 'svg': adaptor.theme_dir + 'symbols/otherwise.svg'
275
+ },//}}}
276
+ 'description': '<otherwise xmlns="http://cpee.org/ns/description/1.0"/>',
277
+ 'neverdelete': true,
278
+ 'permissible_children': function(node) { //{{{
279
+ var func = null;
280
+ var childs = null;
281
+ if(node.get(0).tagName == 'otherwise') { func = adaptor.description.insert_first_into }
282
+ else { func = adaptor.description.insert_after }
283
+ return [
284
+ {'label': 'Service Call with Scripts',
285
+ 'function_call': func,
286
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
287
+ 'params': [adaptor.description.elements.callmanipulate, node]},
288
+ {'label': 'Service Call',
289
+ 'function_call': func,
290
+ 'menu_icon': elements.call.illustrator.svg,
291
+ 'params': [adaptor.description.elements.call, node]},
292
+ {'label': 'Script',
293
+ 'function_call': func,
294
+ 'menu_icon': elements.manipulate.illustrator.svg,
295
+ 'params': [adaptor.description.elements.manipulate, node]},
296
+ {'label': 'Parallel',
297
+ 'function_call': func,
298
+ 'menu_icon': elements.parallel.illustrator.svg,
299
+ 'params': [adaptor.description.elements.parallel, node]},
300
+ {'label': 'Choose',
301
+ 'function_call': func,
302
+ 'menu_icon': elements.choose.illustrator.svg,
303
+ 'params': [adaptor.description.elements.choose, node]},
304
+ {'label': 'Loop',
305
+ 'function_call': func,
306
+ 'menu_icon': elements.loop.illustrator.svg,
307
+ 'params': [adaptor.description.elements.loop, node]},
308
+ {'label': 'Critical',
309
+ 'function_call': func,
310
+ 'menu_icon': elements.critical.illustrator.svg,
311
+ 'params': [adaptor.description.elements.critical, node]}
312
+ ];
313
+ }, //}}}
314
+ 'adaptor' : {//{{{
315
+ 'mousedown': function (node, e) {
316
+ events.mousedown(node,e,true, false);
317
+ },
318
+ 'click': events.click,
319
+ 'dblclick': events.dblclick,
320
+ 'mouseover': events.mouseover,
321
+ 'mouseout': events.mouseout,
322
+ }//}}}
323
+ }; /*}}}*/
324
+ this.elements.alternative = { /*{{{*/
325
+ 'illustrator': {//{{{
326
+ 'type' : 'complex',
327
+ 'endnodes' : 'passthrough',
328
+ 'closeblock':false,
329
+ 'expansion' : function(node) {
330
+ return 'vertical';
331
+ },
332
+ 'col_shift' : function(node) {
333
+ return false;
334
+ },
335
+ 'svg': adaptor.theme_dir + 'symbols/alternative.svg'
336
+ },//}}}
337
+ 'description': '<alternative condition="" xmlns="http://cpee.org/ns/description/1.0"/>',
338
+ 'permissible_children': function(node) { //{{{
339
+ if(node.get(0).tagName == 'alternative') { func = adaptor.description.insert_first_into }
340
+ else { func = adaptor.description.insert_after }
341
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
342
+ return [{'label': 'Parallel Branch',
343
+ 'function_call': func,
344
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
345
+ 'params': [adaptor.description.elements.parallel_branch, node]}];
346
+ }
347
+ return [
348
+ {'label': 'Service Call with Scripts',
349
+ 'function_call': func,
350
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
351
+ 'params': [adaptor.description.elements.callmanipulate, node]},
352
+ {'label': 'Service Call',
353
+ 'function_call': func,
354
+ 'menu_icon': elements.call.illustrator.svg,
355
+ 'params': [adaptor.description.elements.call, node]},
356
+ {'label': 'Script',
357
+ 'function_call': func,
358
+ 'menu_icon': elements.manipulate.illustrator.svg,
359
+ 'params': [adaptor.description.elements.manipulate, node]},
360
+ {'label': 'Parallel',
361
+ 'function_call': func,
362
+ 'menu_icon': elements.parallel.illustrator.svg,
363
+ 'params': [adaptor.description.elements.parallel, node]},
364
+ {'label': 'Choose',
365
+ 'function_call': func,
366
+ 'menu_icon': elements.choose.illustrator.svg,
367
+ 'params': [adaptor.description.elements.choose, node]},
368
+ {'label': 'Loop',
369
+ 'function_call': func,
370
+ 'menu_icon': elements.loop.illustrator.svg,
371
+ 'params': [adaptor.description.elements.loop, node]},
372
+ {'label': 'Critical',
373
+ 'function_call': func,
374
+ 'menu_icon': elements.critical.illustrator.svg,
375
+ 'params': [adaptor.description.elements.critical, node]}
376
+ ];
377
+ }, //}}}
378
+ 'adaptor' : {//{{{
379
+ 'mousedown': function (node, e) {
380
+ events.mousedown(node,e,true, false);
381
+ },
382
+ 'click': events.click,
383
+ 'dblclick': events.dblclick,
384
+ 'mouseover': events.mouseover,
385
+ 'mouseout': events.mouseout,
386
+ }//}}}
387
+ }; /*}}}*/
388
+ this.elements.loop = { /*{{{*/
389
+ 'illustrator': {//{{{
390
+ 'type' : 'complex',
391
+ 'endnodes' : 'this',
392
+ 'closeblock' : true,
393
+ 'expansion' : function(node) {
394
+ return 'vertical';
395
+ },
396
+ 'col_shift' : function(node) {
397
+ return true;
398
+ },
399
+ 'svg': adaptor.theme_dir + 'symbols/loop.svg'
400
+ },// }}}
401
+ 'description': '<loop pre_test="" xmlns="http://cpee.org/ns/description/1.0"/>',
402
+ 'permissible_children': function(node) { //{{{
403
+ var func = null;
404
+ if(node.get(0).tagName == 'loop') { func = adaptor.description.insert_first_into }
405
+ else { func = adaptor.description.insert_after }
406
+ var childs = [
407
+ {'label': 'Service Call with Scripts',
408
+ 'function_call': func,
409
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
410
+ 'params': [adaptor.description.elements.callmanipulate, node]},
411
+ {'label': 'Service Call',
412
+ 'function_call': func,
413
+ 'menu_icon': elements.call.illustrator.svg,
414
+ 'params': [adaptor.description.elements.call, node]},
415
+ {'label': 'Manipulate',
416
+ 'function_call': func,
417
+ 'menu_icon': elements.manipulate.illustrator.svg,
418
+ 'params': [adaptor.description.elements.manipulate, node]},
419
+ {'label': 'Choose',
420
+ 'function_call': func,
421
+ 'menu_icon': elements.choose.illustrator.svg,
422
+ 'params': [adaptor.description.elements.choose, node]},
423
+ {'label': 'Loop',
424
+ 'function_call': func,
425
+ 'menu_icon': elements.loop.illustrator.svg,
426
+ 'params': [adaptor.description.elements.loop, node]},
427
+ {'label': 'Critical',
428
+ 'function_call': func,
429
+ 'menu_icon': elements.critical.illustrator.svg,
430
+ 'params': [adaptor.description.elements.critical, node]}
431
+ ];
432
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
433
+ childs.push({'label': 'Parallel Branch',
434
+ 'function_call': func,
435
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
436
+ 'params': [adaptor.description.elements.parallel_branch, node]}
437
+ );
438
+ } else {
439
+ childs.push({'label': 'Parallel',
440
+ 'function_call': func,
441
+ 'menu_icon': elements.parallel.illustrator.svg,
442
+ 'params': [adaptor.description.elements.parallel, node]}
443
+ );
444
+ }
445
+ return childs;
446
+ }, //}}}
447
+ 'adaptor' : {//{{{
448
+ 'mousedown': function (node, e) {
449
+ events.mousedown(node,e,true, true);
450
+ },
451
+ 'click': events.click,
452
+ 'dblclick': events.dblclick,
453
+ 'mouseover': events.mouseover,
454
+ 'mouseout': events.mouseout,
455
+ }//}}}
456
+ }; /*}}}*/
457
+ this.elements.parallel = { /*{{{*/
458
+ 'illustrator': {//{{{
459
+ 'type' : 'complex',
460
+ 'endnodes' : 'this',
461
+ 'closeblock' : false,
462
+ 'border': true,
463
+ 'expansion' : function(node) {
464
+ // check if any sibling other than 'parallel_branch' is present
465
+ if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
466
+ return 'horizontal';
467
+ },
468
+ 'col_shift' : function(node) {
469
+ return true;
470
+ },
471
+ 'svg': adaptor.theme_dir + 'symbols/parallel.svg'
472
+ },//}}}
473
+ 'description': '<parallel xmlns="http://cpee.org/ns/description/1.0"/>',
474
+ 'permissible_children': function(node) { //{{{
475
+ var childs = [
476
+ {'label': 'Service Call with Scripts',
477
+ 'function_call': adaptor.description.insert_last_into,
478
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
479
+ 'params': [adaptor.description.elements.callmanipulate, node]},
480
+ {'label': 'Service Call',
481
+ 'function_call': adaptor.description.insert_last_into,
482
+ 'menu_icon': elements.call.illustrator.svg,
483
+ 'params': [adaptor.description.elements.call, node]},
484
+ {'label': 'Manipulate',
485
+ 'function_call': adaptor.description.insert_last_into,
486
+ 'menu_icon': elements.manipulate.illustrator.svg,
487
+ 'params': [adaptor.description.elements.manipulate, node]},
488
+ {'label': 'Choose',
489
+ 'function_call': adaptor.description.insert_last_into,
490
+ 'menu_icon': elements.choose.illustrator.svg,
491
+ 'params': [adaptor.description.elements.choose, node]},
492
+ {'label': 'Loop',
493
+ 'function_call': adaptor.description.insert_last_into,
494
+ 'menu_icon': elements.loop.illustrator.svg,
495
+ 'params': [adaptor.description.elements.loop, node]},
496
+ {'label': 'Critical',
497
+ 'function_call': adaptor.description.insert_last_into,
498
+ 'menu_icon': elements.critical.illustrator.svg,
499
+ 'params': [adaptor.description.elements.critical, node]},
500
+ {'label': 'Parallel Branch',
501
+ 'function_call': adaptor.description.insert_last_into,
502
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
503
+ 'params': [adaptor.description.elements.parallel_branch, node]}
504
+ ];
505
+ if(node.get(0).tagName != 'parallel')
506
+ childs.push({'label': 'Parallel',
507
+ 'function_call': adaptor.description.insert_last_into,
508
+ 'menu_icon': elements.parallel.illustrator.svg,
509
+ 'params': [adaptor.description.elements.parallel, node]});
510
+ return childs;
511
+ }, //}}}
512
+ 'adaptor' : {//{{{
513
+ 'mousedown': function (node, e) {
514
+ events.mousedown(node,e,true, true);
515
+ },
516
+ 'click': events.click,
517
+ 'dblclick': events.dblclick,
518
+ 'mouseover': events.mouseover,
519
+ 'mouseout': events.mouseout,
520
+ }//}}}
521
+ }; /*}}}*/
522
+ this.elements.parallel_branch = { /*{{{*/
523
+ 'illustrator': {//{{{
524
+ 'type' : 'complex',
525
+ 'endnodes' : 'this',
526
+ 'closeblock' : false,
527
+ 'expansion' : function(node) {
528
+ return 'vertical';
529
+ },
530
+ 'col_shift' : function(node) {
531
+ if(node.parentNode.tagName == 'choose') return false;
532
+ if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
533
+ return false;
534
+ },
535
+ 'svg': adaptor.theme_dir + 'symbols/parallel_branch.svg'
536
+ },//}}}
537
+ 'description': '<parallel_branch xmlns="http://cpee.org/ns/description/1.0"/>',
538
+ 'permissible_children': function(node) { //{{{
539
+ var func = null;
540
+ var childs = null;
541
+ if(node.get(0).tagName == 'parallel_branch') { func = adaptor.description.insert_first_into }
542
+ else { func = adaptor.description.insert_after }
543
+ childs = [
544
+ {'label': 'Service Call with Scripts',
545
+ 'function_call': func,
546
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
547
+ 'params': [adaptor.description.elements.callmanipulate, node]},
548
+ {'label': 'Service Call',
549
+ 'function_call': func,
550
+ 'menu_icon': elements.call.illustrator.svg,
551
+ 'params': [adaptor.description.elements.call, node]},
552
+ {'label': 'Script',
553
+ 'function_call': func,
554
+ 'menu_icon': elements.manipulate.illustrator.svg,
555
+ 'params': [adaptor.description.elements.manipulate, node]},
556
+ {'label': 'Parallel',
557
+ 'function_call': func,
558
+ 'menu_icon': elements.parallel.illustrator.svg,
559
+ 'params': [adaptor.description.elements.parallel, node]},
560
+ {'label': 'Choose',
561
+ 'function_call': func,
562
+ 'menu_icon': elements.choose.illustrator.svg,
563
+ 'params': [adaptor.description.elements.choose, node]},
564
+ {'label': 'Loop',
565
+ 'function_call': func,
566
+ 'menu_icon': elements.loop.illustrator.svg,
567
+ 'params': [adaptor.description.elements.loop, node]},
568
+ {'label': 'Critical',
569
+ 'function_call': func,
570
+ 'menu_icon': elements.critical.illustrator.svg,
571
+ 'params': [adaptor.description.elements.critical, node]},
572
+ ];
573
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
574
+ return [{'label': 'Alternative',
575
+ 'function_call': func,
576
+ 'menu_icon': elements.alternative.illustrator.svg,
577
+ 'params': [adaptor.description.elements.alternative, node]}];
578
+ }
579
+ return childs;
580
+ }, //}}}
581
+ 'adaptor' : {//{{{
582
+ 'mousedown': function (node, e) {
583
+ events.mousedown(node,e,true, false);
584
+ },
585
+ 'click': events.click,
586
+ 'dblclick': events.dblclick,
587
+ 'mouseover': events.mouseover,
588
+ 'mouseout': events.mouseout,
589
+ }//}}}
590
+ }; /*}}}*/
591
+ this.elements.critical = { /*{{{*/
592
+ 'illustrator': {//{{{
593
+ 'type' : 'complex',
594
+ 'endnodes' : 'aggregate',
595
+ 'closeblock' : false,
596
+ 'border': true,
597
+ 'expansion' : function(node) {
598
+ return 'vertical';
599
+ },
600
+ 'col_shift' : function(node) {
601
+ return true;
602
+ },
603
+ 'svg': adaptor.theme_dir + 'symbols/critical.svg'
604
+ },//}}}
605
+ 'description': '<critical sid="section" xmlns="http://cpee.org/ns/description/1.0"/>',
606
+ 'permissible_children': function(node) { //{{{
607
+ var func = null;
608
+ if(node.get(0).tagName == 'critical') { func = adaptor.description.insert_first_into }
609
+ else { func = adaptor.description.insert_after }
610
+ return [
611
+ {'label': 'Service Call with Scripts',
612
+ 'function_call': func,
613
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
614
+ 'params': [adaptor.description.elements.callmanipulate, node]},
615
+ {'label': 'Service Call',
616
+ 'function_call': func,
617
+ 'menu_icon': elements.call.illustrator.svg,
618
+ 'params': [adaptor.description.elements.call, node]},
619
+ {'label': 'Script',
620
+ 'function_call': func,
621
+ 'menu_icon': elements.manipulate.illustrator.svg,
622
+ 'params': [adaptor.description.elements.manipulate, node]},
623
+ {'label': 'Parallel',
624
+ 'function_call': func,
625
+ 'menu_icon': elements.parallel.illustrator.svg,
626
+ 'params': [adaptor.description.elements.parallel, node]},
627
+ {'label': 'Choose',
628
+ 'function_call': func,
629
+ 'menu_icon': elements.choose.illustrator.svg,
630
+ 'params': [adaptor.description.elements.choose, node]},
631
+ {'label': 'Loop',
632
+ 'function_call': func,
633
+ 'menu_icon': elements.loop.illustrator.svg,
634
+ 'params': [adaptor.description.elements.loop, node]},
635
+ {'label': 'Critical',
636
+ 'function_call': func,
637
+ 'menu_icon': elements.critical.illustrator.svg,
638
+ 'params': [adaptor.description.elements.critical, node]},
639
+ ];
640
+ }, //}}}
641
+ 'adaptor' : {//{{{
642
+ 'mousedown': function (node, e) {
643
+ events.mousedown(node,e,true, true);
644
+ },
645
+ 'click': events.click,
646
+ 'dblclick': events.dblclick,
647
+ 'mouseover': events.mouseover,
648
+ 'mouseout': events.mouseout,
649
+ }//}}}
650
+ }; /*}}}*/
651
+ this.elements.group = { /*{{{*/
652
+ 'illustrator': {//{{{
653
+ 'type' : 'complex',
654
+ 'endnodes' : 'aggregate',
655
+ 'closeblock' : false,
656
+ 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
657
+ 'expansion' : function(node) {
658
+ return 'vertical';
659
+ },
660
+ 'col_shift' : function(node) {
661
+ return true;
662
+ },
663
+ 'svg': null
664
+ },//}}}
665
+ 'description': '<group xmlns="http://cpee.org/ns/description/1.0"/>',
666
+ 'permissible_children': function(node) { //{{{
667
+ var func = null;
668
+ if(node.get(0).tagName == 'group') { func = adaptor.description.insert_first_into }
669
+ else { func = adaptor.description.insert_after }
670
+ return [
671
+ ];
672
+ }, //}}}
673
+ 'adaptor' : {//{{{
674
+ 'mousedown': function (node, e) {
675
+ events.mousedown(node,e,true, true);
676
+ },
677
+ 'click': events.click,
678
+ 'dblclick': events.dblclick,
679
+ 'mouseover': events.mouseover,
680
+ 'mouseout': events.mouseout,
681
+ }//}}}
682
+ }; /*}}}*/
683
+ this.elements.start = this.elements.description = { /*{{{*/
684
+ 'illustrator': {//{{{
685
+ 'type' : 'description',
686
+ 'endnodes' : 'passthrough',
687
+ 'closeblock' : false,
688
+ 'expansion' : function(node) {
689
+ return 'vertical';
690
+ },
691
+ 'col_shift' : function(node) {
692
+ return true;
693
+ },
694
+ 'svg': adaptor.theme_dir + 'symbols/start.svg'
695
+ },//}}}
696
+ 'description': null,
697
+ 'permissible_children': function(node) { //{{{
698
+ var func = null;
699
+ if(node.get(0).tagName == 'description') { func = adaptor.description.insert_first_into }
700
+ else { func = adaptor.description.insert_after }
701
+ return [
702
+ {'label': 'Service Call with Scripts',
703
+ 'function_call': func,
704
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
705
+ 'params': [adaptor.description.elements.callmanipulate, node]},
706
+ {'label': 'Service Call',
707
+ 'function_call': func,
708
+ 'menu_icon': elements.call.illustrator.svg,
709
+ 'params': [adaptor.description.elements.call, node]},
710
+ {'label': 'Script Task',
711
+ 'function_call': func,
712
+ 'menu_icon': elements.manipulate.illustrator.svg,
713
+ 'params': [adaptor.description.elements.manipulate, node]},
714
+ {'label': 'Parallel',
715
+ 'function_call': func,
716
+ 'menu_icon': elements.parallel.illustrator.svg,
717
+ 'params': [adaptor.description.elements.parallel, node]},
718
+ {'label': 'Choose',
719
+ 'function_call': func,
720
+ 'menu_icon': elements.choose.illustrator.svg,
721
+ 'params': [adaptor.description.elements.choose, node]},
722
+ {'label': 'Loop',
723
+ 'function_call': func,
724
+ 'menu_icon': elements.loop.illustrator.svg,
725
+ 'params': [adaptor.description.elements.loop, node]},
726
+ {'label': 'Critical',
727
+ 'function_call': func,
728
+ 'menu_icon': elements.critical.illustrator.svg,
729
+ 'params': [adaptor.description.elements.critical, node]}
730
+ ];
731
+ }, //}}}
732
+ 'adaptor' : {//{{{
733
+ 'mousedown': function (node, e) {
734
+ events.mousedown(node,e,true, false);
735
+ },
736
+ 'click': events.click,
737
+ 'dblclick': events.dblclick,
738
+ 'mouseover': events.mouseover,
739
+ 'mouseout': events.mouseout,
740
+ }//}}}
741
+ }; /*}}}*/
742
+ }