cpee 1.5.16 → 1.5.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/model.css +24 -0
  3. data/cockpit/css/ui.css +25 -0
  4. data/cockpit/index.html +6 -6
  5. data/cockpit/js/details.js +70 -52
  6. data/cockpit/js/instance.js +62 -18
  7. data/cockpit/js/model.js +41 -0
  8. data/cockpit/js/ui.js +3 -0
  9. data/cockpit/js/wfadaptor.js +1 -1
  10. data/cockpit/model.html +191 -0
  11. data/cockpit/testsets/BCO.xml +2 -2
  12. data/cockpit/testsets/BCS.xml +2 -2
  13. data/cockpit/testsets/Lego Full.xml +142 -0
  14. data/cockpit/testsets/Lego Liddy.xml +40 -0
  15. data/cockpit/testsets/Lego_Part_1.xml +85 -0
  16. data/cockpit/testsets/Linear.xml +2 -2
  17. data/cockpit/testsets/Syncing P34 1.xml +2 -2
  18. data/cockpit/testsets/Syncing P34 2.xml +2 -2
  19. data/cockpit/testsets/Syncing P34 3.xml +2 -2
  20. data/cockpit/testsets/Syncing P34.xml +2 -2
  21. data/cockpit/testsets/testsets.xml +3 -1
  22. data/cockpit/themes/compact/rngs/alternative.rng +1 -0
  23. data/cockpit/themes/compact/rngs/call.rng +111 -0
  24. data/cockpit/themes/compact/rngs/callmanipulate.rng +134 -0
  25. data/cockpit/themes/compact/rngs/choose.rng +1 -0
  26. data/cockpit/themes/compact/rngs/critical.rng +1 -0
  27. data/cockpit/themes/compact/rngs/escape.rng +1 -0
  28. data/cockpit/themes/compact/rngs/group.rng +1 -0
  29. data/cockpit/themes/compact/rngs/loop.rng +1 -0
  30. data/cockpit/themes/compact/rngs/manipulate.rng +1 -0
  31. data/cockpit/themes/compact/rngs/otherwise.rng +1 -0
  32. data/cockpit/themes/compact/rngs/parallel.rng +1 -0
  33. data/cockpit/themes/compact/rngs/parallel_branch.rng +1 -0
  34. data/cockpit/themes/compact/rngs/scripts.rng +24 -0
  35. data/cockpit/themes/compact/rngs/stop.rng +1 -0
  36. data/cockpit/themes/compact/rngs/terminate.rng +1 -0
  37. data/cockpit/themes/compact/symbols/alternative.svg +5 -0
  38. data/cockpit/themes/compact/symbols/arrow.svg +3 -0
  39. data/cockpit/themes/compact/symbols/call.svg +6 -0
  40. data/cockpit/themes/compact/symbols/callmanipulate.svg +8 -0
  41. data/cockpit/themes/compact/symbols/choose.svg +5 -0
  42. data/cockpit/themes/compact/symbols/choose_exclusive.svg +5 -0
  43. data/cockpit/themes/compact/symbols/choose_inclusive.svg +4 -0
  44. data/cockpit/themes/compact/symbols/complex.svg +8 -0
  45. data/cockpit/themes/compact/symbols/critical.svg +4 -0
  46. data/cockpit/themes/compact/symbols/end.svg +3 -0
  47. data/cockpit/themes/compact/symbols/escape.svg +5 -0
  48. data/cockpit/themes/compact/symbols/event_end.svg +3 -0
  49. data/cockpit/themes/compact/symbols/loop.svg +5 -0
  50. data/cockpit/themes/compact/symbols/manipulate.svg +4 -0
  51. data/cockpit/themes/compact/symbols/otherwise.svg +5 -0
  52. data/cockpit/themes/compact/symbols/parallel.svg +5 -0
  53. data/cockpit/themes/compact/symbols/parallel_branch.svg +5 -0
  54. data/cockpit/themes/compact/symbols/parallel_branch_compact.svg +4 -0
  55. data/cockpit/themes/compact/symbols/parallel_branch_event.svg +14 -0
  56. data/cockpit/themes/compact/symbols/parallel_branch_normal.svg +5 -0
  57. data/cockpit/themes/compact/symbols/scripts.svg +4 -0
  58. data/cockpit/themes/compact/symbols/start.svg +3 -0
  59. data/cockpit/themes/compact/symbols/stop.svg +5 -0
  60. data/cockpit/themes/compact/symbols/terminate.svg +4 -0
  61. data/cockpit/themes/compact/theme.js +101 -61
  62. data/cockpit/themes/default/rngs/callmanipulate.rng +5 -0
  63. data/cockpit/themes/default/theme.js +97 -57
  64. data/cockpit/themes/extended/rngs/alternative.rng +1 -0
  65. data/cockpit/themes/extended/rngs/call.rng +111 -0
  66. data/cockpit/themes/extended/rngs/callmanipulate.rng +134 -0
  67. data/cockpit/themes/extended/rngs/choose.rng +1 -0
  68. data/cockpit/themes/extended/rngs/critical.rng +1 -0
  69. data/cockpit/themes/extended/rngs/escape.rng +1 -0
  70. data/cockpit/themes/extended/rngs/group.rng +1 -0
  71. data/cockpit/themes/extended/rngs/loop.rng +1 -0
  72. data/cockpit/themes/extended/rngs/manipulate.rng +1 -0
  73. data/cockpit/themes/extended/rngs/otherwise.rng +1 -0
  74. data/cockpit/themes/extended/rngs/parallel.rng +1 -0
  75. data/cockpit/themes/extended/rngs/parallel_branch.rng +1 -0
  76. data/cockpit/themes/extended/rngs/scripts.rng +24 -0
  77. data/cockpit/themes/extended/rngs/stop.rng +1 -0
  78. data/cockpit/themes/extended/rngs/terminate.rng +1 -0
  79. data/cockpit/themes/extended/symbols/alternative.svg +5 -0
  80. data/cockpit/themes/extended/symbols/arrow.svg +3 -0
  81. data/cockpit/themes/extended/symbols/call.svg +6 -0
  82. data/cockpit/themes/extended/symbols/callmanipulate.svg +8 -0
  83. data/cockpit/themes/extended/symbols/choose.svg +5 -0
  84. data/cockpit/themes/extended/symbols/choose_exclusive.svg +5 -0
  85. data/cockpit/themes/extended/symbols/choose_inclusive.svg +4 -0
  86. data/cockpit/themes/extended/symbols/complex.svg +8 -0
  87. data/cockpit/themes/extended/symbols/critical.svg +4 -0
  88. data/cockpit/themes/extended/symbols/end.svg +3 -0
  89. data/cockpit/themes/extended/symbols/escape.svg +5 -0
  90. data/cockpit/themes/extended/symbols/event_end.svg +3 -0
  91. data/cockpit/themes/extended/symbols/loop.svg +5 -0
  92. data/cockpit/themes/extended/symbols/manipulate.svg +4 -0
  93. data/cockpit/themes/extended/symbols/otherwise.svg +5 -0
  94. data/cockpit/themes/extended/symbols/parallel.svg +5 -0
  95. data/cockpit/themes/extended/symbols/parallel_branch.svg +5 -0
  96. data/cockpit/themes/extended/symbols/parallel_branch_compact.svg +4 -0
  97. data/cockpit/themes/extended/symbols/parallel_branch_event.svg +14 -0
  98. data/cockpit/themes/extended/symbols/parallel_branch_normal.svg +5 -0
  99. data/cockpit/themes/extended/symbols/scripts.svg +4 -0
  100. data/cockpit/themes/extended/symbols/start.svg +3 -0
  101. data/cockpit/themes/extended/symbols/stop.svg +5 -0
  102. data/cockpit/themes/extended/symbols/terminate.svg +4 -0
  103. data/cockpit/themes/extended/theme.js +101 -61
  104. data/cockpit/themes/labels/rngs/alternative.rng +25 -0
  105. data/cockpit/themes/labels/rngs/call.rng +81 -0
  106. data/cockpit/themes/labels/rngs/callmanipulate.rng +101 -0
  107. data/cockpit/themes/labels/rngs/choose.rng +12 -0
  108. data/cockpit/themes/labels/rngs/critical.rng +5 -0
  109. data/cockpit/themes/labels/rngs/escape.rng +1 -0
  110. data/cockpit/themes/labels/rngs/finalize.rng +6 -0
  111. data/cockpit/themes/labels/rngs/group.rng +3 -0
  112. data/cockpit/themes/labels/rngs/loop.rng +22 -0
  113. data/cockpit/themes/labels/rngs/manipulate.rng +9 -0
  114. data/cockpit/themes/labels/rngs/otherwise.rng +22 -0
  115. data/cockpit/themes/labels/rngs/parallel.rng +13 -0
  116. data/cockpit/themes/labels/rngs/parallel_branch.rng +8 -0
  117. data/cockpit/themes/labels/rngs/stop.rng +5 -0
  118. data/cockpit/themes/labels/rngs/terminate.rng +1 -0
  119. data/cockpit/themes/labels/rngs/update.rng +6 -0
  120. data/cockpit/themes/labels/symbols/alternative.svg +5 -0
  121. data/cockpit/themes/labels/symbols/arrow.svg +3 -0
  122. data/cockpit/themes/labels/symbols/call.svg +6 -0
  123. data/cockpit/themes/labels/symbols/callmanipulate.svg +8 -0
  124. data/cockpit/themes/labels/symbols/choose.svg +5 -0
  125. data/cockpit/themes/labels/symbols/choose_exclusive.svg +5 -0
  126. data/cockpit/themes/labels/symbols/choose_inclusive.svg +4 -0
  127. data/cockpit/themes/labels/symbols/complex.svg +8 -0
  128. data/cockpit/themes/labels/symbols/critical.svg +4 -0
  129. data/cockpit/themes/labels/symbols/end.svg +3 -0
  130. data/cockpit/themes/labels/symbols/escape.svg +5 -0
  131. data/cockpit/themes/labels/symbols/event_end.svg +3 -0
  132. data/cockpit/themes/labels/symbols/loop.svg +5 -0
  133. data/cockpit/themes/labels/symbols/manipulate.svg +4 -0
  134. data/cockpit/themes/labels/symbols/otherwise.svg +5 -0
  135. data/cockpit/themes/labels/symbols/parallel.svg +5 -0
  136. data/cockpit/themes/labels/symbols/parallel_branch.svg +5 -0
  137. data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +4 -0
  138. data/cockpit/themes/labels/symbols/parallel_branch_event.svg +14 -0
  139. data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +5 -0
  140. data/cockpit/themes/labels/symbols/scripts.svg +4 -0
  141. data/cockpit/themes/labels/symbols/start.svg +3 -0
  142. data/cockpit/themes/labels/symbols/stop.svg +5 -0
  143. data/cockpit/themes/labels/symbols/terminate.svg +4 -0
  144. data/cockpit/themes/model/rngs/alternative.rng +1 -0
  145. data/cockpit/themes/model/rngs/call.rng +62 -0
  146. data/cockpit/themes/model/rngs/callmanipulate.rng +67 -0
  147. data/cockpit/themes/model/rngs/choose.rng +1 -0
  148. data/cockpit/themes/model/rngs/critical.rng +1 -0
  149. data/cockpit/themes/model/rngs/escape.rng +1 -0
  150. data/cockpit/themes/model/rngs/group.rng +1 -0
  151. data/cockpit/themes/model/rngs/loop.rng +1 -0
  152. data/cockpit/themes/model/rngs/manipulate.rng +1 -0
  153. data/cockpit/themes/model/rngs/otherwise.rng +1 -0
  154. data/cockpit/themes/model/rngs/parallel.rng +1 -0
  155. data/cockpit/themes/model/rngs/parallel_branch.rng +1 -0
  156. data/cockpit/themes/model/rngs/scripts.rng +8 -0
  157. data/cockpit/themes/model/rngs/stop.rng +1 -0
  158. data/cockpit/themes/model/rngs/terminate.rng +1 -0
  159. data/cockpit/themes/model/symbols/alternative.svg +5 -0
  160. data/cockpit/themes/model/symbols/arrow.svg +3 -0
  161. data/cockpit/themes/model/symbols/call.svg +6 -0
  162. data/cockpit/themes/model/symbols/callmanipulate.svg +8 -0
  163. data/cockpit/themes/model/symbols/choose.svg +5 -0
  164. data/cockpit/themes/model/symbols/choose_exclusive.svg +5 -0
  165. data/cockpit/themes/model/symbols/choose_inclusive.svg +4 -0
  166. data/cockpit/themes/model/symbols/complex.svg +8 -0
  167. data/cockpit/themes/model/symbols/critical.svg +4 -0
  168. data/cockpit/themes/model/symbols/end.svg +3 -0
  169. data/cockpit/themes/model/symbols/escape.svg +5 -0
  170. data/cockpit/themes/model/symbols/event_end.svg +3 -0
  171. data/cockpit/themes/model/symbols/loop.svg +5 -0
  172. data/cockpit/themes/model/symbols/manipulate.svg +4 -0
  173. data/cockpit/themes/model/symbols/otherwise.svg +5 -0
  174. data/cockpit/themes/model/symbols/parallel.svg +5 -0
  175. data/cockpit/themes/model/symbols/parallel_branch.svg +5 -0
  176. data/cockpit/themes/model/symbols/parallel_branch_compact.svg +4 -0
  177. data/cockpit/themes/model/symbols/parallel_branch_event.svg +14 -0
  178. data/cockpit/themes/model/symbols/parallel_branch_normal.svg +5 -0
  179. data/cockpit/themes/model/symbols/scripts.svg +4 -0
  180. data/cockpit/themes/model/symbols/start.svg +3 -0
  181. data/cockpit/themes/model/symbols/stop.svg +5 -0
  182. data/cockpit/themes/model/symbols/terminate.svg +4 -0
  183. data/cockpit/themes/model/theme.js +1267 -0
  184. data/cockpit/themes/packed/rngs/alternative.rng +1 -0
  185. data/cockpit/themes/packed/rngs/call.rng +111 -0
  186. data/cockpit/themes/packed/rngs/callmanipulate.rng +134 -0
  187. data/cockpit/themes/packed/rngs/choose.rng +1 -0
  188. data/cockpit/themes/packed/rngs/critical.rng +1 -0
  189. data/cockpit/themes/packed/rngs/escape.rng +1 -0
  190. data/cockpit/themes/packed/rngs/group.rng +1 -0
  191. data/cockpit/themes/packed/rngs/loop.rng +1 -0
  192. data/cockpit/themes/packed/rngs/manipulate.rng +1 -0
  193. data/cockpit/themes/packed/rngs/otherwise.rng +1 -0
  194. data/cockpit/themes/packed/rngs/parallel.rng +1 -0
  195. data/cockpit/themes/packed/rngs/parallel_branch.rng +1 -0
  196. data/cockpit/themes/packed/rngs/scripts.rng +24 -0
  197. data/cockpit/themes/packed/rngs/stop.rng +1 -0
  198. data/cockpit/themes/packed/rngs/terminate.rng +1 -0
  199. data/cockpit/themes/packed/symbols/alternative.svg +5 -0
  200. data/cockpit/themes/packed/symbols/arrow.svg +3 -0
  201. data/cockpit/themes/packed/symbols/call.svg +6 -0
  202. data/cockpit/themes/packed/symbols/callmanipulate.svg +8 -0
  203. data/cockpit/themes/packed/symbols/choose.svg +5 -0
  204. data/cockpit/themes/packed/symbols/choose_exclusive.svg +5 -0
  205. data/cockpit/themes/packed/symbols/choose_inclusive.svg +4 -0
  206. data/cockpit/themes/packed/symbols/complex.svg +8 -0
  207. data/cockpit/themes/packed/symbols/critical.svg +4 -0
  208. data/cockpit/themes/packed/symbols/end.svg +3 -0
  209. data/cockpit/themes/packed/symbols/escape.svg +5 -0
  210. data/cockpit/themes/packed/symbols/event_end.svg +3 -0
  211. data/cockpit/themes/packed/symbols/loop.svg +5 -0
  212. data/cockpit/themes/packed/symbols/manipulate.svg +4 -0
  213. data/cockpit/themes/packed/symbols/otherwise.svg +5 -0
  214. data/cockpit/themes/packed/symbols/parallel.svg +5 -0
  215. data/cockpit/themes/packed/symbols/parallel_branch.svg +5 -0
  216. data/cockpit/themes/packed/symbols/parallel_branch_compact.svg +4 -0
  217. data/cockpit/themes/packed/symbols/parallel_branch_event.svg +14 -0
  218. data/cockpit/themes/packed/symbols/parallel_branch_normal.svg +5 -0
  219. data/cockpit/themes/packed/symbols/scripts.svg +4 -0
  220. data/cockpit/themes/packed/symbols/start.svg +3 -0
  221. data/cockpit/themes/packed/symbols/stop.svg +5 -0
  222. data/cockpit/themes/packed/symbols/terminate.svg +4 -0
  223. data/cockpit/themes/packed/theme.js +101 -61
  224. data/cockpit/themes/preset/rngs/call.rng +0 -10
  225. data/cockpit/themes/preset/rngs/callmanipulate.rng +0 -13
  226. data/cockpit/themes/preset/symbols/alternative.svg +5 -0
  227. data/cockpit/themes/preset/symbols/arrow.svg +3 -0
  228. data/cockpit/themes/preset/symbols/call.svg +6 -0
  229. data/cockpit/themes/preset/symbols/callmanipulate.svg +8 -0
  230. data/cockpit/themes/preset/symbols/choose.svg +5 -0
  231. data/cockpit/themes/preset/symbols/choose_exclusive.svg +5 -0
  232. data/cockpit/themes/preset/symbols/choose_inclusive.svg +4 -0
  233. data/cockpit/themes/preset/symbols/complex.svg +8 -0
  234. data/cockpit/themes/preset/symbols/critical.svg +4 -0
  235. data/cockpit/themes/preset/symbols/end.svg +3 -0
  236. data/cockpit/themes/preset/symbols/escape.svg +5 -0
  237. data/cockpit/themes/preset/symbols/event_end.svg +3 -0
  238. data/cockpit/themes/preset/symbols/loop.svg +5 -0
  239. data/cockpit/themes/preset/symbols/manipulate.svg +4 -0
  240. data/cockpit/themes/preset/symbols/otherwise.svg +5 -0
  241. data/cockpit/themes/preset/symbols/parallel.svg +5 -0
  242. data/cockpit/themes/preset/symbols/parallel_branch.svg +5 -0
  243. data/cockpit/themes/preset/symbols/parallel_branch_compact.svg +4 -0
  244. data/cockpit/themes/preset/symbols/parallel_branch_event.svg +14 -0
  245. data/cockpit/themes/preset/symbols/parallel_branch_normal.svg +5 -0
  246. data/cockpit/themes/preset/symbols/scripts.svg +4 -0
  247. data/cockpit/themes/preset/symbols/start.svg +3 -0
  248. data/cockpit/themes/preset/symbols/stop.svg +5 -0
  249. data/cockpit/themes/preset/symbols/terminate.svg +4 -0
  250. data/cockpit/themes/preset/theme.js +101 -61
  251. data/cpee.gemspec +3 -2
  252. data/lib/cpee/implementation.rb +28 -0
  253. data/lib/cpee/instantiation.rb +22 -5
  254. data/lib/engine.xml +4 -0
  255. data/lib/instantiation.xml +9 -0
  256. data/log/azure.rb +10 -0
  257. data/log/azure_logger.rb +136 -0
  258. data/server/handlerwrappers/default.rb +12 -12
  259. data/server/resources/transformation_dslx.xsl +29 -5
  260. data/server/server.pid +1 -0
  261. metadata +253 -3
