cpee 1.3.223 → 1.3.224

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +14 -14
  3. data/cockpit/css/wfadaptor.css +50 -0
  4. data/cockpit/graph.html +116 -0
  5. data/cockpit/index.html +41 -41
  6. data/cockpit/js/instance.js +15 -5
  7. data/cockpit/js/ui.js +5 -11
  8. data/cockpit/js/wfadaptor.js +20 -7
  9. data/cockpit/themes/{labels → compact}/theme.js +199 -48
  10. data/cockpit/themes/default/rngs/call.rng +26 -0
  11. data/cockpit/themes/default/rngs/callmanipulate.rng +29 -0
  12. data/cockpit/themes/default/rngs/manipulate.rng +3 -0
  13. data/cockpit/themes/default/symbols/alternative.svg +1 -1
  14. data/cockpit/themes/default/symbols/arrow.svg +3 -0
  15. data/cockpit/themes/default/symbols/call.svg +1 -1
  16. data/cockpit/themes/default/symbols/callcorrelationreceive.svg +1 -1
  17. data/cockpit/themes/default/symbols/callcorrelationsend.svg +2 -2
  18. data/cockpit/themes/default/symbols/callinstantiation.svg +1 -1
  19. data/cockpit/themes/default/symbols/callmanipulate.svg +1 -1
  20. data/cockpit/themes/default/symbols/callmanipulateworklist.svg +2 -2
  21. data/cockpit/themes/default/symbols/callworklist.svg +1 -1
  22. data/cockpit/themes/default/symbols/choose.svg +1 -1
  23. data/cockpit/themes/default/symbols/choose_exclusive.svg +1 -1
  24. data/cockpit/themes/default/symbols/choose_inclusive.svg +1 -1
  25. data/cockpit/themes/default/symbols/critical.svg +2 -2
  26. data/cockpit/themes/default/symbols/escape.svg +1 -1
  27. data/cockpit/themes/default/symbols/loop.svg +1 -1
  28. data/cockpit/themes/default/symbols/manipulate.svg +1 -1
  29. data/cockpit/themes/default/symbols/otherwise.svg +1 -1
  30. data/cockpit/themes/default/symbols/parallel.svg +1 -1
  31. data/cockpit/themes/default/symbols/parallel_branch.svg +1 -1
  32. data/cockpit/themes/default/symbols/scripts.svg +1 -1
  33. data/cockpit/themes/default/theme.js +198 -57
  34. data/cockpit/themes/lego/theme.js +459 -400
  35. data/cockpit/themes/promise/theme.js +459 -400
  36. data/cpee.gemspec +1 -1
  37. data/server/resources/transformation_dslx.xsl +98 -0
  38. metadata +5 -67
  39. data/cockpit/themes/adventure/rngs/alternative.rng +0 -5
  40. data/cockpit/themes/adventure/rngs/call.rng +0 -29
  41. data/cockpit/themes/adventure/rngs/callmanipulate.rng +0 -41
  42. data/cockpit/themes/adventure/rngs/choose.rng +0 -8
  43. data/cockpit/themes/adventure/rngs/critical.rng +0 -5
  44. data/cockpit/themes/adventure/rngs/escape.rng +0 -1
  45. data/cockpit/themes/adventure/rngs/finalize.rng +0 -6
  46. data/cockpit/themes/adventure/rngs/group.rng +0 -3
  47. data/cockpit/themes/adventure/rngs/loop.rng +0 -11
  48. data/cockpit/themes/adventure/rngs/manipulate.rng +0 -6
  49. data/cockpit/themes/adventure/rngs/otherwise.rng +0 -1
  50. data/cockpit/themes/adventure/rngs/parallel.rng +0 -5
  51. data/cockpit/themes/adventure/rngs/parallel_branch.rng +0 -8
  52. data/cockpit/themes/adventure/rngs/update.rng +0 -6
  53. data/cockpit/themes/adventure/symbols/alternative.svg +0 -4
  54. data/cockpit/themes/adventure/symbols/call.svg +0 -4
  55. data/cockpit/themes/adventure/symbols/callmanipulate.svg +0 -6
  56. data/cockpit/themes/adventure/symbols/choose.svg +0 -5
  57. data/cockpit/themes/adventure/symbols/choose_exclusive.svg +0 -5
  58. data/cockpit/themes/adventure/symbols/choose_inclusive.svg +0 -4
  59. data/cockpit/themes/adventure/symbols/critical.svg +0 -4
  60. data/cockpit/themes/adventure/symbols/escape.svg +0 -5
  61. data/cockpit/themes/adventure/symbols/loop.svg +0 -5
  62. data/cockpit/themes/adventure/symbols/manipulate.svg +0 -4
  63. data/cockpit/themes/adventure/symbols/otherwise.svg +0 -4
  64. data/cockpit/themes/adventure/symbols/parallel.svg +0 -5
  65. data/cockpit/themes/adventure/symbols/parallel_branch.svg +0 -4
  66. data/cockpit/themes/adventure/symbols/scripts.svg +0 -4
  67. data/cockpit/themes/adventure/symbols/start.svg +0 -3
  68. data/cockpit/themes/adventure/theme.js +0 -739
  69. data/cockpit/themes/labels/rngs/alternative.rng +0 -5
  70. data/cockpit/themes/labels/rngs/call.rng +0 -32
  71. data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -47
  72. data/cockpit/themes/labels/rngs/choose.rng +0 -8
  73. data/cockpit/themes/labels/rngs/critical.rng +0 -5
  74. data/cockpit/themes/labels/rngs/escape.rng +0 -1
  75. data/cockpit/themes/labels/rngs/finalize.rng +0 -6
  76. data/cockpit/themes/labels/rngs/group.rng +0 -3
  77. data/cockpit/themes/labels/rngs/loop.rng +0 -11
  78. data/cockpit/themes/labels/rngs/manipulate.rng +0 -6
  79. data/cockpit/themes/labels/rngs/otherwise.rng +0 -1
  80. data/cockpit/themes/labels/rngs/parallel.rng +0 -5
  81. data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
  82. data/cockpit/themes/labels/rngs/update.rng +0 -6
  83. data/cockpit/themes/labels/symbols/alternative.svg +0 -4
  84. data/cockpit/themes/labels/symbols/call.svg +0 -4
  85. data/cockpit/themes/labels/symbols/callcorrelationreceive.svg +0 -6
  86. data/cockpit/themes/labels/symbols/callcorrelationsend.svg +0 -6
  87. data/cockpit/themes/labels/symbols/callinstantiation.svg +0 -3
  88. data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -6
  89. data/cockpit/themes/labels/symbols/callmanipulateworklist.svg +0 -6
  90. data/cockpit/themes/labels/symbols/callworklist.svg +0 -4
  91. data/cockpit/themes/labels/symbols/choose.svg +0 -5
  92. data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
  93. data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
  94. data/cockpit/themes/labels/symbols/critical.svg +0 -4
  95. data/cockpit/themes/labels/symbols/escape.svg +0 -5
  96. data/cockpit/themes/labels/symbols/loop.svg +0 -5
  97. data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
  98. data/cockpit/themes/labels/symbols/otherwise.svg +0 -4
  99. data/cockpit/themes/labels/symbols/parallel.svg +0 -5
  100. data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -4
  101. data/cockpit/themes/labels/symbols/scripts.svg +0 -4
  102. data/cockpit/themes/labels/symbols/start.svg +0 -3
