cpee 2.0.24 → 2.0.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/{templates/.CPEE.xml → CPEE.xml} +1 -1
  3. data/cockpit/{templates/.Signavio.xml → Signavio.xml} +1 -1
  4. data/cockpit/css/model.css +1 -1
  5. data/cockpit/css/ui.css +30 -5
  6. data/cockpit/css/wfadaptor.css +11 -0
  7. data/cockpit/edit.html +260 -0
  8. data/cockpit/graph.html +3 -3
  9. data/cockpit/index.html +9 -8
  10. data/cockpit/js/details.js +0 -1
  11. data/cockpit/js/edit.js +32 -0
  12. data/cockpit/js/instance.js +51 -35
  13. data/cockpit/js/model.js +6 -36
  14. data/cockpit/js/parameters.js +9 -4
  15. data/cockpit/js/ui.js +7 -0
  16. data/cockpit/model.html +5 -3
  17. data/cockpit/replay.html +3 -2
  18. data/cockpit/templates/Coopis 2010.xml +1 -1
  19. data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +1 -1
  20. data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +1 -1
  21. data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +1 -1
  22. data/cockpit/templates/Track Test Local.xml +6 -2
  23. data/cockpit/templates/Track Test.xml +5 -1
  24. data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +5 -1
  25. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +8 -4
  26. data/cockpit/templates/UR-VUE 2020 Solution NN.xml +8 -4
  27. data/cockpit/templates/UR-VUE 2020 Solution View.xml +8 -4
  28. data/cockpit/templates/UR-VUE 2020.xml +8 -4
  29. data/cockpit/themes/compact/rngs/call.rng +26 -1
  30. data/cockpit/themes/compact/rngs/callmanipulate.rng +32 -2
  31. data/cockpit/themes/compact/rngs/parallel.rng +6 -0
  32. data/cockpit/themes/compact/symbols/parallel_branch_event.svg +2 -2
  33. data/cockpit/themes/compact/symbols/parallel_eventbased_exclusive.svg +9 -0
  34. data/cockpit/themes/compact/symbols/parallel_eventbased_parallel.svg +8 -0
  35. data/cockpit/themes/compact/theme.js +102 -27
  36. data/cockpit/themes/control/rngs/call.rng +26 -1
  37. data/cockpit/themes/control/rngs/callmanipulate.rng +32 -2
  38. data/cockpit/themes/control/rngs/parallel.rng +6 -0
  39. data/cockpit/themes/control/symbols/parallel_branch_event.svg +2 -2
  40. data/cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg +9 -0
  41. data/cockpit/themes/control/symbols/parallel_eventbased_parallel.svg +8 -0
  42. data/cockpit/themes/control/theme.js +95 -21
  43. data/cockpit/themes/default/rngs/call.rng +26 -1
  44. data/cockpit/themes/default/rngs/callmanipulate.rng +32 -2
  45. data/cockpit/themes/default/rngs/parallel.rng +6 -0
  46. data/cockpit/themes/default/symbols/parallel_branch_event.svg +2 -2
  47. data/cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg +9 -0
  48. data/cockpit/themes/default/symbols/parallel_eventbased_parallel.svg +8 -0
  49. data/cockpit/themes/default/theme.js +94 -20
  50. data/cockpit/themes/extended/rngs/call.rng +26 -1
  51. data/cockpit/themes/extended/rngs/callmanipulate.rng +32 -2
  52. data/cockpit/themes/extended/rngs/parallel.rng +6 -0
  53. data/cockpit/themes/extended/symbols/parallel_branch_event.svg +2 -2
  54. data/cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg +9 -0
  55. data/cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg +8 -0
  56. data/cockpit/themes/extended/theme.js +95 -21
  57. data/cockpit/themes/model/rngs/call.rng +21 -20
  58. data/cockpit/themes/model/rngs/callmanipulate.rng +23 -22
  59. data/cockpit/themes/model/symbols/parallel_branch_event.svg +2 -2
  60. data/cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg +9 -0
  61. data/cockpit/themes/model/symbols/parallel_eventbased_parallel.svg +8 -0
  62. data/cockpit/themes/model/theme.js +96 -22
  63. data/cockpit/themes/packed/rngs/call.rng +26 -1
  64. data/cockpit/themes/packed/rngs/callmanipulate.rng +32 -2
  65. data/cockpit/themes/packed/rngs/parallel.rng +6 -0
  66. data/cockpit/themes/packed/symbols/parallel_branch_event.svg +2 -2
  67. data/cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg +9 -0
  68. data/cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg +8 -0
  69. data/cockpit/themes/packed/theme.js +95 -21
  70. data/cockpit/themes/preset/rngs/call.rng +26 -1
  71. data/cockpit/themes/preset/rngs/callmanipulate.rng +32 -2
  72. data/cockpit/themes/preset/rngs/parallel.rng +6 -0
  73. data/cockpit/themes/preset/symbols/parallel_branch_event.svg +2 -2
  74. data/cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg +9 -0
  75. data/cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg +8 -0
  76. data/cockpit/themes/preset/theme.js +94 -20
  77. data/cockpit/track.html +3 -3
  78. data/cockpit/{templates/.transformations.xml → transformations.xml} +0 -0
  79. data/cpee.gemspec +3 -3
  80. data/lib/callbacks.xml +5 -0
  81. data/lib/cpee/controller.rb +30 -28
  82. data/lib/cpee/implementation_callbacks.rb +60 -0
  83. data/lib/cpee/implementation_notifications.rb +6 -2
  84. data/server/handlerwrappers/default.rb +19 -3
  85. data/server/resources/transformation_dslx.xsl +5 -1
  86. data/server/routing/end.pid +1 -1
  87. data/server/routing/end.rb +1 -0
  88. data/server/routing/forward-events.pid +1 -1
  89. data/server/routing/forward-votes.pid +1 -1
  90. data/server/routing/forward-votes.rb +6 -5
  91. data/server/routing/persist.pid +1 -1
  92. data/server/routing/persist.rb +4 -4
  93. data/server/server.pid +1 -1
  94. metadata +24 -58
  95. data/cockpit/edit.html +0 -1
  96. data/cockpit/templates/.templates.xml +0 -13
  97. data/cockpit/themes/diana/rngs/alternative.rng +0 -25
  98. data/cockpit/themes/diana/rngs/call.rng +0 -149
  99. data/cockpit/themes/diana/rngs/callmanipulate.rng +0 -188
  100. data/cockpit/themes/diana/rngs/choose.rng +0 -14
  101. data/cockpit/themes/diana/rngs/closed_loop.rng +0 -62
  102. data/cockpit/themes/diana/rngs/closed_loop_cancel.rng +0 -5
  103. data/cockpit/themes/diana/rngs/closed_loop_control.rng +0 -31
  104. data/cockpit/themes/diana/rngs/closed_loop_measuring.rng +0 -12
  105. data/cockpit/themes/diana/rngs/critical.rng +0 -5
  106. data/cockpit/themes/diana/rngs/escape.rng +0 -1
  107. data/cockpit/themes/diana/rngs/group.rng +0 -3
  108. data/cockpit/themes/diana/rngs/loop.rng +0 -22
  109. data/cockpit/themes/diana/rngs/manipulate.rng +0 -9
  110. data/cockpit/themes/diana/rngs/otherwise.rng +0 -22
  111. data/cockpit/themes/diana/rngs/parallel.rng +0 -21
  112. data/cockpit/themes/diana/rngs/parallel_branch.rng +0 -8
  113. data/cockpit/themes/diana/rngs/scripts.rng +0 -23
  114. data/cockpit/themes/diana/rngs/stop.rng +0 -5
  115. data/cockpit/themes/diana/rngs/terminate.rng +0 -1
  116. data/cockpit/themes/diana/symbols/alternative.svg +0 -5
  117. data/cockpit/themes/diana/symbols/arrow.svg +0 -3
  118. data/cockpit/themes/diana/symbols/call.svg +0 -6
  119. data/cockpit/themes/diana/symbols/callmanipulate.svg +0 -8
  120. data/cockpit/themes/diana/symbols/choose.svg +0 -5
  121. data/cockpit/themes/diana/symbols/choose_exclusive.svg +0 -5
  122. data/cockpit/themes/diana/symbols/choose_inclusive.svg +0 -4
  123. data/cockpit/themes/diana/symbols/closed_loop.svg +0 -5
  124. data/cockpit/themes/diana/symbols/closed_loop_cancel.svg +0 -5
  125. data/cockpit/themes/diana/symbols/closed_loop_control.svg +0 -5
  126. data/cockpit/themes/diana/symbols/closed_loop_measuring.svg +0 -6
  127. data/cockpit/themes/diana/symbols/complex.svg +0 -8
  128. data/cockpit/themes/diana/symbols/critical.svg +0 -4
  129. data/cockpit/themes/diana/symbols/end.svg +0 -3
  130. data/cockpit/themes/diana/symbols/escape.svg +0 -5
  131. data/cockpit/themes/diana/symbols/event_end.svg +0 -3
  132. data/cockpit/themes/diana/symbols/loop.svg +0 -5
  133. data/cockpit/themes/diana/symbols/manipulate.svg +0 -4
  134. data/cockpit/themes/diana/symbols/otherwise.svg +0 -5
  135. data/cockpit/themes/diana/symbols/parallel.svg +0 -5
  136. data/cockpit/themes/diana/symbols/parallel_branch.svg +0 -5
  137. data/cockpit/themes/diana/symbols/parallel_branch_compact.svg +0 -4
  138. data/cockpit/themes/diana/symbols/parallel_branch_event.svg +0 -14
  139. data/cockpit/themes/diana/symbols/parallel_branch_normal.svg +0 -5
  140. data/cockpit/themes/diana/symbols/scripts.svg +0 -4
  141. data/cockpit/themes/diana/symbols/start.svg +0 -3
  142. data/cockpit/themes/diana/symbols/stop.svg +0 -5
  143. data/cockpit/themes/diana/symbols/terminate.svg +0 -4
  144. data/cockpit/themes/diana/theme.js +0 -1650
