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
@@ -13,14 +13,14 @@
13
13
  <parameters>
14
14
  <label>"OK OR NOT OK"</label>
15
15
  <method>:post</method>
16
- <parameters>
16
+ <arguments>
17
17
  <orgmodel>"organisation1"</orgmodel>
18
18
  <domain>"Virtual Business 1"</domain>
19
19
  <form>"http://cpee.org/forms/form-f.html"</form>
20
20
  <role>"regular"</role>
21
21
  <schaden>"55546"</schaden>
22
22
  <text>"fetzen hin"</text>
23
- </parameters>
23
+ </arguments>
24
24
  </parameters>
25
25
  <manipulate>data.bla = result.value</manipulate>
26
26
  </call>
@@ -13,14 +13,14 @@
13
13
  <parameters>
14
14
  <label>"OK OR NOT OK"</label>
15
15
  <method>:post</method>
16
- <parameters>
16
+ <arguments>
17
17
  <orgmodel>"organisation1"</orgmodel>
18
18
  <domain>"Virtual Business 1"</domain>
19
19
  <form>"http://solo.wst.univie.ac.at/form/form-f.html"</form>
20
20
  <role>"regular"</role>
21
21
  <schaden>"55546"</schaden>
22
22
  <text>"fetzen hin"</text>
23
- </parameters>
23
+ </arguments>
24
24
  </parameters>
25
25
  <finalize>data.bla = result.value</finalize>
26
26
  </call>
@@ -1,4 +1,5 @@
1
1
  <testsets>
2
+ <testset>Assline</testset>
2
3
  <testset>Infinity</testset>
3
4
  <testset>SOPROMO Test Sonification</testset>
4
5
  <testset>Linear</testset>
@@ -19,4 +20,5 @@
19
20
  <testset>Worklist Test CPEE</testset>
20
21
  <testset>Worklist Parallel</testset>
21
22
  <testset>Update</testset>
23
+ <testset>Promise</testset>
22
24
  </testsets>
@@ -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,29 @@
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>
@@ -1,11 +1,11 @@
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">
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
3
  <data type="string" rngui:readonly="true"/>
4
4
  </attribute>
5
5
  <attribute name="endpoint" rngui:label="Endpoint">
6
6
  <data type="string"/>
7
7
  </attribute>
8
- <element name='parameters'>
8
+ <element name='parameters' rngui:header="Parameters">
9
9
  <element name="label" rngui:label="Label">
10
10
  <data type="string" rngui:label="Short description of the task"/>
11
11
  </element>
@@ -18,22 +18,22 @@
18
18
  </choice>
19
19
  </element>
20
20
  <element name="arguments" rngui:header="Arguments">
21
- <zeroOrMore rngui:label="Create Argument Pairs">
21
+ <zeroOrMore rngui:label="Create Argument Pair">
22
22
  <element rngui:label='Name'>
23
23
  <anyName/>
24
24
  <data type="string" rngui:label="Value"/>
25
25
  </element>
26
26
  </zeroOrMore>
27
- </element>
27
+ </element>
28
28
  </element>
29
- <element name="finalize" rngui:label="Finalize">
30
- <attribute name="output" rngui:label="In Variable">
29
+ <element name="finalize" rngui:header="Finalize" rngui:label="Code">
30
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
31
31
  <data type="string" rngui:readonly="true"/>
32
32
  </attribute>
33
33
  <text rngui:label='Script that is executed, when a service returns data'/>
34
34
  </element>
35
- <element name="update" rngui:label="Update">
36
- <attribute name="output" rngui:label="In Variable">
35
+ <element name="update" rngui:header="Update" rngui:label="Code">
36
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
37
37
  <data type="string" rngui:readonly="true"/>
38
38
  </attribute>
39
39
  <text rngui:label='Script that is executed, when a service sends intermediate data'/>