@@ -26,4 +26,30 @@
26
26
  </zeroOrMore>
27
27
  </element>
28
28
  </element>
29
+ <element name="_timing" rngui:header="Timing">
30
+ <element name="_timing_min" rngui:label='Min in m'>
31
+ <data type='float' rngui:label='Minutes'/>
32
+ </element>
33
+ <element name="_timing_max" rngui:label='Max in m'>
34
+ <data type='float' rngui:label='Minutes'/>
35
+ </element>
36
+ <element name="_timing_avg" rngui:label='Avg in m'>
37
+ <data type='float' rngui:label='Minutes'/>
38
+ </element>
39
+ </element>
40
+ <element name="_notes" rngui:header="Notes">
41
+ <element name="_notes_general" rngui:label='General'>
42
+ <text rngui:wrap='true' rngui:label='Notes'/>
43
+ </element>
44
+ <element name="_attachments">
45
+ <zeroOrMore rngui:label="Create Attachment">
46
+ <element name='_attachment' rngui:label='Attachment'>
47
+ <attribute name="label" rngui:label="Note">
48
+ <data type="string"/>
49
+ </attribute>
50
+ <data type="string" rngui:label="Url"/>
51
+ </element>
52
+ </zeroOrMore>
53
+ </element>
54
+ </element>
29
55
  </element>
@@ -38,4 +38,33 @@
38
38
  </attribute>
39
39
  <text rngui:label='Script that is executed, when a service sends intermediate data'/>
40
40
  </element>
41
+ <element name="_timing" rngui:header="Timing">
42
+ <element name="_timing_min" rngui:label='Min in m'>
43
+ <data type='float' rngui:label='Minutes'/>
44
+ </element>
45
+ <element name="_timing_max" rngui:label='Max in m'>
46
+ <data type='float' rngui:label='Minutes'/>
47
+ </element>
48
+ <element name="_timing_avg" rngui:label='Avg in m'>
49
+ <data type='float' rngui:label='Minutes'/>
50
+ </element>
51
+ </element>
52
+ <element name="_notes" rngui:header="Notes">
53
+ <element name="_notes_general" rngui:label='General'>
54
+ <text rngui:wrap='true' rngui:label='Notes'/>
55
+ </element>
56
+ <element name="_notes_output" rngui:label='Output'>
57
+ <text rngui:wrap='true' rngui:label='Notes'/>
58
+ </element>
59
+ <element name="_attachments">
60
+ <zeroOrMore rngui:label="Create Attachment">
61
+ <element name='_attachment' rngui:label='Attachment'>
62
+ <attribute name="label" rngui:label="Note">
63
+ <data type="string"/>
64
+ </attribute>
65
+ <data type="string" rngui:label="Url"/>
66
+ </element>
67
+ </zeroOrMore>
68
+ </element>
69
+ </element>
41
70
  </element>
@@ -2,5 +2,8 @@
2
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
+ <attribute name="label" rngui:label="Label">
6
+ <data type="string" rngui:label="Short description of the task"/>
7
+ </attribute>
5
8
  <text rngui:label='Script that is executed'/>
6
9
  </element>
@@ -1,4 +1,4 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <circle cx="15" cy="15" r="14" class="standwithout"/>
3
- <text transform="translate(15,20)" class="cfill normal">{..}</text>
3
+ <text transform="translate(15,20)" class="htext cfill normal">{..}</text>
4
4
  </svg>
@@ -0,0 +1,3 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <path class="rfill stand" d="m 5 10 l 10 0 l 0 -5 l 10 10 l -10 10 l 0 -5 l -10 0 z"/>
3
+ </svg>
@@ -1,4 +1,4 @@
1
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 cline stand"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="hfill rfill cline stand"/>
3
3
  <path class="normal" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
4
4
  </svg>
@@ -1,6 +1,6 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <circle cx="15" cy="15" r="14" class="cline stand"/>
3
- <circle cx="15" cy="15" r="11" class="cline rfill stand"/>
3
+ <circle cx="15" cy="15" r="11" class="cline hfill rfill stand"/>
4
4
  <rect x="9" y="11" width="12" height="8" class="black" style="fill: none"/>
5
5
  <path d="m 9,11 6,4 6,-4" class="black" style="fill: none"/>
6
6
  </svg>
@@ -1,6 +1,6 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <circle cx="15" cy="15" r="14" class="cline stand"/>
3
- <circle cx="15" cy="15" r="11" class="cline rfill stand"/>
3
+ <circle cx="15" cy="15" r="11" class="cline hfill rfill stand"/>
4
4
  <rect x="9" y="11" width="12" height="8" class="black"/>
5
- <path d="m 9,11 6,3 6,-3" class="white" style="fill: none;"/>
5
+ <path d="m 9,11 6,3 6,-3" class="white hline" style="fill: none;"/>
6
6
  </svg>
@@ -1,3 +1,3 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="1" y="1" width="28" height="28" rx="4" class="cline rfill stand" style="stroke-dasharray: 1, 3;"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand" style="stroke-dasharray: 1, 3;"/>
3
3
  </svg>