@@ -132,6 +132,13 @@ function WFAdaptorManifestation(adaptor) {
132
132
  menu['Insert into'] = group;
133
133
  copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
134
134
  }
135
+ if (self.elements[xml_node.get(0).tagName].permissible_children_expert) {
136
+ group = self.elements[xml_node.get(0).tagName].permissible_children_expert(xml_node,'into');
137
+ if(group.length > 0) {
138
+ menu['Insert into (Experts Only!)'] = group;
139
+ copyOrMove(menu['Insert into (Experts Only!)'],group,xml_node,self.adaptor.description.insert_first_into);
140
+ }
141
+ }
135
142
  }
136
143
  if (sibling) {
137
144
  group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node,'after');
@@ -139,6 +146,13 @@ function WFAdaptorManifestation(adaptor) {
139
146
  menu['Insert after'] = group;
140
147
  copyOrMove(menu['Insert after'],group,xml_node,self.adaptor.description.insert_after);
141
148
  }
149
+ if (self.elements[xml_node.parent().get(0).tagName].permissible_children_expert) {
150
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children_expert(xml_node,'after');
151
+ if(group.length > 0) {
152
+ menu['Insert after (Experts Only!)'] = group;
153
+ copyOrMove(menu['Insert after (Experts Only!)'],group,xml_node,self.adaptor.description.insert_after);
154
+ }
155
+ }
142
156
  }