@@ -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 @@
1
+ <element rngui:version="1.2" name="escape" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org"/>
@@ -0,0 +1,6 @@
1
+ <element name="finalize" rngui:version="1.2" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ <text rngui:label='Script that is executed, when a service returns data'/>
6
+ </element>
@@ -0,0 +1,3 @@
1
+ <element name="group" rngui:version="1.2" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <text rngui:label='A group of tasks, that belongs together'/>
3
+ </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 @@
1
+ <element rngui:version="1.2" name="otherwise" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org"/>
@@ -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,6 @@
1
+ <element name="update" rngui:version="1.2" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
2
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
3
+ <data type="string" rngui:readonly="true"/>
4
+ </attribute>
5
+ <text rngui:label='Script that is executed, when a service sends intermediate data'/>
6
+ </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.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>
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.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>
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,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,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,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
+ <text transform="translate(15,25)" class="normallarge">+</text>
4
+ </svg>
5
+
@@ -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,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,729 @@
1
+ function WFAdaptorManifestation(adaptor) {
2
+ var self = this;
3
+
4
+ this.adaptor = adaptor;
5
+ this.elements = {};
6
+ this.events = {};
7
+
8
+ this.noarrow = ['alternative', 'otherwise'];
9
+ this.source = function(rng) {
10
+ $('#relaxngworker').empty();
11
+ var rngw = new RelaxNGui(rng,$('#relaxngworker'),self.adaptor.description.context_eval);
12
+ return $(rngw.save().documentElement);
13
+ };
14
+
15
+ // Events
16
+ this.events.mousedown = function(svgid, e, child, sibling) { // {{{
17
+ if(e.button == 0) { // left-click
18
+ } else if(e.button == 1) { // middle-click
19
+ } else if(e.button == 2) { // right-click
20
+ var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
21
+ var group = null;
22
+ var menu = {};
23
+
24
+ if (child) {
25
+ group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node);
26
+ if(group.length > 0) menu['Insert into'] = group;
27
+ }
28
+ if (sibling) {
29
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node);
30
+ if(group.length > 0) menu['Insert after'] = group;
31
+ }
32
+
33
+ if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete)
34
+ var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
35
+ icon.children('.rfill').css({'fill':'#ff7f7f','fill-opacity':'1'});
36
+ menu['Delete'] = [{
37
+ 'label': 'Remove Element',
38
+ 'function_call': self.adaptor.description.remove,
39
+ 'menu_icon': icon,
40
+ 'params': [null, xml_node]
41
+ }];
42
+ if($('> finalize, > update', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
43
+ var icon = self.elements.callmanipulate.illustrator.svg.clone();
44
+ icon.children('.rfill:last').css({'fill':'#ff7f7f','fill-opacity':'1'});
45
+ menu['Delete'].push({
46
+ 'label': 'Remove Scripts',
47
+ 'function_call': self.adaptor.description.remove,
48
+ 'menu_icon': icon,
49
+ 'params': ['> finalize, > update', xml_node]
50
+ });
51
+ }
52
+ new CustomMenu(e).contextmenu(menu);
53
+ }
54
+ return false;
55
+ } // }}}
56
+ this.events.click = function(svgid, e) { // {{{
57
+ if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
58
+ return;
59
+ }
60
+
61
+ if ($('#state').text() != 'finished')
62
+ $('#main ui-behind button').show();
63
+ if ($('#main ui-behind button').hasClass('highlight')) {
64
+ var check = confirm("Discard changes?");
65
+ if (check)
66
+ $('#main ui-behind button').removeClass('highlight');
67
+ else
68
+ return;
69
+ }
70
+
71
+ var visid = 'details';
72
+ var tab = $('#dat_' + visid);
73
+ var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
74
+
75
+ save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
76
+
77
+ tab.empty();
78
+ save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
79
+ save[visid].content(node);
80
+ } // }}}
81
+ this.events.dblclick = function(svgid, e) { // {{{
82
+ } // }}}
83
+ this.events.mouseover = function(svgid, e) { // {{{
84
+ $('.tile[element-id = "' + svgid + '"]').css('display','block');
85
+ return false;
86
+ } // }}}
87
+ this.events.mouseout = function(svgid, e) { // {{{
88
+ $('.tile[element-id = "' + svgid + '"]').css('display','none');
89
+ return false;
90
+ } // }}}
91
+ this.events.dragstart = function (svgid, e) { //{{{
92
+ } //}}}
93
+
94
+ // Primitive Elements
95
+ this.elements.call = { /*{{{*/
96
+ 'type' : 'primitive',
97
+ 'illustrator': {//{{{
98
+ 'endnodes' : 'this',
99
+ 'resolve_symbol' : function(node) {
100
+ if($(node).attr('endpoint') == 'instantiation') {
101
+ return 'callinstantiation';
102
+ } else if($(node).attr('endpoint') == 'correlation') {
103
+ return 'callcorrelation';
104
+ } else if($('parameters > service', node).length > 0) {
105
+ return 'callinjection';
106
+ } else if($('finalize,update', node).length > 0) {
107
+ return 'callmanipulate';
108
+ } else {
109
+ return'call';
110
+ }
111
+ },
112
+ 'svg': self.adaptor.theme_dir + 'symbols/call.svg'
113
+ },//}}}
114
+ 'description': self.adaptor.theme_dir + 'rngs/call.rng',
115
+ 'permissible_children': function(node) { //{{{
116
+ if(node.children('finalize,update').length < 1)
117
+ return [
118
+ {'label': 'Scripts',
119
+ 'function_call': self.adaptor.description.insert_last_into,
120
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
121
+ 'params': [self.adaptor.description.elements.scripts, node]}
122
+ ];
123
+ return [];
124
+ }, //}}}
125
+ 'adaptor' : {//{{{
126
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
127
+ 'click': self.events.click,
128
+ 'dragstart': self.events.dragstart,
129
+ }//}}}
130
+ }; /*}}}*/
131
+ this.elements.manipulate = { /*{{{*/
132
+ 'type' : 'primitive',
133
+ 'illustrator': {//{{{
134
+ 'endnodes' : 'this',
135
+ 'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
136
+ },//}}}
137
+ 'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
138
+ 'permissible_children': function(node) { //{{{
139
+ return [];
140
+ }, //}}}
141
+ 'adaptor' : {//{{{
142
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
143
+ 'click': self.events.click,
144
+ }//}}}
145
+ }; /*}}}*/
146
+ this.elements.escape = { /*{{{*/
147
+ 'type' : 'primitive',
148
+ 'illustrator': {//{{{
149
+ 'endnodes' : 'this',
150
+ 'svg': self.adaptor.theme_dir + 'symbols/escape.svg'
151
+ },//}}}
152
+ 'description': self.adaptor.theme_dir + 'rngs/escape.rng',
153
+ 'permissible_children': function(node) { //{{{
154
+ return [];
155
+ }, //}}}
156
+ 'adaptor' : {//{{{
157
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
158
+ 'click': self.events.click,
159
+ }//}}}
160
+ }; /*}}}*/
161
+
162
+ // Complex Elements
163
+ this.elements.choose = { /*{{{*/
164
+ 'type' : 'complex',
165
+ 'illustrator': {//{{{
166
+ 'endnodes' : 'aggregate',
167
+ 'closeblock': false,
168
+ 'expansion' : function(node) {
169
+ return 'horizontal';
170
+ },
171
+ 'resolve_symbol' : function(node) {
172
+ if($(node).attr('mode') == 'exclusive') {
173
+ return 'choose_exclusive';
174
+ } else {
175
+ return 'choose_inclusive';
176
+ }
177
+ },
178
+ 'col_shift' : function(node) {
179
+ return false;
180
+ },
181
+ 'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
182
+ },//}}}
183
+ 'description': self.adaptor.theme_dir + 'rngs/choose.rng',
184
+ 'permissible_children': function(node) { //{{{
185
+ var func = null;
186
+ if(node.get(0).tagName == 'choose') { func = self.adaptor.description.insert_first_into }
187
+ else { func = self.adaptor.description.insert_after }
188
+ if(node.children('parallel_branch').length > 0) {
189
+ return [{'label': 'Parallel Branch',
190
+ 'function_call': func,
191
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
192
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
193
+ }
194
+ var childs = [{'label': 'Alternative',
195
+ 'function_call': func,
196
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
197
+ 'params': [self.adaptor.description.elements.alternative, node]}];
198
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
199
+ childs.push({'label': 'Otherwise',
200
+ 'function_call': func,
201
+ 'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
202
+ 'params': [self.adaptor.description.elements.otherwise, node]});
203
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
204
+ childs.push({'label': 'Parallel Branch',
205
+ 'function_call': func,
206
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
207
+ 'params': [self.adaptor.description.elements.parallel_branch, node]});
208
+ return childs;
209
+ }, //}}}
210
+ 'adaptor' : {//{{{
211
+ 'mousedown': function (node,e) {
212
+ self.events.mousedown(node,e,true,true);
213
+ },
214
+ 'click': self.events.click,
215
+ 'dblclick': self.events.dblclick,
216
+ 'mouseover': self.events.mouseover,
217
+ 'mouseout': self.events.mouseout,
218
+ }//}}}
219
+ }; /*}}}*/
220
+ this.elements.otherwise = { /*{{{*/
221
+ 'type' : 'complex',
222
+ 'illustrator': {//{{{
223
+ 'endnodes' : 'passthrough',
224
+ 'closeblock': false,
225
+ 'expansion' : function(node) {
226
+ return 'vertical';
227
+ },
228
+ 'col_shift' : function(node) {
229
+ return false;
230
+ },
231
+ 'svg': self.adaptor.theme_dir + 'symbols/otherwise.svg'
232
+ },//}}}
233
+ 'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
234
+ 'neverdelete': true,
235
+ 'permissible_children': function(node) { //{{{
236
+ var func = null;
237
+ var childs = null;
238
+ if(node.get(0).tagName == 'otherwise') { func = self.adaptor.description.insert_first_into }
239
+ else { func = self.adaptor.description.insert_after }
240
+ return [
241
+ {'label': 'Service Call with Scripts',
242
+ 'function_call': func,
243
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
244
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
245
+ {'label': 'Service Call',
246
+ 'function_call': func,
247
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
248
+ 'params': [self.adaptor.description.elements.call, node]},
249
+ {'label': 'Script',
250
+ 'function_call': func,
251
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
252
+ 'params': [self.adaptor.description.elements.manipulate, node]},
253
+ {'label': 'Parallel',
254
+ 'function_call': func,
255
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
256
+ 'params': [self.adaptor.description.elements.parallel, node]},
257
+ {'label': 'Decision',
258
+ 'function_call': func,
259
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
260
+ 'params': [self.adaptor.description.elements.choose, node]},
261
+ {'label': 'Loop',
262
+ 'function_call': func,
263
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
264
+ 'params': [self.adaptor.description.elements.loop, node]},
265
+ {'label': 'Critical',
266
+ 'function_call': func,
267
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
268
+ 'params': [self.adaptor.description.elements.critical, node]}
269
+ ];
270
+ }, //}}}
271
+ 'adaptor' : {//{{{
272
+ 'mousedown': function (node,e) {
273
+ self.events.mousedown(node,e,true,false);
274
+ },
275
+ 'click': self.events.click,
276
+ 'dblclick': self.events.dblclick,
277
+ 'mouseover': self.events.mouseover,
278
+ 'mouseout': self.events.mouseout,
279
+ }//}}}
280
+ }; /*}}}*/
281
+ this.elements.alternative = { /*{{{*/
282
+ 'type' : 'complex',
283
+ 'illustrator': {//{{{
284
+ 'endnodes' : 'passthrough',
285
+ 'closeblock':false,
286
+ 'expansion' : function(node) {
287
+ return 'vertical';
288
+ },
289
+ 'col_shift' : function(node) {
290
+ return false;
291
+ },
292
+ 'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
293
+ },//}}}
294
+ 'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
295
+ 'permissible_children': function(node) { //{{{
296
+ if(node.get(0).tagName == 'alternative') { func = self.adaptor.description.insert_first_into }
297
+ else { func = self.adaptor.description.insert_after }
298
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
299
+ return [{'label': 'Parallel Branch',
300
+ 'function_call': func,
301
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
302
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
303
+ }
304
+ return [
305
+ {'label': 'Service Call with Scripts',
306
+ 'function_call': func,
307
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
308
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
309
+ {'label': 'Service Call',
310
+ 'function_call': func,
311
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
312
+ 'params': [self.adaptor.description.elements.call, node]},
313
+ {'label': 'Script',
314
+ 'function_call': func,
315
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
316
+ 'params': [self.adaptor.description.elements.manipulate, node]},
317
+ {'label': 'Parallel',
318
+ 'function_call': func,
319
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
320
+ 'params': [self.adaptor.description.elements.parallel, node]},
321
+ {'label': 'Decision',
322
+ 'function_call': func,
323
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
324
+ 'params': [self.adaptor.description.elements.choose, node]},
325
+ {'label': 'Loop',
326
+ 'function_call': func,
327
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
328
+ 'params': [self.adaptor.description.elements.loop, node]},
329
+ {'label': 'Critical',
330
+ 'function_call': func,
331
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
332
+ 'params': [self.adaptor.description.elements.critical, node]}
333
+ ];
334
+ }, //}}}
335
+ 'adaptor' : {//{{{
336
+ 'mousedown': function (node,e) {
337
+ self.events.mousedown(node,e,true,false);
338
+ },
339
+ 'click': self.events.click,
340
+ 'dblclick': self.events.dblclick,
341
+ 'mouseover': self.events.mouseover,
342
+ 'mouseout': self.events.mouseout,
343
+ }//}}}
344
+ }; /*}}}*/
345
+ this.elements.loop = { /*{{{*/
346
+ 'type' : 'complex',
347
+ 'illustrator': {//{{{
348
+ 'endnodes' : 'this',
349
+ 'closeblock' : true,
350
+ 'expansion' : function(node) {
351
+ return 'vertical';
352
+ },
353
+ 'col_shift' : function(node) {
354
+ return true;
355
+ },
356
+ 'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
357
+ },// }}}
358
+ 'description': self.adaptor.theme_dir + 'rngs/loop.rng',
359
+ 'permissible_children': function(node) { //{{{
360
+ var func = null;
361
+ if(node.get(0).tagName == 'loop') { func = self.adaptor.description.insert_first_into }
362
+ else { func = self.adaptor.description.insert_after }
363
+ var childs = [
364
+ {'label': 'Service Call with Scripts',
365
+ 'function_call': func,
366
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
367
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
368
+ {'label': 'Service Call',
369
+ 'function_call': func,
370
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
371
+ 'params': [self.adaptor.description.elements.call, node]},
372
+ {'label': 'Manipulate',
373
+ 'function_call': func,
374
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
375
+ 'params': [self.adaptor.description.elements.manipulate, node]},
376
+ {'label': 'Decision',
377
+ 'function_call': func,
378
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
379
+ 'params': [self.adaptor.description.elements.choose, node]},
380
+ {'label': 'Loop',
381
+ 'function_call': func,
382
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
383
+ 'params': [self.adaptor.description.elements.loop, node]},
384
+ {'label': 'Critical',
385
+ 'function_call': func,
386
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
387
+ 'params': [self.adaptor.description.elements.critical, node]}
388
+ ];
389
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
390
+ childs.push({'label': 'Parallel Branch',
391
+ 'function_call': func,
392
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
393
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}
394
+ );
395
+ } else {
396
+ childs.push({'label': 'Parallel',
397
+ 'function_call': func,
398
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
399
+ 'params': [self.adaptor.description.elements.parallel, node]}
400
+ );
401
+ }
402
+ return childs;
403
+ }, //}}}
404
+ 'adaptor' : {//{{{
405
+ 'mousedown': function (node,e) {
406
+ self.events.mousedown(node,e,true,true);
407
+ },
408
+ 'click': self.events.click,
409
+ 'dblclick': self.events.dblclick,
410
+ 'mouseover': self.events.mouseover,
411
+ 'mouseout': self.events.mouseout,
412
+ }//}}}
413
+ }; /*}}}*/
414
+ this.elements.parallel = { /*{{{*/
415
+ 'type' : 'complex',
416
+ 'illustrator': {//{{{
417
+ 'endnodes' : 'this',
418
+ 'closeblock' : false,
419
+ 'border': true,
420
+ 'expansion' : function(node) {
421
+ // check if any sibling other than 'parallel_branch' is present
422
+ if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
423
+ return 'horizontal';
424
+ },
425
+ 'col_shift' : function(node) {
426
+ return true;
427
+ },
428
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
429
+ },//}}}
430
+ 'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
431
+ 'permissible_children': function(node) { //{{{
432
+ var childs = [
433
+ {'label': 'Service Call with Scripts',
434
+ 'function_call': self.adaptor.description.insert_last_into,
435
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
436
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
437
+ {'label': 'Service Call',
438
+ 'function_call': self.adaptor.description.insert_last_into,
439
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
440
+ 'params': [self.adaptor.description.elements.call, node]},
441
+ {'label': 'Manipulate',
442
+ 'function_call': self.adaptor.description.insert_last_into,
443
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
444
+ 'params': [self.adaptor.description.elements.manipulate, node]},
445
+ {'label': 'Decision',
446
+ 'function_call': self.adaptor.description.insert_last_into,
447
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
448
+ 'params': [self.adaptor.description.elements.choose, node]},
449
+ {'label': 'Loop',
450
+ 'function_call': self.adaptor.description.insert_last_into,
451
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
452
+ 'params': [self.adaptor.description.elements.loop, node]},
453
+ {'label': 'Critical',
454
+ 'function_call': self.adaptor.description.insert_last_into,
455
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
456
+ 'params': [self.adaptor.description.elements.critical, node]},
457
+ {'label': 'Parallel Branch',
458
+ 'function_call': self.adaptor.description.insert_last_into,
459
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
460
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}
461
+ ];
462
+ if(node.get(0).tagName != 'parallel')
463
+ childs.push({'label': 'Parallel',
464
+ 'function_call': self.adaptor.description.insert_last_into,
465
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
466
+ 'params': [self.adaptor.description.elements.parallel, node]});
467
+ return childs;
468
+ }, //}}}
469
+ 'adaptor' : {//{{{
470
+ 'mousedown': function (node,e) {
471
+ self.events.mousedown(node,e,true,true);
472
+ },
473
+ 'click': self.events.click,
474
+ 'dblclick': self.events.dblclick,
475
+ 'mouseover': self.events.mouseover,
476
+ 'mouseout': self.events.mouseout,
477
+ }//}}}
478
+ }; /*}}}*/
479
+ this.elements.parallel_branch = { /*{{{*/
480
+ 'type' : 'complex',
481
+ 'illustrator': {//{{{
482
+ 'endnodes' : 'this',
483
+ 'closeblock' : false,
484
+ 'expansion' : function(node) {
485
+ return 'vertical';
486
+ },
487
+ 'col_shift' : function(node) {
488
+ if(node.parentNode.tagName == 'choose') return false;
489
+ if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
490
+ return false;
491
+ },
492
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
493
+ },//}}}
494
+ 'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
495
+ 'permissible_children': function(node) { //{{{
496
+ var func = null;
497
+ var childs = null;
498
+ if(node.get(0).tagName == 'parallel_branch') { func = self.adaptor.description.insert_first_into }
499
+ else { func = self.adaptor.description.insert_after }
500
+ childs = [
501
+ {'label': 'Service Call with Scripts',
502
+ 'function_call': func,
503
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
504
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
505
+ {'label': 'Service Call',
506
+ 'function_call': func,
507
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
508
+ 'params': [self.adaptor.description.elements.call, node]},
509
+ {'label': 'Script',
510
+ 'function_call': func,
511
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
512
+ 'params': [self.adaptor.description.elements.manipulate, node]},
513
+ {'label': 'Parallel',
514
+ 'function_call': func,
515
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
516
+ 'params': [self.adaptor.description.elements.parallel, node]},
517
+ {'label': 'Decision',
518
+ 'function_call': func,
519
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
520
+ 'params': [self.adaptor.description.elements.choose, node]},
521
+ {'label': 'Loop',
522
+ 'function_call': func,
523
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
524
+ 'params': [self.adaptor.description.elements.loop, node]},
525
+ {'label': 'Critical',
526
+ 'function_call': func,
527
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
528
+ 'params': [self.adaptor.description.elements.critical, node]},
529
+ ];
530
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
531
+ return [{'label': 'Alternative',
532
+ 'function_call': func,
533
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
534
+ 'params': [self.adaptor.description.elements.alternative, node]}];
535
+ }
536
+ return childs;
537
+ }, //}}}
538
+ 'adaptor' : {//{{{
539
+ 'mousedown': function (node,e) {
540
+ self.events.mousedown(node,e,true,false);
541
+ },
542
+ 'click': self.events.click,
543
+ 'dblclick': self.events.dblclick,
544
+ 'mouseover': self.events.mouseover,
545
+ 'mouseout': self.events.mouseout,
546
+ }//}}}
547
+ }; /*}}}*/
548
+ this.elements.critical = { /*{{{*/
549
+ 'type' : 'complex',
550
+ 'illustrator': {//{{{
551
+ 'endnodes' : 'aggregate',
552
+ 'closeblock' : false,
553
+ 'border': true,
554
+ 'expansion' : function(node) {
555
+ return 'vertical';
556
+ },
557
+ 'col_shift' : function(node) {
558
+ return true;
559
+ },
560
+ 'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
561
+ },//}}}
562
+ 'description': self.adaptor.theme_dir + 'rngs/critical.rng',
563
+ 'permissible_children': function(node) { //{{{
564
+ var func = null;
565
+ if(node.get(0).tagName == 'critical') { func = self.adaptor.description.insert_first_into }
566
+ else { func = self.adaptor.description.insert_after }
567
+ return [
568
+ {'label': 'Service Call with Scripts',
569
+ 'function_call': func,
570
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
571
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
572
+ {'label': 'Service Call',
573
+ 'function_call': func,
574
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
575
+ 'params': [self.adaptor.description.elements.call, node]},
576
+ {'label': 'Script',
577
+ 'function_call': func,
578
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
579
+ 'params': [self.adaptor.description.elements.manipulate, node]},
580
+ {'label': 'Parallel',
581
+ 'function_call': func,
582
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
583
+ 'params': [self.adaptor.description.elements.parallel, node]},
584
+ {'label': 'Decision',
585
+ 'function_call': func,
586
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
587
+ 'params': [self.adaptor.description.elements.choose, node]},
588
+ {'label': 'Loop',
589
+ 'function_call': func,
590
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
591
+ 'params': [self.adaptor.description.elements.loop, node]},
592
+ {'label': 'Critical',
593
+ 'function_call': func,
594
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
595
+ 'params': [self.adaptor.description.elements.critical, node]},
596
+ ];
597
+ }, //}}}
598
+ 'adaptor' : {//{{{
599
+ 'mousedown': function (node,e) {
600
+ self.events.mousedown(node,e,true,true);
601
+ },
602
+ 'click': self.events.click,
603
+ 'dblclick': self.events.dblclick,
604
+ 'mouseover': self.events.mouseover,
605
+ 'mouseout': self.events.mouseout,
606
+ }//}}}
607
+ }; /*}}}*/
608
+ this.elements.group = { /*{{{*/
609
+ 'type' : 'complex',
610
+ 'illustrator': {//{{{
611
+ 'endnodes' : 'aggregate',
612
+ 'closeblock' : false,
613
+ 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
614
+ 'expansion' : function(node) {
615
+ return 'vertical';
616
+ },
617
+ 'col_shift' : function(node) {
618
+ return true;
619
+ },
620
+ 'svg': null
621
+ },//}}}
622
+ 'description': self.adaptor.theme_dir + 'rngs/group.rng',
623
+ 'permissible_children': function(node) { //{{{
624
+ var func = null;
625
+ if(node.get(0).tagName == 'group') { func = self.adaptor.description.insert_first_into }
626
+ else { func = self.adaptor.description.insert_after }
627
+ return [
628
+ ];
629
+ }, //}}}
630
+ 'adaptor' : {//{{{
631
+ 'mousedown': function (node,e) {
632
+ self.events.mousedown(node,e,true,true);
633
+ },
634
+ 'click': self.events.click,
635
+ 'dblclick': self.events.dblclick,
636
+ 'mouseover': self.events.mouseover,
637
+ 'mouseout': self.events.mouseout,
638
+ }//}}}
639
+ }; /*}}}*/
640
+ this.elements.start = this.elements.description = { /*{{{*/
641
+ 'type' : 'description',
642
+ 'illustrator': {//{{{
643
+ 'endnodes' : 'passthrough',
644
+ 'closeblock' : false,
645
+ 'expansion' : function(node) {
646
+ return 'vertical';
647
+ },
648
+ 'col_shift' : function(node) {
649
+ return true;
650
+ },
651
+ 'svg': self.adaptor.theme_dir + 'symbols/start.svg'
652
+ },//}}}
653
+ 'description': null,
654
+ 'permissible_children': function(node) { //{{{
655
+ var func = null;
656
+ if(node.get(0).tagName == 'description') { func = self.adaptor.description.insert_first_into }
657
+ else { func = self.adaptor.description.insert_after }
658
+ return [
659
+ {'label': 'Service Call with Scripts',
660
+ 'function_call': func,
661
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
662
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
663
+ {'label': 'Service Call',
664
+ 'function_call': func,
665
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
666
+ 'params': [self.adaptor.description.elements.call, node]},
667
+ {'label': 'Script Task',
668
+ 'function_call': func,
669
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
670
+ 'params': [self.adaptor.description.elements.manipulate, node]},
671
+ {'label': 'Parallel',
672
+ 'function_call': func,
673
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
674
+ 'params': [self.adaptor.description.elements.parallel, node]},
675
+ {'label': 'Decision',
676
+ 'function_call': func,
677
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
678
+ 'params': [self.adaptor.description.elements.choose, node]},
679
+ {'label': 'Loop',
680
+ 'function_call': func,
681
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
682
+ 'params': [self.adaptor.description.elements.loop, node]},
683
+ {'label': 'Critical',
684
+ 'function_call': func,
685
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
686
+ 'params': [self.adaptor.description.elements.critical, node]}
687
+ ];
688
+ }, //}}}
689
+ 'adaptor' : {//{{{
690
+ 'mousedown': function (node,e) {
691
+ self.events.mousedown(node,e,true,false);
692
+ },
693
+ 'click': self.events.click,
694
+ 'dblclick': self.events.dblclick,
695
+ 'mouseover': self.events.mouseover,
696
+ 'mouseout': self.events.mouseout,
697
+ }//}}}
698
+ }; /*}}}*/
699
+
700
+ // Abstract Elements
701
+ // * they may only have an illustrator (or other parts)
702
+ // * they HAVE TO have a parent
703
+ this.elements.callmanipulate = { /*{{{*/
704
+ 'type' : 'abstract',
705
+ 'parent': 'call',
706
+ 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
707
+ 'illustrator': {//{{{
708
+ 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
709
+ },//}}}
710
+ }; /*}}}*/
711
+ this.elements.choose_inclusive = { /*{{{*/
712
+ 'type' : 'abstract',
713
+ 'parent': 'choose',
714
+ 'illustrator': {//{{{
715
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
716
+ },//}}}
717
+ }; /*}}}*/
718
+ this.elements.choose_exclusive = { /*{{{*/
719
+ 'type' : 'abstract',
720
+ 'parent': 'choose',
721
+ 'illustrator': {//{{{
722
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
723
+ },//}}}
724
+ }; /*}}}*/
725
+ this.elements.scripts = { /*{{{*/
726
+ 'type' : 'abstract',
727
+ 'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
728
+ }; /*}}}*/
729
+ }