@@ -1,5 +1,5 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="1" y="1" width="28" height="28" rx="4" class="cline rfill stand"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
3
3
  <path class="normal" transform="translate(-2,-2)" style="fill:#000000;" d="m 21.561187,10.184155 c 0,-0.03232 0,-0.03232 0,-0.03232 C 21.076371,9.5054099 20.494591,8.9559512 19.815848,8.4388133 l 0,0.032323 C 19.266389,8.891311 18.71693,9.3438064 18.199794,9.7963017 17.973545,9.6670167 17.779619,9.5700535 17.585693,9.4730903 17.327124,9.3438064 17.068556,9.2145213 16.777665,9.1498799 16.680695,9.1175569 16.583739,9.0852339 16.486775,9.0852339 16.422135,8.3741695 16.357491,7.6631063 16.260528,6.952042 15.937318,6.887396 15.614106,6.887396 15.258574,6.855073 c -0.09697,0 -0.193926,0 -0.258569,0 -0.09697,0 -0.193925,0 -0.258568,0 -0.323211,0.032323 -0.614101,0.032323 -0.90499,0.096969 -0.09697,0.6787425 -0.161606,1.3898068 -0.193927,2.1008712 -0.129284,0 -0.226248,0.032323 -0.355532,0.064646 -0.03232,0 -0.06465,0 -0.09697,0.032323 -0.258568,0.064646 -0.517136,0.1939264 -0.775704,0.3232103 -0.226249,0.096969 -0.420175,0.1939264 -0.614102,0.3232114 -0.549458,-0.4524953 -1.066595,-0.87267 -1.616054,-1.3251654 0,0 0,0 -0.03232,-0.032323 C 10.022552,8.5357845 9.8932693,8.6327419 9.7963053,8.7297051 9.5700583,8.8913109 9.3761314,9.0852373 9.2145262,9.2791637 8.9236366,9.5377327 8.6973883,9.8609431 8.4388194,10.184155 c 0,0 0,0 0.032323,0 0.4201747,0.549459 0.87267,1.066596 1.325166,1.616054 -0.129285,0.193927 -0.258569,0.420175 -0.355533,0.614101 -0.129285,0.258569 -0.226248,0.549459 -0.2908894,0.808028 -0.064646,0.129284 -0.096969,0.258568 -0.096969,0.355531 -0.7110644,0.06465 -1.4221288,0.129285 -2.1008713,0.226248 -0.064646,0.323211 -0.096969,0.646422 -0.096969,1.001954 0,0.484816 0.032323,0.969632 0.1292839,1.422128 0.6787437,0.06465 1.3574862,0.129284 2.0685505,0.193926 0,0.129284 0.032323,0.258569 0.096969,0.355532 0.064646,0.29089 0.1616049,0.549459 0.2908899,0.840349 0.129284,0.226247 0.2262471,0.452495 0.387853,0.646421 -0.452496,0.549459 -0.9049912,1.066596 -1.3251647,1.616054 0.484816,0.678744 1.0665957,1.260523 1.7453387,1.74534 l 0,-0.03232 c 0.517137,-0.420175 1.066596,-0.87267 1.583733,-1.325166 l 0.03232,0 c 0.161605,0.09697 0.355532,0.193928 0.517136,0.290891 0.290891,0.129284 0.614101,0.258568 0.904991,0.32321 0.129284,0.03232 0.226248,0.06465 0.32321,0.09697 0.06465,0.678743 0.129285,1.389807 0.226249,2.100871 0.290889,0.03232 0.581779,0.06465 0.90499,0.06465 0.06465,0 0.258568,0 0.484817,0 0.355532,0 0.711064,-0.03232 1.066595,-0.09697 0.06465,-0.678742 0.129285,-1.389807 0.193926,-2.10087 0.09697,-0.03232 0.193927,-0.06465 0.29089,-0.09697 l 0,0 c 0.290891,-0.06464 0.549459,-0.161605 0.808028,-0.290889 0.226248,-0.09697 0.452495,-0.226248 0.678743,-0.387854 0,0.03232 0,0.03232 0.03232,0.03232 0.517137,0.452495 1.066596,0.904989 1.616054,1.325164 0.09697,-0.06465 0.193927,-0.129284 0.323212,-0.226247 0.193926,-0.161606 0.387852,-0.355532 0.549458,-0.549459 0.29089,-0.290889 0.58178,-0.614101 0.840348,-0.969633 -0.452495,-0.549459 -0.90499,-1.098917 -1.357486,-1.616054 0,-0.03232 0,-0.03232 0,-0.03232 0.09697,-0.161605 0.193927,-0.355531 0.29089,-0.549457 0.09696,-0.258569 0.226248,-0.517138 0.29089,-0.775707 0,-0.03232 0,-0.06465 0.03232,-0.06465 0,-0.129285 0.03232,-0.226248 0.06465,-0.290891 0.711065,-0.06465 1.422129,-0.129284 2.100872,-0.193926 0.06464,-0.323211 0.06464,-0.646422 0.09697,-0.969632 0,-0.09697 0,-0.193927 0,-0.29089 0,-0.06465 0,-0.161606 0,-0.258569 -0.03232,-0.323212 -0.03232,-0.646422 -0.09697,-0.969633 -0.678743,-0.06465 -1.389807,-0.129284 -2.100872,-0.193927 -0.03232,-0.09697 -0.06465,-0.193926 -0.06465,-0.290889 -0.09697,-0.29089 -0.193927,-0.58178 -0.323212,-0.872669 -0.09697,-0.193927 -0.226247,-0.420175 -0.32321,-0.614102 0.420173,-0.517136 0.872669,-1.066595 1.325164,-1.616054 z m -8.629731,2.682651 c 0.581779,-0.614101 1.292844,-0.904991 2.100871,-0.87267 0.840348,-0.03232 1.519091,0.258569 2.133192,0.87267 0.581779,0.581779 0.872669,1.292843 0.872669,2.10087 0,0.840348 -0.29089,1.519092 -0.872669,2.133192 -0.614101,0.58178 -1.292844,0.87267 -2.133192,0.87267 -0.808027,0 -1.519092,-0.29089 -2.100871,-0.87267 -0.581779,-0.6141 -0.872669,-1.292844 -0.872669,-2.133192 0,-0.808027 0.29089,-1.519091 0.872669,-2.10087 z"/>
4
4
  <circle cx="28" cy="27" r="9" class="cline rfill stand"/>
5
5
  <text transform="translate(28,31)" class="small">s</text>