@@ -0,0 +1,8 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <circle cx="15.5" cy="15.5" r="8" class="standthin"/>
4
+ <circle cx="15.5" cy="15.5" r="6" class="standthin"/>
5
+ <line x1="12.5" y1="15.5" x2="18.5" y2="15.5" class="stand"/>
6
+ <line x1="15.5" y1="12.5" x2="15.5" y2="18.5" class="stand"/>
7
+ </svg>
8
+
@@ -49,6 +49,16 @@ function WFAdaptorManifestation(adaptor) {
49
49
  });
50
50
  return svgid;
51
51
  }; //}}}
52
+ //{{{ Return the json for all marked tasks
53
+ this.marked_text = function(){
54
+ var nodes = [];
55
+ var markymark = _.uniq(self.marked());
56
+ $(markymark).each(function(key,svgid){
57
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
58
+ nodes.push($(node).serializePrettyXML());
59
+ });
60
+ return JSON.stringify(nodes);
61
+ }; //}}}
52
62
  //{{{ Render the details from rng (right hand side of graph tab)
53
63
  this.update_details = function(svgid){
54
64
  var tab = $('#dat_details');
@@ -76,35 +86,46 @@ function WFAdaptorManifestation(adaptor) {
76
86
  }; //}}}
77
87
 
78
88
  function copyOrMove(menu,group,xml_node,mode) { //{{{
79
- var markymark = _.uniq(self.marked());
89
+ var nodes = localStorage.getItem('marked');
90
+
91
+ if (typeof(nodes) != "string") { return; }
92
+
93
+ nodes = JSON.parse(nodes);
94
+ $(nodes).each(function(key,str) {
95
+ nodes[key] = $X(str);;
96
+ });
97
+
80
98
  var check1 = [];
81
99
  var check2 = [];
82
- $(markymark).each(function(key,svgid){
83
- var node = self.adaptor.description.get_node_by_svg_id(svgid);
100
+ $(nodes).each(function(key,node){
84
101
  check1.push($(node).attr('svg-type'));
85
102
  });
86
103
  $(group).each(function(key,value){
87
104
  check2.push(value.type);
88
105
  });
89
106
 
90
- if (markymark.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
91
- var nodes = [];
92
- $(markymark).each(function(key,svgid){
93
- var node = self.adaptor.description.get_node_by_svg_id(svgid);
94
- nodes.unshift(node);
95
- });
96
-
107
+ if (nodes.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
108
+ if (myid == localStorage.getItem('marked_from')) {
109
+ $(nodes).each(function(key,node){
110
+ nodes[key] = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
111
+ });
112
+ }
113
+ nodes.reverse();
97
114
  var iconm = self.resources['arrow'].clone();
98
115
  var iconc = self.resources['arrow'].clone();
99
116
  iconm.children('.rfill').addClass('menu');
117
+ if (myid == localStorage.getItem('marked_from')) {
118
+ menu.push(
119
+ {
120
+ 'label': '<em>Move Marked Elements</em>',
121
+ 'function_call': mode,
122
+ 'menu_icon': iconm,
123
+ 'type': undefined,
124
+ 'params': [nodes, xml_node]
125
+ }
126
+ );
127
+ }
100
128
  menu.push(
101
- {
102
- 'label': '<em>Move Marked Elements</em>',
103
- 'function_call': mode,
104
- 'menu_icon': iconm,
105
- 'type': undefined,
106
- 'params': [nodes, xml_node]
107
- },
108
129
  {
109
130
  'label': '<em>Copy Marked Elements</em>',
110
131
  'function_call': mode,
@@ -223,10 +244,20 @@ function WFAdaptorManifestation(adaptor) {
223
244
  tab.empty();
224
245
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
225
246
  if (vtarget.length > 0) {
226
- vtarget.parents('g.element[element-id]').toggleClass('marked');
247
+ var vt = vtarget.parents('g.element[element-id]');
248
+ vt.toggleClass('marked');
249
+ if (vt.hasClass('marked')) {
250
+ localStorage.setItem('marked',self.marked_text());
251
+ localStorage.setItem('marked_from',myid);
252
+ } else {
253
+ localStorage.removeItem('marked');
254
+ localStorage.removeItem('marked_from');
255
+ }
227
256
  }
228
257
  } else {
229
258
  self.adaptor.illustrator.get_elements().removeClass('marked');
259
+ localStorage.removeItem('marked');
260
+ localStorage.removeItem('marked_from');
230
261
 
231
262
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
232
263
  if (vtarget.length > 0) {
@@ -450,8 +481,12 @@ function WFAdaptorManifestation(adaptor) {
450
481
  'endnodes': 'this',
451
482
  'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
452
483
  'resolve_symbol': function(node) {
453
- if($(node).attr('wait') == '-1') {
484
+ if($(node).attr('cancel') == 'last' && $(node).attr('wait') == '-1') {
454
485
  return 'parallel_simple';
486
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '-1') {
487
+ return 'parallel_event_all';
488
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '1') {
489
+ return 'parallel_event_one';
455
490
  } else {
456
491
  return 'parallel_complex';
457
492
  }
@@ -818,7 +853,16 @@ function WFAdaptorManifestation(adaptor) {
818
853
  'col_shift': function(node) {
819
854
  return true;
820
855
  },
821
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
856
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
857
+ 'resolve_symbol': function(node) {
858
+ if($(node).attr('cancel') == 'last') {
859
+ return 'parallel_start';
860
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == 1) {
861
+ return 'parallel_eventbased_exclusive';
862
+ } else {
863
+ return 'parallel_eventbased_parallel';
864
+ }
865
+ },
822
866
  },//}}}
823
867
  'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
824
868
  'permissible_children': function(node,mode) { //{{{
@@ -1245,6 +1289,24 @@ function WFAdaptorManifestation(adaptor) {
1245
1289
  'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1246
1290
  },//}}}
1247
1291
  }; /*}}}*/
1292
+ this.elements.parallel_start = { /*{{{*/
1293
+ 'parent': 'parallel',
1294
+ 'illustrator': {//{{{
1295
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1296
+ }//}}}
1297
+ }; /*}}}*/
1298
+ this.elements.parallel_eventbased_exclusive = { /*{{{*/
1299
+ 'parent': 'parallel',
1300
+ 'illustrator': {//{{{
1301
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1302
+ }//}}}
1303
+ }; /*}}}*/
1304
+ this.elements.parallel_eventbased_parallel = { /*{{{*/
1305
+ 'parent': 'parallel',
1306
+ 'illustrator': {//{{{
1307
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1308
+ }//}}}
1309
+ }; /*}}}*/
1248
1310
  this.elements.parallel_simple = { /*{{{*/
1249
1311
  'parent': 'parallel_finish',
1250
1312
  'illustrator': {//{{{
@@ -1257,6 +1319,18 @@ function WFAdaptorManifestation(adaptor) {
1257
1319
  'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1258
1320
  },//}}}
1259
1321
  }; /*}}}*/
1322
+ this.elements.parallel_event_all = { /*{{{*/
1323
+ 'parent': 'parallel_finish',
1324
+ 'illustrator': {//{{{
1325
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1326
+ }//}}}
1327
+ }; /*}}}*/
1328
+ this.elements.parallel_event_one = { /*{{{*/
1329
+ 'parent': 'parallel_finish',
1330
+ 'illustrator': {//{{{
1331
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1332
+ }//}}}
1333
+ }; /*}}}*/
1260
1334
  this.elements.parallel_branch_normal = { /*{{{*/
1261
1335
  'parent': 'parallel_branch',
1262
1336
  'illustrator': {//{{{
@@ -97,7 +97,7 @@
97
97
  </element>
98
98
 
99
99
  </element>
100
- <element name="report" rngui:header="Reporting Annotation" rngui:fold="closed">
100
+ <element name="report" rngui:header="Reporting" rngui:fold="closed">
101
101
  <element name="url" rngui:label='HTML Snippet'>
102
102
  <data type="string" rngui:label="url to report snippet"/>
103
103
  </element>
@@ -146,4 +146,29 @@
146
146
  </element>
147
147
  </element>
148
148
  </element>
149
+ <element name="input" rngui:header="Input Arguments Documentation" rngui:fold="closed">
150
+ <zeroOrMore rngui:label="Create Argument">
151
+ <element name="item" rngui:label="Description">
152
+ <attribute name="label" rngui:label="Name">
153
+ <data type="string"/>
154
+ </attribute>
155
+ <text rngui:wrap="true" rngui:label="What does it do?"/>
156
+ </element>
157
+ </zeroOrMore>
158
+ </element>
159
+ <element name="output" rngui:header="Output Elements Documentation" rngui:fold="closed">
160
+ <zeroOrMore rngui:label="Create Element">
161
+ <element name="item" rngui:label="Description">
162
+ <attribute name="label" rngui:label="Name">
163
+ <data type="string"/>
164
+ </attribute>
165
+ <text rngui:wrap="true" rngui:label="What does it do?"/>
166
+ </element>
167
+ </zeroOrMore>
168
+ </element>
169
+ <element name="implementation" rngui:header="Implementation Documentation" rngui:fold="closed">
170
+ <element name="description" rngui:label="Description">
171
+ <text rngui:wrap="true" rngui:label="What is supposed to happen?"/>
172
+ </element>
173
+ </element>
149
174
  </element>
@@ -113,13 +113,13 @@
113
113
  </element>
114
114
 
115
115
  </element>
116
- <element name="report" rngui:header="Reporting Annotation" rngui:fold="closed">
116
+ <element name="report" rngui:header="Reporting" rngui:fold="closed">
117
117
  <element name="url" rngui:label='HTML Snippet'>
118
118
  <data type="string" rngui:label="url to report snippet"/>
119
119
  </element>
120
120
  </element>
121
121
  </element>
122
- <element name="code" rngui:header="Implementation">
122
+ <element name="code" rngui:header="Output Handling">
123
123
  <element name="prepare" rngui:header="Prepare" rngui:label="Code" rngui:fold="closed_conditional">
124
124
  <text rngui:label="Script that is executed, before a service call"/>
125
125
  </element>
@@ -185,4 +185,34 @@
185
185
  </element>
186
186
  </element>
187
187
  </element>
188
+ <element name="input" rngui:header="Input Arguments Documentation" rngui:fold="closed">
189
+ <zeroOrMore rngui:label="Create Argument">
190
+ <element name="item" rngui:label="Description">
191
+ <attribute name="label" rngui:label="Name">
192
+ <data type="string"/>
193
+ </attribute>
194
+ <text rngui:wrap="true" rngui:label="What does it do?"/>
195
+ </element>
196
+ </zeroOrMore>
197
+ </element>
198
+ <element name="output" rngui:header="Output Elements Documentation" rngui:fold="closed">
199
+ <zeroOrMore rngui:label="Create Element">
200
+ <element name="item" rngui:label="Description">
201
+ <attribute name="label" rngui:label="Name">
202
+ <data type="string"/>
203
+ </attribute>
204
+ <text rngui:wrap="true" rngui:label="What does it do?"/>
205
+ </element>
206
+ </zeroOrMore>
207
+ </element>
208
+ <element name="implementation" rngui:header="Implementation Documentation" rngui:fold="closed">
209
+ <element name="description" rngui:label="Description">
210
+ <text rngui:wrap="true" rngui:label="What is supposed to happen?"/>
211
+ </element>
212
+ </element>
213
+ <element name="code" rngui:header="Output Handling Documentation" rngui:fold="closed">
214
+ <element name="description" rngui:label="Description">
215
+ <text rngui:wrap="true" rngui:label="Which output elements are important? How to transform and save them?"/>
216
+ </element>
217
+ </element>
188
218
  </element>
@@ -2,6 +2,12 @@
2
2
  <attribute name="wait" rngui:label="Wait" rngui:default="-1" rngui:hint="-1 to wait for all branches.">
3
3
  <data type="integer"/>
4
4
  </attribute>
5
+ <attribute name="cancel" rngui:label="Cancel" rngui:default="last" rngui:hint="Set 'Wait' to 1 for standard Event-based Gateway.">
6
+ <choice>
7
+ <value id='last'>After Last Task in Branch</value>
8
+ <value id='first'>After First Task in Branch (Event-Based Gateway)</value>
9
+ </choice>
10
+ </attribute>
5
11
  <element rngui:ignore="true" name="parallel_branch">
6
12
  <attribute name="pass">
7
13
  <data type="string"/>
@@ -1,8 +1,8 @@
1
1
  <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
2
  <rect x="1" y="3" width="24" height="24" rx="4" class="hfill rfill cline stand"/>
3
3
 
4
- <circle cx="24" cy="15" r="10" class="cline rfill stand" style="stroke-dasharray: 1,3"/>
5
- <circle cx="24" cy="15" r="7" class="cline rfill stand" style="stroke-dasharray: 1,3"/>
4
+ <circle cx="24" cy="15" r="9" class="cline rfill standthin" style="stroke-dasharray: 1,2"/>
5
+ <circle cx="24" cy="15" r="7" class="cline rfill standthin" style="stroke-dasharray: 1,2"/>
6
6
  <line x1="24" y1="11" x2="20" y2="18" class="stand"/>
7
7
  <line x1="20" y1="18" x2="28" y2="18" class="stand"/>
8
8
  <line x1="28" y1="18" x2="24" y2="11" class="stand"/>
@@ -0,0 +1,9 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <circle cx="15.5" cy="15.5" r="8" class="standthin"/>
4
+ <circle cx="15.5" cy="15.5" r="6" class="standthin"/>
5
+ <path
6
+ d="m 15.500001,11.435193 3.825246,2.779205 -1.461114,4.496849 h -4.728265 l -1.461115,-4.496849 z"
7
+ class="stand"/>
8
+ </svg>
9
+
@@ -0,0 +1,8 @@
1
+ <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
+ <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="cline hfill stand"/>
3
+ <circle cx="15.5" cy="15.5" r="8" class="standthin"/>
4
+ <circle cx="15.5" cy="15.5" r="6" class="standthin"/>
5
+ <line x1="12.5" y1="15.5" x2="18.5" y2="15.5" class="stand"/>
6
+ <line x1="15.5" y1="12.5" x2="15.5" y2="18.5" class="stand"/>
7
+ </svg>
8
+
@@ -49,6 +49,16 @@ function WFAdaptorManifestation(adaptor) {
49
49
  });
50
50
  return svgid;
51
51
  }; //}}}
52
+ //{{{ Return the json for all marked tasks
53
+ this.marked_text = function(){
54
+ var nodes = [];
55
+ var markymark = _.uniq(self.marked());
56
+ $(markymark).each(function(key,svgid){
57
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
58
+ nodes.push($(node).serializePrettyXML());
59
+ });
60
+ return JSON.stringify(nodes);
61
+ }; //}}}
52
62
  //{{{ Render the details from rng (right hand side of graph tab)
53
63
  this.update_details = function(svgid){
54
64
  var tab = $('#dat_details');
@@ -76,35 +86,46 @@ function WFAdaptorManifestation(adaptor) {
76
86
  }; //}}}
77
87
 
78
88
  function copyOrMove(menu,group,xml_node,mode) { //{{{
79
- var markymark = _.uniq(self.marked());
89
+ var nodes = localStorage.getItem('marked');
90
+
91
+ if (typeof(nodes) != "string") { return; }
92
+
93
+ nodes = JSON.parse(nodes);
94
+ $(nodes).each(function(key,str) {
95
+ nodes[key] = $X(str);;
96
+ });
97
+
80
98
  var check1 = [];
81
99
  var check2 = [];
82
- $(markymark).each(function(key,svgid){
83
- var node = self.adaptor.description.get_node_by_svg_id(svgid);
100
+ $(nodes).each(function(key,node){
84
101
  check1.push($(node).attr('svg-type'));
85
102
  });
86
103
  $(group).each(function(key,value){
87
104
  check2.push(value.type);
88
105
  });
89
106
 
90
- if (markymark.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
91
- var nodes = [];
92
- $(markymark).each(function(key,svgid){
93
- var node = self.adaptor.description.get_node_by_svg_id(svgid);
94
- nodes.unshift(node);
95
- });
96
-
107
+ if (nodes.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
108
+ if (myid == localStorage.getItem('marked_from')) {
109
+ $(nodes).each(function(key,node){
110
+ nodes[key] = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
111
+ });
112
+ }
113
+ nodes.reverse();
97
114
  var iconm = self.resources['arrow'].clone();
98
115
  var iconc = self.resources['arrow'].clone();
99
116
  iconm.children('.rfill').addClass('menu');
117
+ if (myid == localStorage.getItem('marked_from')) {
118
+ menu.push(
119
+ {
120
+ 'label': '<em>Move Marked Elements</em>',
121
+ 'function_call': mode,
122
+ 'menu_icon': iconm,
123
+ 'type': undefined,
124
+ 'params': [nodes, xml_node]
125
+ }
126
+ );
127
+ }
100
128
  menu.push(
101
- {
102
- 'label': '<em>Move Marked Elements</em>',
103
- 'function_call': mode,
104
- 'menu_icon': iconm,
105
- 'type': undefined,
106
- 'params': [nodes, xml_node]
107
- },
108
129
  {
109
130
  'label': '<em>Copy Marked Elements</em>',
110
131
  'function_call': mode,
@@ -217,16 +238,26 @@ function WFAdaptorManifestation(adaptor) {
217
238
  self.adaptor.illustrator.get_elements().removeClass('selected');
218
239
  self.adaptor.illustrator.get_labels().removeClass('selected');
219
240
 
220
- if (e && e.ctrlKey) {
241
+ if (e && (e.ctrlKey || e.metaKey)) {
221
242
  if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
222
243
  var tab = $('#dat_details');
223
244
  tab.empty();
224
245
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
225
246
  if (vtarget.length > 0) {
226
- vtarget.parents('g.element[element-id]').toggleClass('marked');
247
+ var vt = vtarget.parents('g.element[element-id]');
248
+ vt.toggleClass('marked');
249
+ if (vt.hasClass('marked')) {
250
+ localStorage.setItem('marked',self.marked_text());
251
+ localStorage.setItem('marked_from',myid);
252
+ } else {
253
+ localStorage.removeItem('marked');
254
+ localStorage.removeItem('marked_from');
255
+ }
227
256
  }
228
257
  } else {
229
258
  self.adaptor.illustrator.get_elements().removeClass('marked');
259
+ localStorage.removeItem('marked');
260
+ localStorage.removeItem('marked_from');
230
261
 
231
262
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
232
263
  if (vtarget.length > 0) {
@@ -475,8 +506,12 @@ function WFAdaptorManifestation(adaptor) {
475
506
  'endnodes': 'this',
476
507
  'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
477
508
  'resolve_symbol': function(node) {
478
- if($(node).attr('wait') == '-1') {
509
+ if($(node).attr('cancel') == 'last' && $(node).attr('wait') == '-1') {
479
510
  return 'parallel_simple';
511
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '-1') {
512
+ return 'parallel_event_all';
513
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '1') {
514
+ return 'parallel_event_one';
480
515
  } else {
481
516
  return 'parallel_complex';
482
517
  }
@@ -851,7 +886,16 @@ function WFAdaptorManifestation(adaptor) {
851
886
  'col_shift': function(node) {
852
887
  return true;
853
888
  },
854
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
889
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
890
+ 'resolve_symbol': function(node) {
891
+ if($(node).attr('cancel') == 'last') {
892
+ return 'parallel_start';
893
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == 1) {
894
+ return 'parallel_eventbased_exclusive';
895
+ } else {
896
+ return 'parallel_eventbased_parallel';
897
+ }
898
+ },
855
899
  },//}}}
856
900
  'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
857
901
  'permissible_children': function(node,mode) { //{{{
@@ -1283,6 +1327,24 @@ function WFAdaptorManifestation(adaptor) {
1283
1327
  'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1284
1328
  },//}}}
1285
1329
  }; /*}}}*/
1330
+ this.elements.parallel_start = { /*{{{*/
1331
+ 'parent': 'parallel',
1332
+ 'illustrator': {//{{{
1333
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1334
+ }//}}}
1335
+ }; /*}}}*/
1336
+ this.elements.parallel_eventbased_exclusive = { /*{{{*/
1337
+ 'parent': 'parallel',
1338
+ 'illustrator': {//{{{
1339
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1340
+ }//}}}
1341
+ }; /*}}}*/
1342
+ this.elements.parallel_eventbased_parallel = { /*{{{*/
1343
+ 'parent': 'parallel',
1344
+ 'illustrator': {//{{{
1345
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1346
+ }//}}}
1347
+ }; /*}}}*/
1286
1348
  this.elements.parallel_simple = { /*{{{*/
1287
1349
  'parent': 'parallel_finish',
1288
1350
  'illustrator': {//{{{
@@ -1295,6 +1357,18 @@ function WFAdaptorManifestation(adaptor) {
1295
1357
  'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1296
1358
  },//}}}
1297
1359
  }; /*}}}*/
1360
+ this.elements.parallel_event_all = { /*{{{*/
1361
+ 'parent': 'parallel_finish',
1362
+ 'illustrator': {//{{{
1363
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1364
+ }//}}}
1365
+ }; /*}}}*/
1366
+ this.elements.parallel_event_one = { /*{{{*/
1367
+ 'parent': 'parallel_finish',
1368
+ 'illustrator': {//{{{
1369
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1370
+ }//}}}
1371
+ }; /*}}}*/
1298
1372
  this.elements.parallel_branch_normal = { /*{{{*/
1299
1373
  'parent': 'parallel_branch',
1300
1374
  'illustrator': {//{{{