143
157
 
144
158
  if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
@@ -146,10 +160,10 @@ function WFAdaptorManifestation(adaptor) {
146
160
  icon.children('.rfill').addClass('menu');
147
161
  menu['Delete'] = [{
148
162
  'label': 'Remove Element',
149
- 'function_call': self.adaptor.description.remove,
163
+ 'function_call': function(selector,target,selected){ self.adaptor.description.remove(selector,target); self.adaptor.illustrator.get_label_by_svg_id(selected).addClass('selected'); },
150
164
  'menu_icon': icon,
151
165
  'type': undefined,
152
- 'params': [null, xml_node]
166
+ 'params': [null, xml_node, self.selected()]
153
167
  }];
154
168
  }
155
169
  if($('> finalize, > update', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
@@ -538,7 +552,7 @@ function WFAdaptorManifestation(adaptor) {
538
552
  var childs = null;
539
553
  if (mode == 'into') { func = self.adaptor.description.insert_first_into }
540
554
  else { func = self.adaptor.description.insert_after }
541
- return [
555
+ var childs = [
542
556
  {'label': 'Service Call with Scripts',
543
557
  'function_call': func,
544
558
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
@@ -578,13 +592,18 @@ function WFAdaptorManifestation(adaptor) {
578
592
  'function_call': func,
579
593
  'menu_icon': self.elements.stop.illustrator.svg.clone(),
580
594
  'type': 'stop',
581
- 'params': [self.adaptor.description.elements.stop, node]},
582
- {'label': 'Critical',
583
- 'function_call': func,
584
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
585
- 'type': 'critical',
586
- 'params': [self.adaptor.description.elements.critical, node]}
595
+ 'params': [self.adaptor.description.elements.stop, node]}
587
596
  ];
597
+ if(node.parent('parallel_branch').length > 0) {
598
+ childs.push({
599
+ 'label': 'Critical',
600
+ 'function_call': func,
601
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
602
+ 'type': 'critical',
603
+ 'params': [self.adaptor.description.elements.critical, node]
604
+ });
605
+ }
606
+ return childs;
588
607
  }, //}}}
589
608
  'adaptor': {//{{{
590
609
  'mousedown': function (node,e) {
@@ -625,7 +644,7 @@ function WFAdaptorManifestation(adaptor) {
625
644
  'type': 'parallel_branch',
626
645
  'params': [self.adaptor.description.elements.parallel_branch, node]}];
627
646
  }
628
- return [
647
+ var childs = [
629
648
  {'label': 'Service Call with Scripts',
630
649
  'function_call': func,
631
650
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
@@ -665,13 +684,18 @@ function WFAdaptorManifestation(adaptor) {
665
684
  'function_call': func,
666
685
  'menu_icon': self.elements.stop.illustrator.svg.clone(),
667
686
  'type': 'stop',
668
- 'params': [self.adaptor.description.elements.stop, node]},
669
- {'label': 'Critical',
670
- 'function_call': func,
671
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
672
- 'type': 'critical',
673
- 'params': [self.adaptor.description.elements.critical, node]}
687
+ 'params': [self.adaptor.description.elements.stop, node]}
674
688
  ];
689
+ if(node.parent('parallel_branch').length > 0) {
690
+ childs.push({
691
+ 'label': 'Critical',
692
+ 'function_call': func,
693
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
694
+ 'type': 'critical',
695
+ 'params': [self.adaptor.description.elements.critical, node]
696
+ });
697
+ }
698
+ return childs;
675
699
  }, //}}}
676
700
  'adaptor': {//{{{
677
701
  'mousedown': function (node,e) {
@@ -717,7 +741,7 @@ function WFAdaptorManifestation(adaptor) {
717
741
  'menu_icon': self.elements.call.illustrator.svg.clone(),
718
742
  'type': 'call',
719
743
  'params': [self.adaptor.description.elements.call, node]},
720
- {'label': 'Manipulate',
744
+ {'label': 'Script',
721
745
  'function_call': func,
722
746
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
723
747
  'type': 'manipulate',
@@ -741,13 +765,17 @@ function WFAdaptorManifestation(adaptor) {
741
765
  'function_call': func,
742
766
  'menu_icon': self.elements.stop.illustrator.svg.clone(),
743
767
  'type': 'stop',
744
- 'params': [self.adaptor.description.elements.stop, node]},
745
- {'label': 'Critical',
746
- 'function_call': func,
747
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
748
- 'type': 'critical',
749
- 'params': [self.adaptor.description.elements.critical, node]}
768
+ 'params': [self.adaptor.description.elements.stop, node]}
750
769
  ];
770
+ if(node.parent('parallel_branch').length > 0) {
771
+ childs.push({
772
+ 'label': 'Critical',
773
+ 'function_call': func,
774
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
775
+ 'type': 'critical',
776
+ 'params': [self.adaptor.description.elements.critical, node]
777
+ });
778
+ }
751
779
  if(node.parent('parallel').length > node.parent('parallel_branch').length) {
752
780
  childs.push({'label': 'Parallel Branch',
753
781
  'function_call': func,
@@ -796,6 +824,19 @@ function WFAdaptorManifestation(adaptor) {
796
824
  var func = null;
797
825
  if (mode == 'into') { func = self.adaptor.description.insert_first_into }
798
826
  else { func = self.adaptor.description.insert_after }
827
+ var childs = [
828
+ {'label': 'Parallel Branch',
829
+ 'function_call': func,
830
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
831
+ 'type': 'parallel_branch',
832
+ 'params': [self.adaptor.description.elements.parallel_branch, node]},
833
+ ];
834
+ return childs;
835
+ }, //}}}
836
+ 'permissible_children_expert': function(node,mode) { //{{{
837
+ var func = null;
838
+ if (mode.match(/into/)) { func = self.adaptor.description.insert_first_into }
839
+ else { func = self.adaptor.description.insert_after }
799
840
  var childs = [
800
841
  {'label': 'Service Call with Scripts',
801
842
  'function_call': func,
@@ -807,7 +848,7 @@ function WFAdaptorManifestation(adaptor) {
807
848
  'menu_icon': self.elements.call.illustrator.svg.clone(),
808
849
  'type': 'call',
809
850
  'params': [self.adaptor.description.elements.call, node]},
810
- {'label': 'Manipulate',
851
+ {'label': 'Script',
811
852
  'function_call': func,
812
853
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
813
854
  'type': 'manipulate',
@@ -822,11 +863,11 @@ function WFAdaptorManifestation(adaptor) {
822
863
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
823
864
  'type': 'loop',
824
865
  'params': [self.adaptor.description.elements.loop, node]},
825
- {'label': 'Parallel Branch',
866
+ {'label': 'Stop',
826
867
  'function_call': func,
827
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
828
- 'type': 'parallel_branch',
829
- 'params': [self.adaptor.description.elements.parallel_branch, node]}
868
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
869
+ 'type': 'stop',
870
+ 'params': [self.adaptor.description.elements.stop, node]}
830
871
  ];
831
872
  if(node.get(0).tagName != 'parallel')
832
873
  childs.push({'label': 'Parallel',
@@ -872,10 +913,9 @@ function WFAdaptorManifestation(adaptor) {
872
913
  'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
873
914
  'permissible_children': function(node,mode) { //{{{
874
915
  var func = null;
875
- var childs = null;
876
916
  if (mode == 'into') { func = self.adaptor.description.insert_first_into }
877
917
  else { func = self.adaptor.description.insert_after }
878
- childs = [
918
+ var childs = [
879
919
  {'label': 'Service Call with Scripts',
880
920
  'function_call': func,
881
921
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
@@ -920,7 +960,7 @@ function WFAdaptorManifestation(adaptor) {
920
960
  'function_call': func,
921
961
  'menu_icon': self.elements.critical.illustrator.svg.clone(),
922
962
  'type': 'critical',
923
- 'params': [self.adaptor.description.elements.critical, node]},
963
+ 'params': [self.adaptor.description.elements.critical, node]}
924
964
  ];
925
965
  if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
926
966
  return [{'label': 'Alternative',
@@ -933,12 +973,7 @@ function WFAdaptorManifestation(adaptor) {
933
973
  }, //}}}
934
974
  'adaptor': {//{{{
935
975
  'mousedown': function (node,e) {
936
- var xml_node = self.adaptor.description.get_node_by_svg_id(node);
937
- if(xml_node.get(0).parentNode.tagName == 'parallel') {
938
- self.events.mousedown(node,e,true,false);
939
- } else {
940
- self.events.mousedown(node,e,true,true);
941
- }
976
+ self.events.mousedown(node,e,true,true);
942
977
  },
943
978
  'click': self.events.click,
944
979
  'dblclick': self.events.dblclick,
@@ -965,7 +1000,7 @@ function WFAdaptorManifestation(adaptor) {
965
1000
  var func = null;
966
1001
  if (mode == 'into') { func = self.adaptor.description.insert_first_into }
967
1002
  else { func = self.adaptor.description.insert_after }
968
- return [
1003
+ var childs = [
969
1004
  {'label': 'Service Call with Scripts',
970
1005
  'function_call': func,
971
1006
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
@@ -1005,13 +1040,18 @@ function WFAdaptorManifestation(adaptor) {
1005
1040
  'function_call': func,
1006
1041
  'menu_icon': self.elements.stop.illustrator.svg.clone(),
1007
1042
  'type': 'stop',
1008
- 'params': [self.adaptor.description.elements.stop, node]},
1009
- {'label': 'Critical',
1010
- 'function_call': func,
1011
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1012
- 'type': 'critical',
1013
- 'params': [self.adaptor.description.elements.critical, node]},
1043
+ 'params': [self.adaptor.description.elements.stop, node]}
1014
1044
  ];
1045
+ if(node.parent('parallel_branch').length > 0) {
1046
+ childs.push({
1047
+ 'label': 'Critical',
1048
+ 'function_call': func,
1049
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1050
+ 'type': 'critical',
1051
+ 'params': [self.adaptor.description.elements.critical, node]
1052
+ });
1053
+ }
1054
+ return childs;
1015
1055
  }, //}}}
1016
1056
  'adaptor': {//{{{
1017
1057
  'mousedown': function (node,e) {
@@ -1075,7 +1115,7 @@ function WFAdaptorManifestation(adaptor) {
1075
1115
  var func = null;
1076
1116
  if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1077
1117
  else { func = self.adaptor.description.insert_after }
1078
- return [
1118
+ var childs = [
1079
1119
  {'label': 'Service Call with Scripts',
1080
1120
  'function_call': func,
1081
1121
  'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
@@ -1086,7 +1126,7 @@ function WFAdaptorManifestation(adaptor) {
1086
1126
  'menu_icon': self.elements.call.illustrator.svg.clone(),
1087
1127
  'type': 'call',
1088
1128
  'params': [self.adaptor.description.elements.call, node]},
1089
- {'label': 'Script Task',
1129
+ {'label': 'Script',
1090
1130
  'function_call': func,
1091
1131
  'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1092
1132
  'type': 'manipulate',
@@ -1106,22 +1146,22 @@ function WFAdaptorManifestation(adaptor) {
1106
1146
  'menu_icon': self.elements.loop.illustrator.svg.clone(),
1107
1147
  'type': 'loop',
1108
1148
  'params': [self.adaptor.description.elements.loop, node]},
1109
- {'label': 'Terminate',
1110
- 'function_call': func,
1111
- 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1112
- 'type': 'terminate',
1113
- 'params': [self.adaptor.description.elements.terminate, node]},
1114
1149
  {'label': 'Stop',
1115
1150
  'function_call': func,
1116
1151
  'menu_icon': self.elements.stop.illustrator.svg.clone(),
1117
1152
  'type': 'stop',
1118
- 'params': [self.adaptor.description.elements.stop, node]},
1119
- {'label': 'Critical',
1120
- 'function_call': func,
1121
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1122
- 'type': 'critical',
1123
- 'params': [self.adaptor.description.elements.critical, node]}
1153
+ 'params': [self.adaptor.description.elements.stop, node]}
1124
1154
  ];
1155
+ if(node.parent('parallel_branch').length > 0) {
1156
+ childs.push({
1157
+ 'label': 'Critical',
1158
+ 'function_call': func,
1159
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1160
+ 'type': 'critical',
1161
+ 'params': [self.adaptor.description.elements.critical, node]
1162
+ });
1163
+ }
1164
+ return childs;
1125
1165
  }, //}}}
1126
1166
  'adaptor': {//{{{
1127
1167
  'mousedown': function (node,e) {
@@ -0,0 +1 @@
1
+ ../../default/rngs/alternative.rng
@@ -0,0 +1,111 @@
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="Properties">
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' rngui:labeltype='xml'>
23
+ <anyName/>
24
+ <data type="string" rngui:label="Value"/>
25
+ </element>
26
+ </zeroOrMore>
27
+ </element>
28
+ <element name="stream" rngui:header="Data Stream Handling" rngui:fold="closed">
29
+ <element name="sensors" rngui:header="Sensors" rngui:fold="closed">
30
+ <zeroOrMore rngui:label="Add Sensor">
31
+ <element name="sensor">
32
+ <element name="name" rngui:label="Label">
33
+ <data type="string" rngui:label="Label"/>
34
+ </element>
35
+ <element name="extractor_url" rngui:label="Extractor Url">
36
+ <data type="string" rngui:label="Service Url"/>
37
+ </element>
38
+ <element name="extractor_arg" rngui:label="Extractor Argument">
39
+ <data type="string" rngui:label="Value / Json"/>
40
+ </element>
41
+ <element name="visualizer_url" rngui:label="Visualizer Url">
42
+ <data type="string" rngui:label="Service Url"/>
43
+ </element>
44
+ <element name="visualizer_params" rngui:header="Visualizer Arguments">
45
+ <zeroOrMore rngui:label="Create Visualizer Argument Pairs">
46
+ <element rngui:label='Name'>
47
+ <anyName/>
48
+ <data type="string" rngui:label="Value / Json"/>
49
+ </element>
50
+ </zeroOrMore>
51
+ </element>
52
+ </element>
53
+ </zeroOrMore>
54
+ </element>
55
+ <element name="aggregators" rngui:header="Aggregators" rngui:fold="closed">
56
+ <zeroOrMore rngui:label="Add Aggregator">
57
+ <element name="aggregator">
58
+ <element name="name" rngui:label="Label">
59
+ <data type="string" rngui:label="Label"/>
60
+ </element>
61
+ <element name="aggregator_url" rngui:label="Aggregator Url">
62
+ <data type="string" rngui:label="Service Url"/>
63
+ </element>
64
+ <element name="aggregator_arg" rngui:label="Aggregator Argument">
65
+ <data type="string" rngui:label="Value / Json"/>
66
+ </element>
67
+ </element>
68
+ </zeroOrMore>
69
+ </element>
70
+ <element name="costs" rngui:header="Costs" rngui:fold="closed">
71
+ <zeroOrMore rngui:label="Create Cost Factor">
72
+ <element name='cost_factor'>
73
+ <element name="name" rngui:label="Label">
74
+ <data type="string" rngui:label="Label"/>
75
+ </element>
76
+ <element name="target" rngui:label="Target Value">
77
+ <data type="string" rngui:label="Value"/>
78
+ </element>
79
+ <element name="vfunc_url" rngui:label="Violation Function Url">
80
+ <data type="string" rngui:label="Service Url"/>
81
+ </element>
82
+ <element name="vfunc_arg" rngui:label="Violation Function Argument">
83
+ <data type="string" rngui:label="Service Url"/>
84
+ </element>
85
+ <element name="vcost" rngui:label="Violation Cost">
86
+ <data type="string" rngui:label="Value"/>
87
+ </element>
88
+ </element>
89
+ </zeroOrMore>
90
+ </element>
91
+ </element>
92
+ </element>
93
+ <element name="annotations" rngui:header="Annotations">
94
+ <element name="_timing" rngui:header="Timing" rngui:fold="closed">
95
+ <element name="_timing_min" rngui:label='Min in min'>
96
+ <data type='float' rngui:label='Minutes'/>
97
+ </element>
98
+ <element name="_timing_max" rngui:label='Max in min'>
99
+ <data type='float' rngui:label='Minutes'/>
100
+ </element>
101
+ <element name="_timing_avg" rngui:label='Avg in min'>
102
+ <data type='float' rngui:label='Minutes'/>
103
+ </element>
104
+ </element>
105
+ <element name="_notes" rngui:header="Notes" rngui:fold="closed">
106
+ <element name="_notes_general" rngui:label='General'>
107
+ <text rngui:wrap='true' rngui:label='Notes'/>
108
+ </element>
109
+ </element>
110
+ </element>
111
+ </element>
@@ -0,0 +1,134 @@
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="Properties">
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' rngui:labeltype='xml'>
23
+ <anyName/>
24
+ <data type="string" rngui:label="Value"/>
25
+ </element>
26
+ </zeroOrMore>
27
+ </element>
28
+ <element name="stream" rngui:header="Data Stream Handling" rngui:fold="closed">
29
+ <element name="sensors" rngui:header="Sensors" rngui:fold="closed">
30
+ <zeroOrMore rngui:label="Add Sensor">
31
+ <element name="sensor">
32
+ <element name="name" rngui:label="Label">
33
+ <data type="string" rngui:label="Label"/>
34
+ </element>
35
+ <element name="extractor_url" rngui:label="Extractor Url">
36
+ <data type="string" rngui:label="Service Url"/>
37
+ </element>
38
+ <element name="extractor_arg" rngui:label="Extractor Argument">
39
+ <data type="string" rngui:label="Value / Json"/>
40
+ </element>
41
+ <element name="visualizer_url" rngui:label="Visualizer Url">
42
+ <data type="string" rngui:label="Service Url"/>
43
+ </element>
44
+ <element name="visualizer_params" rngui:header="Visualizer Arguments">
45
+ <zeroOrMore rngui:label="Create Visualizer Argument Pairs">
46
+ <element rngui:label='Name'>
47
+ <anyName/>
48
+ <data type="string" rngui:label="Value / Json"/>
49
+ </element>
50
+ </zeroOrMore>
51
+ </element>
52
+ </element>
53
+ </zeroOrMore>
54
+ </element>
55
+ <element name="aggregators" rngui:header="Aggregators" rngui:fold="closed">
56
+ <zeroOrMore rngui:label="Add Aggregator">
57
+ <element name="aggregator">
58
+ <element name="name" rngui:label="Label">
59
+ <data type="string" rngui:label="Label"/>
60
+ </element>
61
+ <element name="aggregator_url" rngui:label="Aggregator Url">
62
+ <data type="string" rngui:label="Service Url"/>
63
+ </element>
64
+ <element name="aggregator_arg" rngui:label="Aggregator Argument">
65
+ <data type="string" rngui:label="Value / Json"/>
66
+ </element>
67
+ </element>
68
+ </zeroOrMore>
69
+ </element>
70
+ <element name="costs" rngui:header="Costs" rngui:fold="closed">
71
+ <zeroOrMore rngui:label="Create Cost Factor">
72
+ <element name='cost_factor'>
73
+ <element name="name" rngui:label="Label">
74
+ <data type="string" rngui:label="Label"/>
75
+ </element>
76
+ <element name="target" rngui:label="Target Value">
77
+ <data type="string" rngui:label="Value"/>
78
+ </element>
79
+ <element name="vfunc_url" rngui:label="Violation Function Url">
80
+ <data type="string" rngui:label="Service Url"/>
81
+ </element>
82
+ <element name="vfunc_arg" rngui:label="Violation Function Argument">
83
+ <data type="string" rngui:label="Service Url"/>
84
+ </element>
85
+ <element name="vcost" rngui:label="Violation Cost">
86
+ <data type="string" rngui:label="Value"/>
87
+ </element>
88
+ </element>
89
+ </zeroOrMore>
90
+ </element>
91
+ </element>
92
+ </element>
93
+ <element name="code" rngui:header="Implementation">
94
+ <element name="prepare" rngui:header="Prepare" rngui:label="Code" rngui:fold='closed_conditional'>
95
+ <text rngui:label='Script that is executed, before a service call'/>
96
+ </element>
97
+ <element name="finalize" rngui:header="Finalize" rngui:label="Code" rngui:fold='closed_conditional'>
98
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
99
+ <data type="string" rngui:readonly="true"/>
100
+ </attribute>
101
+ <text rngui:label='Script that is executed, when a service returns data'/>
102
+ </element>
103
+ <element name="update" rngui:header="Update" rngui:label="Code" rngui:fold='closed_conditional'>
104
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
105
+ <data type="string" rngui:readonly="true"/>
106
+ </attribute>
107
+ <text rngui:label='Script that is executed, when a service sends intermediate data'/>
108
+ </element>
109
+ <element name="rescue" rngui:header="Rescue" rngui:label="Code" rngui:fold='closed_conditional'>
110
+ <attribute name="output" rngui:label="Access Variable" rngui:default="result">
111
+ <data type="string" rngui:readonly="true"/>
112
+ </attribute>
113
+ <text rngui:label='Script that is executed, if a service call fails'/>
114
+ </element>
115
+ </element>
116
+ <element name="annotations" rngui:header="Annotations">
117
+ <element name="_timing" rngui:header="Timing" rngui:fold="closed">
118
+ <element name="_timing_min" rngui:label='Min in min'>
119
+ <data type='float' rngui:label='Minutes'/>
120
+ </element>
121
+ <element name="_timing_max" rngui:label='Max in min'>
122
+ <data type='float' rngui:label='Minutes'/>
123
+ </element>
124
+ <element name="_timing_avg" rngui:label='Avg in min'>
125
+ <data type='float' rngui:label='Minutes'/>
126
+ </element>
127
+ </element>
128
+ <element name="_notes" rngui:header="Notes" rngui:fold="closed">
129
+ <element name="_notes_general" rngui:label='General'>
130
+ <text rngui:wrap='true' rngui:label='Notes'/>
131
+ </element>
132
+ </element>
133
+ </element>
134
+ </element>