@@ -1,6 +1,6 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="1" y="1" width="28" height="28" rx="4" class="cline rfill stand"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
3
3
  <path transform="translate(-2,-2)" class="normal" style="fill:#000000;" d="m 15,6.5 a 3.9999995,4 0 0 0 -4,4 3.9999995,4 0 0 0 4,4 3.9999995,4 0 0 0 4,-4 3.9999995,4 0 0 0 -4,-4 z m 0,8 -3.5,0 c -1.108,0 -2,0.892 -2,2 l 0,5 c 0,1.108 0.892,2 2,2 l 7,0 c 1.108,0 2,-0.892 2,-2 l 0,-5 c 0,-1.108 -0.892,-2 -2,-2 l -3.5,0 z"/>
4
- <circle cx="28" cy="27" r="9" class="cline rfill stand"/>
4
+ <circle cx="28" cy="27" r="9" class="cline hfill rfill stand"/>
5
5
  <text transform="translate(28,31)" class="small">s</text>
6
6
  </svg>
@@ -1,4 +1,4 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="1" y="1" width="28" height="28" rx="4" class="cline rfill stand"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="cline hfill rfill stand"/>
3
3
  <path class="normal" style="fill:#000000;" d="m 15,6.5 a 3.9999995,4 0 0 0 -4,4 3.9999995,4 0 0 0 4,4 3.9999995,4 0 0 0 4,-4 3.9999995,4 0 0 0 -4,-4 z m 0,8 -3.5,0 c -1.108,0 -2,0.892 -2,2 l 0,5 c 0,1.108 0.892,2 2,2 l 7,0 c 1.108,0 2,-0.892 2,-2 l 0,-5 c 0,-1.108 -0.892,-2 -2,-2 l -3.5,0 z"/>
4
4
  </svg>
@@ -1,5 +1,5 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline stand"/>
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
3
  <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
4
  <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
5
  </svg>
@@ -1,5 +1,5 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline stand"/>
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
3
  <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
4
  <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
5
  </svg>
@@ -1,4 +1,4 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline stand"/>
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
3
  <circle cx="15.5" cy="15.5" r="7" class="stand"/>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <circle cx="15" cy="15" r="14" class="cline stand"/>
3
- <text transform="translate(15,21)" class="normal">⚠</text>
2
+ <path class="cline hfill rfill stand" d="m 3 27 l 12 -24 l 12 24 z"/>
3
+ <text transform="translate(15,23)" class="small">!</text>
4
4
  </svg>
@@ -1,5 +1,5 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <circle cx="15" cy="15" r="14" class="stand cline"/>
3
- <circle cx="15" cy="15" r="11" class="stand cline"/>
3
+ <circle cx="15" cy="15" r="11" class="stand cline hfill"/>
4
4
  <polygon points="10.5,20.5 15,8.5 20.5,20.5 15,15.5 10.5,20.5" class="black"/>
5
5
  </svg>
@@ -1,5 +1,5 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline stand"/>
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
3
  <line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
4
4
  <line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
5
5
  </svg>
@@ -1,4 +1,4 @@
1
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 cline stand"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="rfill hfill cline stand"/>
3
3
  <text transform="translate(15,21)" class="normal">s</text>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <circle cx="15" cy="15" r="9" class="standtrans"/>
3
- <line x1="9" y1="21" x2="21" y2="9" class="stand cline"/>
3
+ <line x1="9" y1="21" x2="21" y2="9" class="stand cline hline"/>
4
4
  </svg>
@@ -1,5 +1,5 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline stand"/>
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
3
  <text transform="translate(15,25)" class="normallarge">+</text>
4
4
  </svg>
5
5
 
@@ -1,4 +1,4 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline stand"/>
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
3
  <text transform="translate(15,20)" class="small">|||</text>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
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 cline stand"/>
2
+ <rect x="1" y="1" width="28" height="28" rx="4" class="hfill rfill cline stand"/>
3
3
  <text transform="translate(15,21)" class="normal">s</text>
4
4
  </svg>
@@ -2,20 +2,34 @@ function WFAdaptorManifestation(adaptor) {
2
2
  var self = this;
3
3
 
4
4
  this.adaptor = adaptor;
5
+ this.resources = {};
5
6
  this.elements = {};
6
7
  this.events = {};
7
- this.compact = true;
8
+ this.compact = false;
8
9
 
9
10
  this.noarrow = ['alternative', 'otherwise'];
10
- this.source = function(rng) {
11
- $('#relaxngworker').empty();
12
- var rngw = new RelaxNGui(rng,$('#relaxngworker'),self.adaptor.description.context_eval);
13
- var nnew = $(rngw.save().documentElement);
14
- nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
15
- var ntxt = nnew.serializeXML();
16
- ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
11
+ this.source = function(base,opts) {
12
+ if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
13
+ $('#relaxngworker').empty();
14
+ var rngw = new RelaxNGui(base,$('#relaxngworker'),self.adaptor.description.context_eval);
15
+ var nnew = $(rngw.save().documentElement);
16
+ nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
17
+ var ntxt = nnew.serializeXML();
18
+ ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
17
19
 
18
- return($X(ntxt));
20
+ return($X(ntxt));
21
+ } else {
22
+ if (opts && opts == 'clone') {
23
+ if (base.attr('id')) {
24
+ base = base.clone();
25
+ // not very generic, because it is assumed that id is attribute of top level
26
+ // a better solution would be to parse rng for get_free_id()
27
+ // but: there is lots of lock-in to element-id, so fuck it
28
+ base.attr('id',self.adaptor.description.get_free_id());
29
+ }
30
+ }
31
+ return base;
32
+ }
19
33
  };
20
34
  this.clicked = function(){
21
35
  var svgid = 'unknown';
@@ -26,6 +40,56 @@ function WFAdaptorManifestation(adaptor) {
26
40
  });
27
41
  return svgid;
28
42
  };
43
+ this.marked = function(){
44
+ var svgid = [];
45
+ _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
46
+ if ($(value).hasClass('marked')) {
47
+ svgid.push($(value).attr('element-id'));
48
+ }
49
+ });
50
+ return svgid;
51
+ };
52
+
53
+ function copyOrMove(menu,group,xml_node,mode) {
54
+ var markymark = self.marked();
55
+ var check1 = [];
56
+ var check2 = [];
57
+ $(markymark).each(function(key,svgid){
58
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
59
+ check1.push($(node).attr('svg-type'));
60
+ });
61
+ $(group).each(function(key,value){
62
+ check2.push(value.type);
63
+ });
64
+
65
+ if (markymark.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
66
+ var nodes = [];
67
+ $(markymark).each(function(key,svgid){
68
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
69
+ nodes.unshift(node);
70
+ });
71
+
72
+ var iconm = self.resources['arrow'].clone();
73
+ var iconc = self.resources['arrow'].clone();
74
+ iconm.children('.rfill').addClass('menu');
75
+ menu.push(
76
+ {
77
+ 'label': '<em>Move Marked Elements</em>',
78
+ 'function_call': mode,
79
+ 'menu_icon': iconm,
80
+ 'type': undefined,
81
+ 'params': [nodes, xml_node]
82
+ },
83
+ {
84
+ 'label': '<em>Copy Marked Elements</em>',
85
+ 'function_call': mode,
86
+ 'menu_icon': iconc,
87
+ 'type': undefined,
88
+ 'params': [nodes, xml_node, 'clone']
89
+ }
90
+ );
91
+ }
92
+ }
29
93
 
30
94
  // Events
31
95
  this.events.mousedown = function(svgid, e, child, sibling) { // {{{
@@ -37,31 +101,39 @@ function WFAdaptorManifestation(adaptor) {
37
101
  var menu = {};
38
102
 
39
103
  if (child) {
40
- group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node);
41
- if(group.length > 0) menu['Insert into'] = group;
104
+ group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
105
+ if(group.length > 0) {
106
+ menu['Insert into'] = group;
107
+ copyOrMove(menu['Insert into'],group,self.adaptor.description.insert_first_into);
108
+ }
42
109
  }
43
110
  if (sibling) {
44
- group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node);
45
- if(group.length > 0) menu['Insert after'] = group;
111
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node,'after');
112
+ if(group.length > 0) {
113
+ menu['Insert after'] = group;
114
+ copyOrMove(menu['Insert after'],group,xml_node,self.adaptor.description.insert_after);
115
+ }
46
116
  }
47
117
 
48
118
  if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
49
119
  var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
50
- icon.children('.rfill').css({'fill':'#ff7f7f','fill-opacity':'1'});
120
+ icon.children('.rfill').addClass('menu');
51
121
  menu['Delete'] = [{
52
122
  'label': 'Remove Element',
53
123
  'function_call': self.adaptor.description.remove,
54
124
  'menu_icon': icon,
125
+ 'type': undefined,
55
126
  'params': [null, xml_node]
56
127
  }];
57
128
  }
58
129
  if($('> finalize, > update', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
59
130
  var icon = self.elements.callmanipulate.illustrator.svg.clone();
60
- icon.children('.rfill:last').css({'fill':'#ff7f7f','fill-opacity':'1'});
131
+ icon.children('.rfill:last').addClass('menu');
61
132
  menu['Delete'].push({
62
133
  'label': 'Remove Scripts',
63
134
  'function_call': self.adaptor.description.remove,
64
135
  'menu_icon': icon,
136
+ 'type': undefined,
65
137
  'params': ['> finalize, > update', xml_node]
66
138
  });
67
139
  }
@@ -69,37 +141,37 @@ function WFAdaptorManifestation(adaptor) {
69
141
  }
70
142
  return false;
71
143
  } // }}}
72
- this.events.click = function(svgid) { // {{{
144
+ this.events.click = function(svgid, e) { // {{{
145
+ if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
146
+ return;
147
+ }
148
+
73
149
  var visid = 'details';
74
150
  var tab = $('#dat_' + visid);
75
151
  tab.empty();
76
152
 
77
- if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
78
- return;
79
- }
80
153
  self.adaptor.illustrator.get_elements().removeClass('clicked');
81
154
 
82
- var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
83
- if (vtarget.length > 0) {
84
- vtarget.parents('g.element[element-id]').addClass('clicked');
85
- }
155
+ if (e && e.ctrlKey) {
156
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
157
+ if (vtarget.length > 0) {
158
+ vtarget.parents('g.element[element-id]').toggleClass('marked');
159
+ }
160
+ } else {
161
+ self.adaptor.illustrator.get_elements().removeClass('marked');
86
162
 
87
- if ($('#state').text() != 'finished')
88
- $('#main ui-behind button').show();
89
- if ($('#main ui-behind button').hasClass('highlight')) {
90
- var check = confirm("Discard changes?");
91
- if (check)
92
- $('#main ui-behind button').removeClass('highlight');
93
- else
94
- return;
95
- }
163
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
164
+ if (vtarget.length > 0) {
165
+ vtarget.parents('g.element[element-id]').addClass('clicked');
166
+ }
96
167
 
97
- var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
168
+ var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
98
169
 
99
- if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
100
- save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
101
- save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
102
- save[visid].content(node);
170
+ if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
171
+ save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
172
+ save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
173
+ save[visid].content(node);
174
+ }
103
175
  }
104
176
  } // }}}
105
177
  this.events.dblclick = function(svgid, e) { // {{{
@@ -115,6 +187,9 @@ function WFAdaptorManifestation(adaptor) {
115
187
  this.events.dragstart = function (svgid, e) { //{{{
116
188
  } //}}}
117
189
 
190
+ // other resources
191
+ this.resources.arrow = self.adaptor.theme_dir + 'symbols/arrow.svg';
192
+
118
193
  // Primitive Elements
119
194
  this.elements.call = { /*{{{*/
120
195
  'type': 'primitive',
@@ -143,12 +218,13 @@ function WFAdaptorManifestation(adaptor) {
143
218
  'svg': self.adaptor.theme_dir + 'symbols/call.svg'
144
219
  },//}}}
145
220
  'description': self.adaptor.theme_dir + 'rngs/call.rng',
146
- 'permissible_children': function(node) { //{{{
221
+ 'permissible_children': function(node,mode) { //{{{
147
222
  if(node.children('finalize,update').length < 1)
148
223
  return [
149
224
  {'label': 'Scripts',
150
225
  'function_call': self.adaptor.description.insert_last_into,
151
226
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
227
+ 'type': undefined,
152
228
  'params': [self.adaptor.description.elements.scripts, node]}
153
229
  ];
154
230
  return [];
@@ -163,10 +239,18 @@ function WFAdaptorManifestation(adaptor) {
163
239
  'type': 'primitive',
164
240
  'illustrator': {//{{{
165
241
  'endnodes': 'this',
242
+ 'label': function(node){
243
+ var lab = $(node).attr('label');
244
+ if (lab) {
245
+ return lab.replace(/^['"]/,'').replace(/['"]$/,'');
246
+ } else {
247
+ return "";
248
+ }
249
+ },
166
250
  'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
167
251
  },//}}}
168
252
  'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
169
- 'permissible_children': function(node) { //{{{
253
+ 'permissible_children': function(node,mode) { //{{{
170
254
  return [];
171
255
  }, //}}}
172
256
  'adaptor': {//{{{
@@ -181,7 +265,7 @@ function WFAdaptorManifestation(adaptor) {
181
265
  'svg': self.adaptor.theme_dir + 'symbols/escape.svg'
182
266
  },//}}}
183
267
  'description': self.adaptor.theme_dir + 'rngs/escape.rng',
184
- 'permissible_children': function(node) { //{{{
268
+ 'permissible_children': function(node,mode) { //{{{
185
269
  return [];
186
270
  }, //}}}
187
271
  'adaptor': {//{{{
@@ -213,29 +297,33 @@ function WFAdaptorManifestation(adaptor) {
213
297
  'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
214
298
  },//}}}
215
299
  'description': self.adaptor.theme_dir + 'rngs/choose.rng',
216
- 'permissible_children': function(node) { //{{{
300
+ 'permissible_children': function(node,mode) { //{{{
217
301
  var func = null;
218
- if(node.get(0).tagName == 'choose') { func = self.adaptor.description.insert_first_into }
302
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
219
303
  else { func = self.adaptor.description.insert_after }
220
304
  if(node.children('parallel_branch').length > 0) {
221
305
  return [{'label': 'Parallel Branch',
222
306
  'function_call': func,
223
307
  'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
308
+ 'type': 'parallel_branch',
224
309
  'params': [self.adaptor.description.elements.parallel_branch, node]}];
225
310
  }
226
311
  var childs = [{'label': 'Alternative',
227
312
  'function_call': func,
228
313
  'menu_icon': self.elements.alternative.illustrator.svg.clone(),
314
+ 'type': 'alternative',
229
315
  'params': [self.adaptor.description.elements.alternative, node]}];
230
316
  if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
231
317
  childs.push({'label': 'Otherwise',
232
318
  'function_call': self.adaptor.description.insert_last_into,
233
319
  'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
320
+ 'type': 'otherwise',
234
321
  'params': [self.adaptor.description.elements.otherwise, node]});
235
322
  if(node.parents('parallel').length > node.parents('parallel_branch').length)
236
323
  childs.push({'label': 'Parallel Branch',
237
324
  'function_call': func,
238
325
  'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
326
+ 'type': 'parallel_branch',
239
327
  'params': [self.adaptor.description.elements.parallel_branch, node]});
240
328
  return childs;
241
329
  }, //}}}
@@ -264,39 +352,46 @@ function WFAdaptorManifestation(adaptor) {
264
352
  },//}}}
265
353
  'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
266
354
  'neverdelete': true,
267
- 'permissible_children': function(node) { //{{{
355
+ 'permissible_children': function(node,mode) { //{{{
268
356
  var func = null;
269
357
  var childs = null;
270
- if(node.get(0).tagName == 'otherwise') { func = self.adaptor.description.insert_first_into }
358
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
271
359
  else { func = self.adaptor.description.insert_after }
272
360
  return [
273
361
  {'label': 'Service Call with Scripts',
274
362
  'function_call': func,
275
363
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
364
+ 'type': 'callmanipulate',
276
365
  'params': [self.adaptor.description.elements.callmanipulate, node]},
277
366
  {'label': 'Service Call',
278
367
  'function_call': func,
279
368
  'menu_icon': self.elements.call.illustrator.svg.clone(),
369
+ 'type': 'call',
280
370
  'params': [self.adaptor.description.elements.call, node]},
281
371
  {'label': 'Script',
282
372
  'function_call': func,
283
373
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
374
+ 'type': 'manipulate',
284
375
  'params': [self.adaptor.description.elements.manipulate, node]},
285
376
  {'label': 'Parallel',
286
377
  'function_call': func,
287
378
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
379
+ 'type': 'parallel',
288
380
  'params': [self.adaptor.description.elements.parallel, node]},
289
381
  {'label': 'Decision',
290
382
  'function_call': func,
291
383
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
384
+ 'type': 'choose',
292
385
  'params': [self.adaptor.description.elements.choose, node]},
293
386
  {'label': 'Loop',
294
387
  'function_call': func,
295
388
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
389
+ 'type': 'loop',
296
390
  'params': [self.adaptor.description.elements.loop, node]},
297
391
  {'label': 'Critical',
298
392
  'function_call': func,
299
393
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
394
+ 'type': 'critical',
300
395
  'params': [self.adaptor.description.elements.critical, node]}
301
396
  ];
302
397
  }, //}}}
@@ -325,43 +420,51 @@ function WFAdaptorManifestation(adaptor) {
325
420
  'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
326
421
  },//}}}
327
422
  'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
328
- 'permissible_children': function(node) { //{{{
329
- if(node.get(0).tagName == 'alternative') { func = self.adaptor.description.insert_first_into }
423
+ 'permissible_children': function(node,mode) { //{{{
424
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
330
425
  else { func = self.adaptor.description.insert_after }
331
426
  if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
332
427
  return [{'label': 'Parallel Branch',
333
428
  'function_call': func,
334
429
  'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
430
+ 'type': 'parallel_branch',
335
431
  'params': [self.adaptor.description.elements.parallel_branch, node]}];
336
432
  }
337
433
  return [
338
434
  {'label': 'Service Call with Scripts',
339
435
  'function_call': func,
340
436
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
437
+ 'type': 'callmanipulate',
341
438
  'params': [self.adaptor.description.elements.callmanipulate, node]},
342
439
  {'label': 'Service Call',
343
440
  'function_call': func,
344
441
  'menu_icon': self.elements.call.illustrator.svg.clone(),
442
+ 'type': 'call',
345
443
  'params': [self.adaptor.description.elements.call, node]},
346
444
  {'label': 'Script',
347
445
  'function_call': func,
348
446
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
447
+ 'type': 'manipulate',
349
448
  'params': [self.adaptor.description.elements.manipulate, node]},
350
449
  {'label': 'Parallel',
351
450
  'function_call': func,
352
451
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
452
+ 'type': 'parallel',
353
453
  'params': [self.adaptor.description.elements.parallel, node]},
354
454
  {'label': 'Decision',
355
455
  'function_call': func,
356
456
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
457
+ 'type': 'choose',
357
458
  'params': [self.adaptor.description.elements.choose, node]},
358
459
  {'label': 'Loop',
359
460
  'function_call': func,
360
461
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
462
+ 'type': 'loop',
361
463
  'params': [self.adaptor.description.elements.loop, node]},
362
464
  {'label': 'Critical',
363
465
  'function_call': func,
364
466
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
467
+ 'type': 'critical',
365
468
  'params': [self.adaptor.description.elements.critical, node]}
366
469
  ];
367
470
  }, //}}}
@@ -390,46 +493,54 @@ function WFAdaptorManifestation(adaptor) {
390
493
  'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
391
494
  },// }}}
392
495
  'description': self.adaptor.theme_dir + 'rngs/loop.rng',
393
- 'permissible_children': function(node) { //{{{
496
+ 'permissible_children': function(node,mode) { //{{{
394
497
  var func = null;
395
- if(node.get(0).tagName == 'loop') { func = self.adaptor.description.insert_first_into }
498
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
396
499
  else { func = self.adaptor.description.insert_after }
397
500
  var childs = [
398
501
  {'label': 'Service Call with Scripts',
399
502
  'function_call': func,
400
503
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
504
+ 'type': 'callmanipulate',
401
505
  'params': [self.adaptor.description.elements.callmanipulate, node]},
402
506
  {'label': 'Service Call',
403
507
  'function_call': func,
404
508
  'menu_icon': self.elements.call.illustrator.svg.clone(),
509
+ 'type': 'call',
405
510
  'params': [self.adaptor.description.elements.call, node]},
406
511
  {'label': 'Manipulate',
407
512
  'function_call': func,
408
513
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
514
+ 'type': 'manipulate',
409
515
  'params': [self.adaptor.description.elements.manipulate, node]},
410
516
  {'label': 'Decision',
411
517
  'function_call': func,
412
518
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
519
+ 'type': 'choose',
413
520
  'params': [self.adaptor.description.elements.choose, node]},
414
521
  {'label': 'Loop',
415
522
  'function_call': func,
416
523
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
524
+ 'type': 'loop',
417
525
  'params': [self.adaptor.description.elements.loop, node]},
418
526
  {'label': 'Critical',
419
527
  'function_call': func,
420
528
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
529
+ 'type': 'critical',
421
530
  'params': [self.adaptor.description.elements.critical, node]}
422
531
  ];
423
532
  if(node.parent('parallel').length > node.parent('parallel_branch').length) {
424
533
  childs.push({'label': 'Parallel Branch',
425
534
  'function_call': func,
426
535
  'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
536
+ 'type': 'parallel_branch',
427
537
  'params': [self.adaptor.description.elements.parallel_branch, node]}
428
538
  );
429
539
  } else {
430
540
  childs.push({'label': 'Parallel',
431
541
  'function_call': func,
432
542
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
543
+ 'type': 'parallel',
433
544
  'params': [self.adaptor.description.elements.parallel, node]}
434
545
  );
435
546
  }
@@ -462,41 +573,49 @@ function WFAdaptorManifestation(adaptor) {
462
573
  'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
463
574
  },//}}}
464
575
  'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
465
- 'permissible_children': function(node) { //{{{
576
+ 'permissible_children': function(node,mode) { //{{{
466
577
  var childs = [
467
578
  {'label': 'Service Call with Scripts',
468
579
  'function_call': self.adaptor.description.insert_last_into,
469
580
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
581
+ 'type': 'callmanipulate',
470
582
  'params': [self.adaptor.description.elements.callmanipulate, node]},
471
583
  {'label': 'Service Call',
472
584
  'function_call': self.adaptor.description.insert_last_into,
473
585
  'menu_icon': self.elements.call.illustrator.svg.clone(),
586
+ 'type': 'call',
474
587
  'params': [self.adaptor.description.elements.call, node]},
475
588
  {'label': 'Manipulate',
476
589
  'function_call': self.adaptor.description.insert_last_into,
477
590
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
591
+ 'type': 'manipulate',
478
592
  'params': [self.adaptor.description.elements.manipulate, node]},
479
593
  {'label': 'Decision',
480
594
  'function_call': self.adaptor.description.insert_last_into,
481
595
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
596
+ 'type': 'choose',
482
597
  'params': [self.adaptor.description.elements.choose, node]},
483
598
  {'label': 'Loop',
484
599
  'function_call': self.adaptor.description.insert_last_into,
485
600
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
601
+ 'type': 'loop',
486
602
  'params': [self.adaptor.description.elements.loop, node]},
487
603
  {'label': 'Critical',
488
604
  'function_call': self.adaptor.description.insert_last_into,
489
605
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
606
+ 'type': 'critical',
490
607
  'params': [self.adaptor.description.elements.critical, node]},
491
608
  {'label': 'Parallel Branch',
492
609
  'function_call': self.adaptor.description.insert_last_into,
493
610
  'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
611
+ 'type': 'parallel_branch',
494
612
  'params': [self.adaptor.description.elements.parallel_branch, node]}
495
613
  ];
496
614
  if(node.get(0).tagName != 'parallel')
497
615
  childs.push({'label': 'Parallel',
498
616
  'function_call': self.adaptor.description.insert_last_into,
499
617
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
618
+ 'type': 'parallel',
500
619
  'params': [self.adaptor.description.elements.parallel, node]});
501
620
  return childs;
502
621
  }, //}}}
@@ -526,45 +645,53 @@ function WFAdaptorManifestation(adaptor) {
526
645
  'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
527
646
  },//}}}
528
647
  'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
529
- 'permissible_children': function(node) { //{{{
648
+ 'permissible_children': function(node,mode) { //{{{
530
649
  var func = null;
531
650
  var childs = null;
532
- if(node.get(0).tagName == 'parallel_branch') { func = self.adaptor.description.insert_first_into }
651
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
533
652
  else { func = self.adaptor.description.insert_after }
534
653
  childs = [
535
654
  {'label': 'Service Call with Scripts',
536
655
  'function_call': func,
537
656
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
657
+ 'type': 'callmanipulate',
538
658
  'params': [self.adaptor.description.elements.callmanipulate, node]},
539
659
  {'label': 'Service Call',
540
660
  'function_call': func,
541
661
  'menu_icon': self.elements.call.illustrator.svg.clone(),
662
+ 'type': 'call',
542
663
  'params': [self.adaptor.description.elements.call, node]},
543
664
  {'label': 'Script',
544
665
  'function_call': func,
545
666
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
667
+ 'type': 'manipulate',
546
668
  'params': [self.adaptor.description.elements.manipulate, node]},
547
669
  {'label': 'Parallel',
548
670
  'function_call': func,
549
671
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
672
+ 'type': 'parallel',
550
673
  'params': [self.adaptor.description.elements.parallel, node]},
551
674
  {'label': 'Decision',
552
675
  'function_call': func,
553
676
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
677
+ 'type': 'choose',
554
678
  'params': [self.adaptor.description.elements.choose, node]},
555
679
  {'label': 'Loop',
556
680
  'function_call': func,
557
681
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
682
+ 'type': 'loop',
558
683
  'params': [self.adaptor.description.elements.loop, node]},
559
684
  {'label': 'Critical',
560
685
  'function_call': func,
561
686
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
687
+ 'type': 'critical',
562
688
  'params': [self.adaptor.description.elements.critical, node]},
563
689
  ];
564
690
  if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
565
691
  return [{'label': 'Alternative',
566
692
  'function_call': func,
567
693
  'menu_icon': self.elements.alternative.illustrator.svg.clone(),
694
+ 'type': 'alternative',
568
695
  'params': [self.adaptor.description.elements.alternative, node]}];
569
696
  }
570
697
  return childs;
@@ -594,38 +721,45 @@ function WFAdaptorManifestation(adaptor) {
594
721
  'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
595
722
  },//}}}
596
723
  'description': self.adaptor.theme_dir + 'rngs/critical.rng',
597
- 'permissible_children': function(node) { //{{{
724
+ 'permissible_children': function(node,mode) { //{{{
598
725
  var func = null;
599
- if(node.get(0).tagName == 'critical') { func = self.adaptor.description.insert_first_into }
726
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
600
727
  else { func = self.adaptor.description.insert_after }
601
728
  return [
602
729
  {'label': 'Service Call with Scripts',
603
730
  'function_call': func,
604
731
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
732
+ 'type': 'callmanipulate',
605
733
  'params': [self.adaptor.description.elements.callmanipulate, node]},
606
734
  {'label': 'Service Call',
607
735
  'function_call': func,
608
736
  'menu_icon': self.elements.call.illustrator.svg.clone(),
737
+ 'type': 'call',
609
738
  'params': [self.adaptor.description.elements.call, node]},
610
739
  {'label': 'Script',
611
740
  'function_call': func,
612
741
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
742
+ 'type': 'manipulate',
613
743
  'params': [self.adaptor.description.elements.manipulate, node]},
614
744
  {'label': 'Parallel',
615
745
  'function_call': func,
616
746
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
747
+ 'type': 'parallel',
617
748
  'params': [self.adaptor.description.elements.parallel, node]},
618
749
  {'label': 'Decision',
619
750
  'function_call': func,
620
751
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
752
+ 'type': 'choose',
621
753
  'params': [self.adaptor.description.elements.choose, node]},
622
754
  {'label': 'Loop',
623
755
  'function_call': func,
624
756
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
757
+ 'type': 'loop',
625
758
  'params': [self.adaptor.description.elements.loop, node]},
626
759
  {'label': 'Critical',
627
760
  'function_call': func,
628
761
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
762
+ 'type': 'critical',
629
763
  'params': [self.adaptor.description.elements.critical, node]},
630
764
  ];
631
765
  }, //}}}
@@ -654,9 +788,9 @@ function WFAdaptorManifestation(adaptor) {
654
788
  'svg': null
655
789
  },//}}}
656
790
  'description': self.adaptor.theme_dir + 'rngs/group.rng',
657
- 'permissible_children': function(node) { //{{{
791
+ 'permissible_children': function(node,mode) { //{{{
658
792
  var func = null;
659
- if(node.get(0).tagName == 'group') { func = self.adaptor.description.insert_first_into }
793
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
660
794
  else { func = self.adaptor.description.insert_after }
661
795
  return [
662
796
  ];
@@ -685,38 +819,45 @@ function WFAdaptorManifestation(adaptor) {
685
819
  'svg': self.adaptor.theme_dir + 'symbols/start.svg'
686
820
  },//}}}
687
821
  'description': null,
688
- 'permissible_children': function(node) { //{{{
822
+ 'permissible_children': function(node,mode) { //{{{
689
823
  var func = null;
690
- if(node.get(0).tagName == 'description') { func = self.adaptor.description.insert_first_into }
824
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
691
825
  else { func = self.adaptor.description.insert_after }
692
826
  return [
693
827
  {'label': 'Service Call with Scripts',
694
828
  'function_call': func,
695
829
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
830
+ 'type': 'callmanipulate',
696
831
  'params': [self.adaptor.description.elements.callmanipulate, node]},
697
832
  {'label': 'Service Call',
698
833
  'function_call': func,
699
834
  'menu_icon': self.elements.call.illustrator.svg.clone(),
835
+ 'type': 'call',
700
836
  'params': [self.adaptor.description.elements.call, node]},
701
837
  {'label': 'Script Task',
702
838
  'function_call': func,
703
839
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
840
+ 'type': 'manipulate',
704
841
  'params': [self.adaptor.description.elements.manipulate, node]},
705
842
  {'label': 'Parallel',
706
843
  'function_call': func,
707
844
  'menu_icon': self.elements.parallel.illustrator.svg.clone(),
845
+ 'type': 'parallel',
708
846
  'params': [self.adaptor.description.elements.parallel, node]},
709
847
  {'label': 'Decision',
710
848
  'function_call': func,
711
849
  'menu_icon': self.elements.choose.illustrator.svg.clone(),
850
+ 'type': 'choose',
712
851
  'params': [self.adaptor.description.elements.choose, node]},
713
852
  {'label': 'Loop',
714
853
  'function_call': func,
715
854
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
855
+ 'type': 'loop',
716
856
  'params': [self.adaptor.description.elements.loop, node]},
717
857
  {'label': 'Critical',
718
858
  'function_call': func,
719
859
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
860
+ 'type': 'critical',
720
861
  'params': [self.adaptor.description.elements.critical, node]}
721
862
  ];
722
863
  }, //}}}