cpee 2.1.56 → 2.1.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/resources-label.css +33 -32
  3. data/cockpit/css/resources-svg.css +2 -2
  4. data/cockpit/css/ui.css +2 -42
  5. data/cockpit/css/wfadaptor.css +9 -0
  6. data/cockpit/edit.html +15 -2
  7. data/cockpit/graph.html +12 -1
  8. data/cockpit/index.html +14 -1
  9. data/cockpit/js/details.js +1 -0
  10. data/cockpit/js/instance.js +29 -13
  11. data/cockpit/js/resources.js +59 -11
  12. data/cockpit/js/wfadaptor.js +10 -6
  13. data/cockpit/model.html +3 -2
  14. data/cockpit/themes/base.js +1506 -0
  15. data/cockpit/themes/compact/rngs/start.rng +10 -0
  16. data/cockpit/themes/compact/symbols/start_event.svg +1 -1
  17. data/cockpit/themes/compact/theme.js +8 -1487
  18. data/cockpit/themes/control/rngs/start.rng +10 -0
  19. data/cockpit/themes/control/symbols/start_event.svg +1 -1
  20. data/cockpit/themes/control/theme.js +277 -1334
  21. data/cockpit/themes/dataflow/rngs/start.rng +10 -0
  22. data/cockpit/themes/dataflow/symbols/start_event.svg +1 -1
  23. data/cockpit/themes/dataflow/theme.js +144 -1563
  24. data/cockpit/themes/default/rngs/start.rng +10 -0
  25. data/cockpit/themes/default/symbols/start_event.svg +1 -1
  26. data/cockpit/themes/default/theme.js +1 -1493
  27. data/cockpit/themes/extended/rngs/start.rng +10 -0
  28. data/cockpit/themes/extended/symbols/start_event.svg +1 -1
  29. data/cockpit/themes/extended/theme.js +81 -1529
  30. data/cockpit/themes/felix/symbols/start_event.svg +1 -1
  31. data/cockpit/themes/felix/theme.js +68 -1528
  32. data/cockpit/themes/model/symbols/start_event.svg +1 -1
  33. data/cockpit/themes/model/theme.js +735 -1383
  34. data/cockpit/themes/packed/rngs/start.rng +10 -0
  35. data/cockpit/themes/packed/symbols/start_event.svg +1 -1
  36. data/cockpit/themes/packed/theme.js +9 -1487
  37. data/cockpit/themes/preset/rngs/start.rng +10 -0
  38. data/cockpit/themes/preset/symbols/start_event.svg +1 -1
  39. data/cockpit/themes/preset/theme.js +1 -1493
  40. data/cockpit/track.html +11 -0
  41. data/cpee.gemspec +1 -1
  42. data/lib/properties/executionhandler.rng +1 -1
  43. data/lib/properties.xml +1 -1
  44. data/server/executionhandlers/ruby/connection.rb +8 -11
  45. data/server/executionhandlers/rust/backend/README.md +17 -0
  46. data/server/executionhandlers/rust/backend/compile.sh +5 -0
  47. data/server/executionhandlers/rust/backend/opts.yaml +6 -0
  48. data/server/executionhandlers/rust/execution.rb +84 -0
  49. data/server/routing/end.pid +1 -1
  50. data/server/routing/forward-events-00.pid +1 -1
  51. data/server/routing/forward-votes.pid +1 -1
  52. data/server/routing/persist.pid +1 -1
  53. metadata +8 -3
@@ -0,0 +1,1506 @@
1
+ function WFAdaptorManifestationBase(adaptor) {
2
+ var self = this;
3
+
4
+ this.adaptor = adaptor;
5
+ this.resources = {};
6
+ this.elements = {};
7
+ this.events = {};
8
+ this.compact = false;
9
+ this.striped = false;
10
+ this.endpoints = {};
11
+ this.presstimer;
12
+
13
+ //{{{ transform the details data to description parts based on rng
14
+ this.source = function(base,opts) {
15
+ if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
16
+ $('#relaxngworker').empty();
17
+ var rngw = new RelaxNGui(base,$('#relaxngworker'),self.adaptor.description.context_eval);
18
+ var nnew = $(rngw.save().documentElement);
19
+ return(nnew);
20
+ } else {
21
+ if (opts && opts == 'clone') {
22
+ base = base.clone();
23
+ if (base.attr('id')) {
24
+ base.attr('id',self.adaptor.description.get_free_id());
25
+ }
26
+ base.find('*[id]').each(function(k,v){
27
+ $(v).attr('id',self.adaptor.description.get_free_id(base));
28
+ });
29
+ }
30
+ return base;
31
+ }
32
+ }; //}}}
33
+ //{{{ Return the svgid for the selected task
34
+ this.selected = function(){
35
+ var svgid = 'unknown';
36
+ _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
37
+ if ($(value).hasClass('selected')) {
38
+ svgid = $(value).attr('element-id');
39
+ }
40
+ });
41
+ return svgid;
42
+ }; //}}}
43
+ //{{{ Return the svgids for all marked tasks
44
+ this.marked = function(){
45
+ var svgid = [];
46
+ _.each(self.adaptor.illustrator.get_elements(),function(value,key) {
47
+ if ($(value).hasClass('marked')) {
48
+ svgid.push($(value).attr('element-id'));
49
+ }
50
+ });
51
+ return svgid;
52
+ }; //}}}
53
+ //{{{ Return the json for all marked tasks
54
+ this.marked_text = function(){
55
+ var nodes = [];
56
+ var markymark = _.uniq(self.marked());
57
+ $(markymark).each(function(key,svgid){
58
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
59
+ nodes.push($(node).serializePrettyXML());
60
+ });
61
+ return JSON.stringify(nodes);
62
+ }; //}}}
63
+ //{{{ Render the details from rng (right hand side of graph tab)
64
+ this.update_details = function(svgid){
65
+ var tab = $('#dat_details');
66
+ var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
67
+ if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
68
+ save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
69
+ var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
70
+ if (save['endpoints_cache'][$(node).attr('endpoint')] && save['endpoints_cache'][$(node).attr('endpoint')].schema) {
71
+ var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
72
+ $(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
73
+ }
74
+ if (save['endpoints_list'][$(node).attr('endpoint')] && (!save['endpoints_list'][$(node).attr('endpoint')].startsWith('http') || save['endpoints_list'][$(node).attr('endpoint')].match(/^https?-/))) {
75
+ $(rng).find(' > element[name="parameters"] > element[name="method"]').remove();
76
+ }
77
+ var nn = $X($(node).serializeXML());
78
+ nn.removeAttr('svg-id');
79
+ nn.removeAttr('svg-type');
80
+ nn.removeAttr('svg-subtype');
81
+ nn.removeAttr('svg-label');
82
+
83
+ tab.empty();
84
+ save['details'] = new RelaxNGui(rng,tab,self.adaptor.description.context_eval,true);
85
+ save['details'].content(nn);
86
+
87
+ format_visual_forms();
88
+ }
89
+ }; //}}}
90
+
91
+ // Private methods
92
+ function copyOrMove(menu,group,xml_node,mode) { //{{{
93
+ var nodes = localStorage.getItem('marked');
94
+
95
+ if (typeof(nodes) != "string") { return; }
96
+
97
+ nodes = JSON.parse(nodes);
98
+ $(nodes).each(function(key,str) {
99
+ nodes[key] = $X(str);
100
+ });
101
+
102
+ var check1 = [];
103
+ var check2 = [];
104
+ $(nodes).each(function(key,node){
105
+ check1.push($(node).attr('svg-type'));
106
+ });
107
+ $(group).each(function(key,value){
108
+ check2.push(value.type);
109
+ });
110
+
111
+ if (nodes.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
112
+ if (myid == localStorage.getItem('marked_from')) {
113
+ $(nodes).each(function(key,node){
114
+ nodes[key] = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
115
+ });
116
+ }
117
+ nodes.reverse();
118
+ var iconm = self.resources['arrow'].clone();
119
+ var iconc = self.resources['arrow'].clone();
120
+ iconm.children('.rfill').addClass('menu');
121
+ if (myid == localStorage.getItem('marked_from')) {
122
+ menu.push(
123
+ {
124
+ 'label': '<em>Move Marked Elements</em>',
125
+ 'function_call': mode,
126
+ 'menu_icon': iconm,
127
+ 'type': undefined,
128
+ 'params': [nodes, xml_node]
129
+ }
130
+ );
131
+ }
132
+ menu.push(
133
+ {
134
+ 'label': '<em>Copy Marked Elements</em>',
135
+ 'function_call': mode,
136
+ 'menu_icon': iconc,
137
+ 'type': undefined,
138
+ 'params': [nodes, xml_node, 'clone']
139
+ }
140
+ );
141
+ }
142
+ } //}}}
143
+
144
+ function contextMenuHandling(svgid,e,child,sibling) { //{{{
145
+ if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
146
+
147
+ var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
148
+ var group = null;
149
+ var menu = {};
150
+
151
+ if (child) {
152
+ group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
153
+ if(group.length > 0) {
154
+ menu['Insert into'] = group;
155
+ copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
156
+ }
157
+ if (self.elements[xml_node.get(0).tagName].permissible_children_expert) {
158
+ group = self.elements[xml_node.get(0).tagName].permissible_children_expert(xml_node,'into');
159
+ if(group.length > 0) {
160
+ menu['Insert into (Experts Only!)'] = group;
161
+ copyOrMove(menu['Insert into (Experts Only!)'],group,xml_node,self.adaptor.description.insert_first_into);
162
+ }
163
+ }
164
+ }
165
+ if (sibling) {
166
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node,'after');
167
+ if(group.length > 0) {
168
+ menu['Insert after'] = group;
169
+ copyOrMove(menu['Insert after'],group,xml_node,self.adaptor.description.insert_after);
170
+ }
171
+ if (self.elements[xml_node.parent().get(0).tagName].permissible_children_expert) {
172
+ group = self.elements[xml_node.parent().get(0).tagName].permissible_children_expert(xml_node,'after');
173
+ if(group.length > 0) {
174
+ menu['Insert after (Experts Only!)'] = group;
175
+ copyOrMove(menu['Insert after (Experts Only!)'],group,xml_node,self.adaptor.description.insert_after);
176
+ }
177
+ }
178
+ }
179
+
180
+ if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
181
+ var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
182
+ icon.find('.rfill').addClass('menu');
183
+ icon.find('.hfill').addClass('menu');
184
+ menu['Delete'] = [{
185
+ 'label': 'Remove Element',
186
+ 'function_call': function(selector,target,selected){
187
+ del_ui_pos(target)
188
+ self.adaptor.description.remove(selector,target);
189
+ localStorage.removeItem('marked');
190
+ localStorage.removeItem('marked_from');
191
+ },
192
+ 'menu_icon': icon,
193
+ 'type': undefined,
194
+ 'params': [null, xml_node, self.selected()]
195
+ }];
196
+ var nodes = localStorage.getItem('marked');
197
+ nodes = JSON.parse(nodes);
198
+ if (nodes && nodes.length > 0) {
199
+ var icond = self.resources['delete'].clone();
200
+ icond.children('.standfat').addClass('menu');
201
+ menu['Delete'].push({
202
+ 'label': 'Remove Marked Elements',
203
+ 'function_call': function(){
204
+ $(nodes).each(function(key,str) {
205
+ nodes[key] = $X(str);
206
+ });
207
+ let svgids = [];
208
+ $(nodes).each(function(key,node){
209
+ svgids.push($(node).attr('svg-id'));
210
+ });
211
+ svgids.sort((a,b) => {
212
+ if (a > b) { return -1; }
213
+ else if (a < b) { return 1; }
214
+ else { return 0; }
215
+ });
216
+ svgids.forEach(svgid => {
217
+ var target = self.adaptor.description.get_node_by_svg_id(svgid);
218
+ del_ui_pos(target)
219
+ self.adaptor.description.remove(null,target);
220
+ localStorage.removeItem('marked');
221
+ localStorage.removeItem('marked_from');
222
+ });
223
+ },
224
+ 'menu_icon': icond,
225
+ 'type': undefined,
226
+ 'params': []
227
+ })
228
+ }
229
+ }
230
+ if($('> code', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
231
+ var icon = self.elements.callmanipulate.illustrator.svg.clone();
232
+ icon.children('.rfill:last').addClass('menu');
233
+ menu['Delete'].push({
234
+ 'label': 'Remove Scripts',
235
+ 'function_call': self.adaptor.description.remove,
236
+ 'menu_icon': icon,
237
+ 'type': undefined,
238
+ 'params': ['> code', xml_node]
239
+ });
240
+ }
241
+ if (xml_node.get(0).tagName == "call" || xml_node.get(0).tagName == "manipulate" || xml_node.get(0).tagName == "stop") {
242
+ var icon = self.elements.call.illustrator.svg.clone();
243
+ icon.children('g.replace').addClass('passive');
244
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
245
+ if (vtarget.length > 0) {
246
+ if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
247
+ menu['Position'] = [{
248
+ 'label': 'No Execution from here',
249
+ 'function_call': del_ui_pos,
250
+ 'menu_icon': icon,
251
+ 'type': undefined,
252
+ 'params': xml_node
253
+ }];
254
+ } else {
255
+ menu['Position'] = [{
256
+ 'label': 'Execute from here',
257
+ 'function_call': add_ui_pos,
258
+ 'menu_icon': icon,
259
+ 'type': undefined,
260
+ 'params': xml_node
261
+ }];
262
+ }
263
+ }
264
+ }
265
+ new CustomMenu(e).contextmenu(menu);
266
+ } //}}}
267
+
268
+ function positionHandling(svgid) { //{{{
269
+ var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
270
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
271
+ if (vtarget.length > 0) {
272
+ if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
273
+ del_ui_pos(xml_node);
274
+ } else {
275
+ add_ui_pos(xml_node);
276
+ }
277
+ }
278
+ } //}}}
279
+
280
+ // Events
281
+ this.events.touchend = function(svgid, e) { // {{{
282
+ clearTimeout(self.presstimer);
283
+ } // }}}
284
+ this.events.touchstart = function(svgid, e, child, sibling) { // {{{
285
+ self.presstimer = window.setTimeout(function() { contextMenuHandling(svgid,e,child,sibling); },1000);
286
+ return false;
287
+ } // }}}
288
+ this.events.mousedown = function(svgid, e, child, sibling) { // {{{
289
+ if(e.button == 0) { // left-click
290
+ } else if(e.button == 1) { // middle-click
291
+ positionHandling(svgid);
292
+ } else if(e.button == 2) { // right-click
293
+ contextMenuHandling(svgid,e,child,sibling);
294
+ }
295
+ return false;
296
+ } // }}}
297
+ this.events.suppress = function(svgid, e, child, sibling) { // {{{
298
+ return false;
299
+ } // }}}
300
+ this.events.click = function(svgid, e) { // {{{
301
+ if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
302
+ return;
303
+ }
304
+
305
+ $('#graphgrid .selected').removeClass('selected');
306
+
307
+ if (e && (e.ctrlKey || e.metaKey)) {
308
+ if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
309
+ var tab = $('#dat_details');
310
+ tab.empty();
311
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
312
+ if (vtarget.length > 0) {
313
+ var vt = vtarget.parents('g.element[element-id]');
314
+ vt.toggleClass('marked');
315
+ if (vt.hasClass('marked')) {
316
+ localStorage.setItem('marked',self.marked_text());
317
+ localStorage.setItem('marked_from',myid);
318
+ } else {
319
+ localStorage.removeItem('marked');
320
+ localStorage.removeItem('marked_from');
321
+ }
322
+ }
323
+ } else if (e && (e.shiftKey)) {
324
+ positionHandling(svgid);
325
+ } else {
326
+ self.adaptor.illustrator.get_elements().removeClass('marked');
327
+ localStorage.removeItem('marked');
328
+ localStorage.removeItem('marked_from');
329
+
330
+ var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
331
+ if (vtarget.length > 0) {
332
+ vtarget.parents('g.element[element-id]').addClass('selected');
333
+ }
334
+ self.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
335
+ $('#graphgrid [element-id=' + svgid + ']').addClass('selected');
336
+
337
+ self.update_details(svgid);
338
+ }
339
+ } // }}}
340
+ this.events.dblclick = function(svgid, e) { // {{{
341
+ } // }}}
342
+ this.events.mouseover = function(svgid, e) { // {{{
343
+ let er = self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"][element-row]').attr('element-row');
344
+ $('.resource-row[element-row=' + er + '] .resource-point').each((_,e) => {
345
+ let pos = e.getBoundingClientRect();
346
+ let text = $('text',e).text();
347
+ show_label(pos.x + 12, pos.y + 5, 60, text);
348
+ })
349
+ self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','block');
350
+ self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').addClass('hover');
351
+ self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
352
+ return false;
353
+ } // }}}
354
+ this.events.mouseout = function(svgid, e) { // {{{
355
+ $('.displaylabel').remove();
356
+ self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','none');
357
+ self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').removeClass('hover');
358
+ self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
359
+ return false;
360
+ } // }}}
361
+ this.events.dragstart = function (svgid, e) { //{{{
362
+ } //}}}
363
+
364
+ // Other resources
365
+ this.resources.arrow = self.adaptor.theme_dir + 'symbols/arrow.svg';
366
+ this.resources.delete = self.adaptor.theme_dir + 'symbols/delete.svg';
367
+
368
+ // Primitive Elements
369
+ this.elements.call = { /*{{{*/
370
+ 'type': 'primitive',
371
+ 'illustrator': {//{{{
372
+ 'endnodes': 'this',
373
+ 'label': function(node){
374
+ var ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
375
+ return ret;
376
+ },
377
+ 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
378
+ 'resolve_symbol': function(node) {
379
+ if ($('> annotations > _context_data_analysis > probes > probe', node).length > 0) {
380
+ if ($('> code', node).length > 0) {
381
+ return 'callmanipulate_sensor';
382
+ } else {
383
+ return 'call_sensor';
384
+ }
385
+ } else {
386
+ if ($('> code', node).length > 0) {
387
+ return 'callmanipulate';
388
+ } else {
389
+ return 'call';
390
+ }
391
+ }
392
+ },
393
+ 'svg': self.adaptor.theme_dir + 'symbols/call.svg'
394
+ },//}}}
395
+ 'description': self.adaptor.theme_dir + 'rngs/call.rng',
396
+ 'permissible_children': function(node,mode) { //{{{
397
+ if(node.children('code').length < 1)
398
+ return [
399
+ {'label': 'Scripts',
400
+ 'function_call': self.adaptor.description.insert_last_into,
401
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
402
+ 'type': undefined,
403
+ 'params': [self.adaptor.description.elements.scripts, node]}
404
+ ];
405
+ return [];
406
+ }, //}}}
407
+ 'adaptor': {//{{{
408
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
409
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
410
+ 'touchend': self.events.touchend,
411
+ 'click': self.events.click,
412
+ 'dragstart': self.events.dragstart,
413
+ 'mouseover': self.events.mouseover,
414
+ 'mouseout': self.events.mouseout
415
+ }//}}}
416
+ }; /*}}}*/
417
+ this.elements.manipulate = { /*{{{*/
418
+ 'type': 'primitive',
419
+ 'illustrator': {//{{{
420
+ 'endnodes': 'this',
421
+ 'label': function(node){
422
+ var lab = $(node).attr('label');
423
+ if (lab) {
424
+ return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') } ];
425
+ } else {
426
+ return [];
427
+ }
428
+ },
429
+ 'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
430
+ },//}}}
431
+ 'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
432
+ 'permissible_children': function(node,mode) { //{{{
433
+ return [];
434
+ }, //}}}
435
+ 'adaptor': {//{{{
436
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
437
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,false,true); },
438
+ 'touchend': self.events.touchend,
439
+ 'click': self.events.click,
440
+ 'mouseover': self.events.mouseover,
441
+ 'mouseout': self.events.mouseout
442
+ }//}}}
443
+ }; /*}}}*/
444
+ this.elements.escape = { /*{{{*/
445
+ 'type': 'primitive',
446
+ 'illustrator': {//{{{
447
+ 'endnodes': 'this',
448
+ 'svg': self.adaptor.theme_dir + 'symbols/escape.svg'
449
+ },//}}}
450
+ 'description': self.adaptor.theme_dir + 'rngs/escape.rng',
451
+ 'permissible_children': function(node,mode) { //{{{
452
+ return [];
453
+ }, //}}}
454
+ 'adaptor': {//{{{
455
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
456
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,false,true); },
457
+ 'touchend': self.events.touchend,
458
+ 'click': self.events.click,
459
+ 'mouseover': self.events.mouseover,
460
+ 'mouseout': self.events.mouseout
461
+ }//}}}
462
+ }; /*}}}*/
463
+ this.elements.stop = { /*{{{*/
464
+ 'type': 'primitive',
465
+ 'illustrator': {//{{{
466
+ 'endnodes': 'this',
467
+ 'svg': self.adaptor.theme_dir + 'symbols/stop.svg'
468
+ },//}}}
469
+ 'description': self.adaptor.theme_dir + 'rngs/stop.rng',
470
+ 'permissible_children': function(node,mode) { //{{{
471
+ return [];
472
+ }, //}}}
473
+ 'adaptor': {//{{{
474
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
475
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,false,true); },
476
+ 'touchend': self.events.touchend,
477
+ 'click': self.events.click,
478
+ 'mouseover': self.events.mouseover,
479
+ 'mouseout': self.events.mouseout
480
+ }//}}}
481
+ }; /*}}}*/
482
+ this.elements.terminate = { /*{{{*/
483
+ 'type': 'primitive',
484
+ 'illustrator': {//{{{
485
+ 'endnodes': 'this',
486
+ 'final': true,
487
+ 'svg': self.adaptor.theme_dir + 'symbols/terminate.svg'
488
+ },//}}}
489
+ 'description': self.adaptor.theme_dir + 'rngs/terminate.rng',
490
+ 'permissible_children': function(node,mode) { //{{{
491
+ return [];
492
+ }, //}}}
493
+ 'adaptor': {//{{{
494
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
495
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,false,false); },
496
+ 'touchend': self.events.touchend,
497
+ 'mouseover': self.events.mouseover,
498
+ 'mouseout': self.events.mouseout
499
+ }//}}}
500
+ }; /*}}}*/
501
+ this.elements.end = { /*{{{*/
502
+ 'type': 'primitive',
503
+ 'illustrator': {//{{{
504
+ 'endnodes': 'this',
505
+ 'svg': self.adaptor.theme_dir + 'symbols/end.svg'
506
+ }, //}}}
507
+ 'adaptor': {//{{{
508
+ 'mousedown': function (node,e) { self.events.suppress(); }
509
+ }//}}}
510
+ }; /*}}}*/
511
+ this.elements.event_end = { /*{{{*/
512
+ 'type': 'primitive',
513
+ 'illustrator': {//{{{
514
+ 'endnodes': 'this',
515
+ 'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
516
+ }, //}}}
517
+ 'adaptor': {//{{{
518
+ 'mousedown': function (node,e) { self.events.suppress(); },
519
+ 'click': self.events.click,
520
+ 'dblclick': self.events.dblclick,
521
+ 'mouseover': self.events.mouseover,
522
+ 'mouseout': self.events.mouseout
523
+ }//}}}
524
+ }; /*}}}*/
525
+ this.elements.choose_finish = { /*{{{*/
526
+ 'type': 'primitive',
527
+ 'illustrator': {//{{{
528
+ 'endnodes': 'this',
529
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg',
530
+ 'resolve_symbol': function(node) {
531
+ if($(node).attr('mode') == 'exclusive') {
532
+ return 'choose_exclusive_finish';
533
+ } else {
534
+ return 'choose_inclusive_finish';
535
+ }
536
+ },
537
+ }, //}}}
538
+ 'adaptor': {//{{{
539
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
540
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
541
+ 'touchend': self.events.touchend,
542
+ 'click': self.events.click,
543
+ 'dblclick': self.events.dblclick,
544
+ 'mouseover': self.events.mouseover,
545
+ 'mouseout': self.events.mouseout
546
+ }//}}}
547
+ }; /*}}}*/
548
+ this.elements.loop_finish = { /*{{{*/
549
+ 'type': 'primitive',
550
+ 'illustrator': {//{{{
551
+ 'endnodes': 'this',
552
+ 'closeblock': true,
553
+ 'label': function(node){
554
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
555
+ return ret;
556
+ },
557
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg',
558
+ }, //}}}
559
+ 'adaptor': {//{{{
560
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
561
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
562
+ 'touchend': self.events.touchend,
563
+ 'click': self.events.click,
564
+ 'dblclick': self.events.dblclick,
565
+ 'mouseover': self.events.mouseover,
566
+ 'mouseout': self.events.mouseout
567
+ }//}}}
568
+ }; /*}}}*/
569
+ this.elements.parallel_finish = { /*{{{*/
570
+ 'type': 'primitive',
571
+ 'illustrator': {//{{{
572
+ 'endnodes': 'this',
573
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
574
+ 'resolve_symbol': function(node) {
575
+ if($(node).children(':not(parallel_branch)').length > 0) {
576
+ return 'parallel_complex';
577
+ } else if($(node).attr('cancel') == 'last' && $(node).attr('wait') == '-1') {
578
+ return 'parallel_simple';
579
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '-1') {
580
+ return 'parallel_event_all';
581
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '1') {
582
+ return 'parallel_event_one';
583
+ } else {
584
+ return 'parallel_complex';
585
+ }
586
+ },
587
+ }, //}}}
588
+ 'adaptor': {//{{{
589
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
590
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
591
+ 'touchend': self.events.touchend,
592
+ 'click': self.events.click,
593
+ 'dblclick': self.events.dblclick,
594
+ 'mouseover': self.events.mouseover,
595
+ 'mouseout': self.events.mouseout
596
+ }//}}}
597
+ }; /*}}}*/
598
+
599
+ // Complex Elements
600
+ this.elements.choose = { /*{{{*/
601
+ 'type': 'complex',
602
+ 'illustrator': {//{{{
603
+ 'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
604
+ 'endnodes': 'aggregate',
605
+ 'closeblock': false,
606
+ 'closing_symbol': 'choose_finish',
607
+ 'expansion': function(node) {
608
+ return 'horizontal';
609
+ },
610
+ 'resolve_symbol': function(node) {
611
+ if($(node).attr('mode') == 'exclusive') {
612
+ return 'choose_exclusive';
613
+ } else {
614
+ return 'choose_inclusive';
615
+ }
616
+ },
617
+ 'col_shift': function(node) {
618
+ return false;
619
+ },
620
+ 'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
621
+ },//}}}
622
+ 'description': self.adaptor.theme_dir + 'rngs/choose.rng',
623
+ 'permissible_children': function(node,mode) { //{{{
624
+ var func = null;
625
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
626
+ else { func = self.adaptor.description.insert_after }
627
+ if(node.children('parallel_branch').length > 0) {
628
+ return [{'label': 'Parallel Branch',
629
+ 'function_call': func,
630
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
631
+ 'type': 'parallel_branch',
632
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
633
+ }
634
+ var childs = [{'label': 'Alternative',
635
+ 'function_call': func,
636
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
637
+ 'type': 'alternative',
638
+ 'params': [self.adaptor.description.elements.alternative, node]}];
639
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length && node.parent('choose').length == 0)
640
+ childs.push({'label': 'Otherwise',
641
+ 'function_call': self.adaptor.description.insert_last_into,
642
+ 'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
643
+ 'type': 'otherwise',
644
+ 'params': [self.adaptor.description.elements.otherwise, node]});
645
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
646
+ childs.push({'label': 'Parallel Branch',
647
+ 'function_call': func,
648
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
649
+ 'type': 'parallel_branch',
650
+ 'params': [self.adaptor.description.elements.parallel_branch, node]});
651
+ return childs;
652
+ }, //}}}
653
+ 'adaptor': {//{{{
654
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
655
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
656
+ 'touchend': self.events.touchend,
657
+ 'click': self.events.click,
658
+ 'dblclick': self.events.dblclick,
659
+ 'mouseover': self.events.mouseover,
660
+ 'mouseout': self.events.mouseout
661
+ }//}}}
662
+ }; /*}}}*/
663
+ this.elements.otherwise = { /*{{{*/
664
+ 'type': 'complex',
665
+ 'illustrator': {//{{{
666
+ 'endnodes': 'passthrough',
667
+ 'closeblock': false,
668
+ 'noarrow': true,
669
+ 'expansion': function(node) {
670
+ return 'vertical';
671
+ },
672
+ 'col_shift': function(node) {
673
+ return false;
674
+ },
675
+ 'svg': self.adaptor.theme_dir + 'symbols/otherwise.svg'
676
+ },//}}}
677
+ 'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
678
+ 'neverdelete': true,
679
+ 'permissible_children': function(node,mode) { //{{{
680
+ var func = null;
681
+ var childs = null;
682
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
683
+ else { func = self.adaptor.description.insert_after }
684
+ var childs = [
685
+ {'label': 'Service Call with Scripts',
686
+ 'function_call': func,
687
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
688
+ 'type': 'callmanipulate',
689
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
690
+ {'label': 'Service Call',
691
+ 'function_call': func,
692
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
693
+ 'type': 'call',
694
+ 'params': [self.adaptor.description.elements.call, node]},
695
+ {'label': 'Script',
696
+ 'function_call': func,
697
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
698
+ 'type': 'manipulate',
699
+ 'params': [self.adaptor.description.elements.manipulate, node]},
700
+ {'label': 'Parallel',
701
+ 'function_call': func,
702
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
703
+ 'type': 'parallel',
704
+ 'params': [self.adaptor.description.elements.parallel, node]},
705
+ {'label': 'Decision',
706
+ 'function_call': func,
707
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
708
+ 'type': 'choose',
709
+ 'params': [self.adaptor.description.elements.choose, node]},
710
+ {'label': 'Loop',
711
+ 'function_call': func,
712
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
713
+ 'type': 'loop',
714
+ 'params': [self.adaptor.description.elements.loop, node]},
715
+ {'label': 'Terminate',
716
+ 'function_call': func,
717
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
718
+ 'type': 'terminate',
719
+ 'params': [self.adaptor.description.elements.terminate, node]},
720
+ {'label': 'Stop',
721
+ 'function_call': func,
722
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
723
+ 'type': 'stop',
724
+ 'params': [self.adaptor.description.elements.stop, node]}
725
+ ];
726
+ if(node.parent('parallel_branch').length > 0) {
727
+ childs.push({
728
+ 'label': 'Critical',
729
+ 'function_call': func,
730
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
731
+ 'type': 'critical',
732
+ 'params': [self.adaptor.description.elements.critical, node]
733
+ });
734
+ }
735
+ return childs;
736
+ }, //}}}
737
+ 'adaptor': {//{{{
738
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,false); },
739
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,false); },
740
+ 'touchend': self.events.touchend,
741
+ 'click': self.events.click,
742
+ 'dblclick': self.events.dblclick,
743
+ 'mouseover': self.events.mouseover,
744
+ 'mouseout': self.events.mouseout,
745
+ }//}}}
746
+ }; /*}}}*/
747
+ this.elements.alternative = { /*{{{*/
748
+ 'type': 'complex',
749
+ 'illustrator': {//{{{
750
+ 'label': function(node){
751
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
752
+ return ret;
753
+ },
754
+ 'endnodes': 'passthrough',
755
+ 'noarrow': true,
756
+ 'closeblock':false,
757
+ 'expansion': function(node) {
758
+ return 'vertical';
759
+ },
760
+ 'col_shift': function(node) {
761
+ return false;
762
+ },
763
+ 'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
764
+ },//}}}
765
+ 'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
766
+ 'permissible_children': function(node,mode) { //{{{
767
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
768
+ else { func = self.adaptor.description.insert_after }
769
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
770
+ return [{'label': 'Parallel Branch',
771
+ 'function_call': func,
772
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
773
+ 'type': 'parallel_branch',
774
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}];
775
+ }
776
+ var childs = [
777
+ {'label': 'Service Call with Scripts',
778
+ 'function_call': func,
779
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
780
+ 'type': 'callmanipulate',
781
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
782
+ {'label': 'Service Call',
783
+ 'function_call': func,
784
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
785
+ 'type': 'call',
786
+ 'params': [self.adaptor.description.elements.call, node]},
787
+ {'label': 'Script',
788
+ 'function_call': func,
789
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
790
+ 'type': 'manipulate',
791
+ 'params': [self.adaptor.description.elements.manipulate, node]},
792
+ {'label': 'Parallel',
793
+ 'function_call': func,
794
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
795
+ 'type': 'parallel',
796
+ 'params': [self.adaptor.description.elements.parallel, node]},
797
+ {'label': 'Decision',
798
+ 'function_call': func,
799
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
800
+ 'type': 'choose',
801
+ 'params': [self.adaptor.description.elements.choose, node]},
802
+ {'label': 'Loop',
803
+ 'function_call': func,
804
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
805
+ 'type': 'loop',
806
+ 'params': [self.adaptor.description.elements.loop, node]},
807
+ {'label': 'Terminate',
808
+ 'function_call': func,
809
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
810
+ 'type': 'terminate',
811
+ 'params': [self.adaptor.description.elements.terminate, node]},
812
+ {'label': 'Stop',
813
+ 'function_call': func,
814
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
815
+ 'type': 'stop',
816
+ 'params': [self.adaptor.description.elements.stop, node]}
817
+ ];
818
+ if(node.parent('parallel_branch').length > 0) {
819
+ childs.push({
820
+ 'label': 'Critical',
821
+ 'function_call': func,
822
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
823
+ 'type': 'critical',
824
+ 'params': [self.adaptor.description.elements.critical, node]
825
+ });
826
+ }
827
+ return childs;
828
+ }, //}}}
829
+ 'adaptor': {//{{{
830
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
831
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
832
+ 'touchend': self.events.touchend,
833
+ 'click': self.events.click,
834
+ 'dblclick': self.events.dblclick,
835
+ 'mouseover': self.events.mouseover,
836
+ 'mouseout': self.events.mouseout,
837
+ }//}}}
838
+ }; /*}}}*/
839
+ this.elements.loop = { /*{{{*/
840
+ 'type': 'complex',
841
+ 'illustrator': {//{{{
842
+ 'resolve_symbol': function(node) {
843
+ if($(node).attr('mode') == 'pre_test') {
844
+ return 'loop_head';
845
+ } else {
846
+ return 'loop_tail';
847
+ }
848
+ },
849
+ 'expansion': function(node) {
850
+ return 'vertical';
851
+ },
852
+ 'col_shift': function(node) {
853
+ return true;
854
+ },
855
+ 'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
856
+ },// }}}
857
+ 'description': self.adaptor.theme_dir + 'rngs/loop.rng',
858
+ 'permissible_children': function(node,mode) { //{{{
859
+ var func = null;
860
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
861
+ else { func = self.adaptor.description.insert_after }
862
+ var childs = [
863
+ {'label': 'Service Call with Scripts',
864
+ 'function_call': func,
865
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
866
+ 'type': 'callmanipulate',
867
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
868
+ {'label': 'Service Call',
869
+ 'function_call': func,
870
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
871
+ 'type': 'call',
872
+ 'params': [self.adaptor.description.elements.call, node]},
873
+ {'label': 'Script',
874
+ 'function_call': func,
875
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
876
+ 'type': 'manipulate',
877
+ 'params': [self.adaptor.description.elements.manipulate, node]},
878
+ {'label': 'Decision',
879
+ 'function_call': func,
880
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
881
+ 'type': 'choose',
882
+ 'params': [self.adaptor.description.elements.choose, node]},
883
+ {'label': 'Loop',
884
+ 'function_call': func,
885
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
886
+ 'type': 'loop',
887
+ 'params': [self.adaptor.description.elements.loop, node]},
888
+ {'label': 'Terminate',
889
+ 'function_call': func,
890
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
891
+ 'type': 'terminate',
892
+ 'params': [self.adaptor.description.elements.terminate, node]},
893
+ {'label': 'Stop',
894
+ 'function_call': func,
895
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
896
+ 'type': 'stop',
897
+ 'params': [self.adaptor.description.elements.stop, node]}
898
+ ];
899
+ if(node.parent('parallel_branch').length > 0) {
900
+ childs.push({
901
+ 'label': 'Critical',
902
+ 'function_call': func,
903
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
904
+ 'type': 'critical',
905
+ 'params': [self.adaptor.description.elements.critical, node]
906
+ });
907
+ }
908
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
909
+ childs.push({'label': 'Parallel Branch',
910
+ 'function_call': func,
911
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
912
+ 'type': 'parallel_branch',
913
+ 'params': [self.adaptor.description.elements.parallel_branch, node]}
914
+ );
915
+ } else {
916
+ childs.push({'label': 'Parallel',
917
+ 'function_call': func,
918
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
919
+ 'type': 'parallel',
920
+ 'params': [self.adaptor.description.elements.parallel, node]}
921
+ );
922
+ }
923
+ return childs;
924
+ }, //}}}
925
+ 'adaptor': {//{{{
926
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
927
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
928
+ 'touchend': self.events.touchend,
929
+ 'click': self.events.click,
930
+ 'dblclick': self.events.dblclick,
931
+ 'mouseover': self.events.mouseover,
932
+ 'mouseout': self.events.mouseout,
933
+ }//}}}
934
+ }; /*}}}*/
935
+ this.elements.parallel = { /*{{{*/
936
+ 'type': 'complex',
937
+ 'illustrator': {//{{{
938
+ 'endnodes': 'aggregate',
939
+ 'closeblock': false,
940
+ 'closing_symbol': 'parallel_finish',
941
+ 'expansion': function(node) {
942
+ // check if any sibling other than 'parallel_branch' is present
943
+ if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
944
+ return 'horizontal';
945
+ },
946
+ 'col_shift': function(node) {
947
+ return true;
948
+ },
949
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
950
+ 'resolve_symbol': function(node) {
951
+ if($(node).attr('cancel') == 'last') {
952
+ return 'parallel_start';
953
+ } else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == 1) {
954
+ return 'parallel_eventbased_exclusive';
955
+ } else {
956
+ return 'parallel_eventbased_parallel';
957
+ }
958
+ },
959
+ },//}}}
960
+ 'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
961
+ 'permissible_children': function(node,mode) { //{{{
962
+ var func = null;
963
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
964
+ else { func = self.adaptor.description.insert_after }
965
+ var childs = [
966
+ {'label': 'Parallel Branch',
967
+ 'function_call': func,
968
+ 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
969
+ 'type': 'parallel_branch',
970
+ 'params': [self.adaptor.description.elements.parallel_branch, node]},
971
+ ];
972
+ return childs;
973
+ }, //}}}
974
+ 'permissible_children_expert': function(node,mode) { //{{{
975
+ var func = null;
976
+ if (mode.match(/into/)) { func = self.adaptor.description.insert_first_into }
977
+ else { func = self.adaptor.description.insert_after }
978
+ var childs = [
979
+ {'label': 'Service Call with Scripts',
980
+ 'function_call': func,
981
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
982
+ 'type': 'callmanipulate',
983
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
984
+ {'label': 'Service Call',
985
+ 'function_call': func,
986
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
987
+ 'type': 'call',
988
+ 'params': [self.adaptor.description.elements.call, node]},
989
+ {'label': 'Script',
990
+ 'function_call': func,
991
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
992
+ 'type': 'manipulate',
993
+ 'params': [self.adaptor.description.elements.manipulate, node]},
994
+ {'label': 'Decision',
995
+ 'function_call': func,
996
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
997
+ 'type': 'choose',
998
+ 'params': [self.adaptor.description.elements.choose, node]},
999
+ {'label': 'Loop',
1000
+ 'function_call': func,
1001
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1002
+ 'type': 'loop',
1003
+ 'params': [self.adaptor.description.elements.loop, node]},
1004
+ {'label': 'Stop',
1005
+ 'function_call': func,
1006
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1007
+ 'type': 'stop',
1008
+ 'params': [self.adaptor.description.elements.stop, node]}
1009
+ ];
1010
+ if(node.get(0).tagName != 'parallel')
1011
+ childs.push({'label': 'Parallel',
1012
+ 'function_call': self.adaptor.description.insert_last_into,
1013
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1014
+ 'type': 'parallel',
1015
+ 'params': [self.adaptor.description.elements.parallel, node]});
1016
+ return childs;
1017
+ }, //}}}
1018
+ 'adaptor': {//{{{
1019
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
1020
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
1021
+ 'touchend': self.events.touchend,
1022
+ 'click': self.events.click,
1023
+ 'dblclick': self.events.dblclick,
1024
+ 'mouseover': self.events.mouseover,
1025
+ 'mouseout': self.events.mouseout,
1026
+ }//}}}
1027
+ }; /*}}}*/
1028
+ this.elements.parallel_branch = { /*{{{*/
1029
+ 'type': 'complex',
1030
+ 'illustrator': {//{{{
1031
+ 'endnodes': 'passthrough',
1032
+ 'closeblock': false,
1033
+ 'noarrow': true,
1034
+ 'expansion': function(node) {
1035
+ return 'vertical';
1036
+ },
1037
+ 'resolve_symbol': function(node,shift) {
1038
+ if(shift == true) {
1039
+ return 'parallel_branch_event';
1040
+ } else {
1041
+ return 'parallel_branch_normal';
1042
+ }
1043
+ },
1044
+ 'col_shift': function(node) {
1045
+ if(node.parentNode.tagName == 'choose') return false;
1046
+ if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
1047
+ return false;
1048
+ },
1049
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
1050
+ },//}}}
1051
+ 'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
1052
+ 'permissible_children': function(node,mode) { //{{{
1053
+ var func = null;
1054
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1055
+ else { func = self.adaptor.description.insert_after }
1056
+ var childs = [
1057
+ {'label': 'Service Call with Scripts',
1058
+ 'function_call': func,
1059
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1060
+ 'type': 'callmanipulate',
1061
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1062
+ {'label': 'Service Call',
1063
+ 'function_call': func,
1064
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1065
+ 'type': 'call',
1066
+ 'params': [self.adaptor.description.elements.call, node]},
1067
+ {'label': 'Script',
1068
+ 'function_call': func,
1069
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1070
+ 'type': 'manipulate',
1071
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1072
+ {'label': 'Parallel',
1073
+ 'function_call': func,
1074
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1075
+ 'type': 'parallel',
1076
+ 'params': [self.adaptor.description.elements.parallel, node]},
1077
+ {'label': 'Decision',
1078
+ 'function_call': func,
1079
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1080
+ 'type': 'choose',
1081
+ 'params': [self.adaptor.description.elements.choose, node]},
1082
+ {'label': 'Loop',
1083
+ 'function_call': func,
1084
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1085
+ 'type': 'loop',
1086
+ 'params': [self.adaptor.description.elements.loop, node]},
1087
+ {'label': 'Terminate',
1088
+ 'function_call': func,
1089
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1090
+ 'type': 'terminate',
1091
+ 'params': [self.adaptor.description.elements.terminate, node]},
1092
+ {'label': 'Stop',
1093
+ 'function_call': func,
1094
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1095
+ 'type': 'stop',
1096
+ 'params': [self.adaptor.description.elements.stop, node]},
1097
+ {'label': 'Critical',
1098
+ 'function_call': func,
1099
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1100
+ 'type': 'critical',
1101
+ 'params': [self.adaptor.description.elements.critical, node]}
1102
+ ];
1103
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
1104
+ return [{'label': 'Alternative',
1105
+ 'function_call': func,
1106
+ 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
1107
+ 'type': 'alternative',
1108
+ 'params': [self.adaptor.description.elements.alternative, node]}];
1109
+ }
1110
+ return childs;
1111
+ }, //}}}
1112
+ 'adaptor': {//{{{
1113
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
1114
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
1115
+ 'touchend': self.events.touchend,
1116
+ 'click': self.events.click,
1117
+ 'dblclick': self.events.dblclick,
1118
+ 'mouseover': self.events.mouseover,
1119
+ 'mouseout': self.events.mouseout,
1120
+ }//}}}
1121
+ }; /*}}}*/
1122
+ this.elements.critical = { /*{{{*/
1123
+ 'type': 'complex',
1124
+ 'illustrator': {//{{{
1125
+ 'endnodes': 'aggregate',
1126
+ 'closeblock': false,
1127
+ 'border': true,
1128
+ 'expansion': function(node) {
1129
+ return 'vertical';
1130
+ },
1131
+ 'col_shift': function(node) {
1132
+ return true;
1133
+ },
1134
+ 'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
1135
+ },//}}}
1136
+ 'description': self.adaptor.theme_dir + 'rngs/critical.rng',
1137
+ 'permissible_children': function(node,mode) { //{{{
1138
+ var func = null;
1139
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1140
+ else { func = self.adaptor.description.insert_after }
1141
+ var childs = [
1142
+ {'label': 'Service Call with Scripts',
1143
+ 'function_call': func,
1144
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1145
+ 'type': 'callmanipulate',
1146
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1147
+ {'label': 'Service Call',
1148
+ 'function_call': func,
1149
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1150
+ 'type': 'call',
1151
+ 'params': [self.adaptor.description.elements.call, node]},
1152
+ {'label': 'Script',
1153
+ 'function_call': func,
1154
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1155
+ 'type': 'manipulate',
1156
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1157
+ {'label': 'Parallel',
1158
+ 'function_call': func,
1159
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1160
+ 'type': 'parallel',
1161
+ 'params': [self.adaptor.description.elements.parallel, node]},
1162
+ {'label': 'Decision',
1163
+ 'function_call': func,
1164
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1165
+ 'type': 'choose',
1166
+ 'params': [self.adaptor.description.elements.choose, node]},
1167
+ {'label': 'Loop',
1168
+ 'function_call': func,
1169
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1170
+ 'type': 'loop',
1171
+ 'params': [self.adaptor.description.elements.loop, node]},
1172
+ {'label': 'Terminate',
1173
+ 'function_call': func,
1174
+ 'menu_icon': self.elements.terminate.illustrator.svg.clone(),
1175
+ 'type': 'terminate',
1176
+ 'params': [self.adaptor.description.elements.terminate, node]},
1177
+ {'label': 'Stop',
1178
+ 'function_call': func,
1179
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1180
+ 'type': 'stop',
1181
+ 'params': [self.adaptor.description.elements.stop, node]}
1182
+ ];
1183
+ if(node.parent('parallel_branch').length > 0) {
1184
+ childs.push({
1185
+ 'label': 'Critical',
1186
+ 'function_call': func,
1187
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1188
+ 'type': 'critical',
1189
+ 'params': [self.adaptor.description.elements.critical, node]
1190
+ });
1191
+ }
1192
+ return childs;
1193
+ }, //}}}
1194
+ 'adaptor': {//{{{
1195
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
1196
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
1197
+ 'touchend': self.events.touchend,
1198
+ 'click': self.events.click,
1199
+ 'dblclick': self.events.dblclick,
1200
+ 'mouseover': self.events.mouseover,
1201
+ 'mouseout': self.events.mouseout,
1202
+ }//}}}
1203
+ }; /*}}}*/
1204
+ this.elements.group = { /*{{{*/
1205
+ 'type': 'complex',
1206
+ 'illustrator': {//{{{
1207
+ 'endnodes': 'aggregate',
1208
+ 'closeblock': false,
1209
+ 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
1210
+ 'expansion': function(node) {
1211
+ return 'vertical';
1212
+ },
1213
+ 'col_shift': function(node) {
1214
+ return true;
1215
+ },
1216
+ 'svg': null
1217
+ },//}}}
1218
+ 'description': self.adaptor.theme_dir + 'rngs/group.rng',
1219
+ 'permissible_children': function(node,mode) { //{{{
1220
+ var func = null;
1221
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1222
+ else { func = self.adaptor.description.insert_after }
1223
+ return [
1224
+ ];
1225
+ }, //}}}
1226
+ 'adaptor': {//{{{
1227
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
1228
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
1229
+ 'touchend': self.events.touchend,
1230
+ 'click': self.events.click,
1231
+ 'dblclick': self.events.dblclick,
1232
+ 'mouseover': self.events.mouseover,
1233
+ 'mouseout': self.events.mouseout,
1234
+ }//}}}
1235
+ }; /*}}}*/
1236
+ this.elements.start = this.elements.description = { /*{{{*/
1237
+ 'type': 'description',
1238
+ 'illustrator': {//{{{
1239
+ 'endnodes': 'passthrough',
1240
+ 'closeblock': false,
1241
+ 'balance': true,
1242
+ 'expansion': function(node) {
1243
+ return 'vertical';
1244
+ },
1245
+ 'resolve_symbol': function(node) {
1246
+ let alist = []
1247
+ let plist = []
1248
+
1249
+ var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for &gt;/&lt; version of stuff as only conditions are in attributes, and conditions can not contain assignments
1250
+ var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
1251
+ $.merge($('call > code > prepare',node), $('call > parameters > arguments > *, call > code > finalize, call > code > update, call > code > rescue, loop[condition], alternative[condition]',node)).each(function(i,n) {
1252
+ let item;
1253
+ if (n.hasAttribute('condition')) {
1254
+ item = n.getAttribute('condition');
1255
+ } else {
1256
+ item = n.textContent;
1257
+ }
1258
+ if (n.parentNode.nodeName == 'arguments' && item.charAt(0) != '!' ) { return }
1259
+
1260
+ let indices = [];
1261
+
1262
+ for (const match of item.matchAll(regassi)) {
1263
+ indices.push(match.index);
1264
+ alist.push(match[1]);
1265
+ }
1266
+ for (const match of item.matchAll(reg_not_assi)) {
1267
+ const arg1 = match[1];
1268
+ if (indices.includes(match.index)) { continue; }
1269
+ if (!alist.includes(arg1)) {
1270
+ if (match.index >= indices[0]) {
1271
+ plist.push(arg1);
1272
+ }
1273
+ }
1274
+ }
1275
+ })
1276
+ if (plist.length > 0) { return 'start_event'; }
1277
+ },
1278
+ 'closing_symbol': 'end',
1279
+ 'col_shift': function(node) {
1280
+ return true;
1281
+ },
1282
+ 'svg': self.adaptor.theme_dir + 'symbols/start.svg'
1283
+ },//}}}
1284
+ 'description': self.adaptor.theme_dir + 'rngs/start.rng',
1285
+ 'permissible_children': function(node,mode) { //{{{
1286
+ var func = null;
1287
+ if (mode == 'into') { func = self.adaptor.description.insert_first_into }
1288
+ else { func = self.adaptor.description.insert_after }
1289
+ var childs = [
1290
+ {'label': 'Service Call with Scripts',
1291
+ 'function_call': func,
1292
+ 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
1293
+ 'type': 'callmanipulate',
1294
+ 'params': [self.adaptor.description.elements.callmanipulate, node]},
1295
+ {'label': 'Service Call',
1296
+ 'function_call': func,
1297
+ 'menu_icon': self.elements.call.illustrator.svg.clone(),
1298
+ 'type': 'call',
1299
+ 'params': [self.adaptor.description.elements.call, node]},
1300
+ {'label': 'Script',
1301
+ 'function_call': func,
1302
+ 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
1303
+ 'type': 'manipulate',
1304
+ 'params': [self.adaptor.description.elements.manipulate, node]},
1305
+ {'label': 'Parallel',
1306
+ 'function_call': func,
1307
+ 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
1308
+ 'type': 'parallel',
1309
+ 'params': [self.adaptor.description.elements.parallel, node]},
1310
+ {'label': 'Decision',
1311
+ 'function_call': func,
1312
+ 'menu_icon': self.elements.choose.illustrator.svg.clone(),
1313
+ 'type': 'choose',
1314
+ 'params': [self.adaptor.description.elements.choose, node]},
1315
+ {'label': 'Loop',
1316
+ 'function_call': func,
1317
+ 'menu_icon': self.elements.loop.illustrator.svg.clone(),
1318
+ 'type': 'loop',
1319
+ 'params': [self.adaptor.description.elements.loop, node]},
1320
+ {'label': 'Stop',
1321
+ 'function_call': func,
1322
+ 'menu_icon': self.elements.stop.illustrator.svg.clone(),
1323
+ 'type': 'stop',
1324
+ 'params': [self.adaptor.description.elements.stop, node]}
1325
+ ];
1326
+ if(node.parent('parallel_branch').length > 0) {
1327
+ childs.push({
1328
+ 'label': 'Critical',
1329
+ 'function_call': func,
1330
+ 'menu_icon': self.elements.critical.illustrator.svg.clone(),
1331
+ 'type': 'critical',
1332
+ 'params': [self.adaptor.description.elements.critical, node]
1333
+ });
1334
+ }
1335
+ return childs;
1336
+ }, //}}}
1337
+ 'adaptor': {//{{{
1338
+ 'mousedown': function (node,e) { self.events.mousedown(node,e,true,false); },
1339
+ 'touchstart': function (node,e) { self.events.touchstart(node,e,true,false); },
1340
+ 'touchend': self.events.touchend,
1341
+ 'click': self.events.click,
1342
+ 'dblclick': self.events.dblclick,
1343
+ 'mouseover': self.events.mouseover,
1344
+ 'mouseout': self.events.mouseout,
1345
+ }//}}}
1346
+ }; /*}}}*/
1347
+
1348
+ // Abstract Elements
1349
+ // * they may only have an illustrator (or other parts)
1350
+ // * they HAVE TO have a parent
1351
+ this.elements.start_event = { /*{{{*/
1352
+ 'parent': 'start',
1353
+ 'illustrator': {//{{{
1354
+ 'svg': self.adaptor.theme_dir + 'symbols/start_event.svg'
1355
+ }//}}}
1356
+ }; /*}}}*/
1357
+ this.elements.call_sensor = { /*{{{*/
1358
+ 'parent': 'call',
1359
+ 'illustrator': {//{{{
1360
+ 'svg': self.adaptor.theme_dir + 'symbols/call_sensor.svg'
1361
+ }//}}}
1362
+ }; /*}}}*/
1363
+ this.elements.callmanipulate = { /*{{{*/
1364
+ 'parent': 'call',
1365
+ 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1366
+ 'illustrator': {//{{{
1367
+ 'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
1368
+ 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
1369
+ }//}}}
1370
+ }; /*}}}*/
1371
+ this.elements.callmanipulate_sensor = { /*{{{*/
1372
+ 'parent': 'call',
1373
+ 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
1374
+ 'illustrator': {//{{{
1375
+ 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate_sensor.svg'
1376
+ }//}}}
1377
+ }; /*}}}*/
1378
+ this.elements.loop_head = { /*{{{*/
1379
+ 'parent': 'loop',
1380
+ 'illustrator': {//{{{
1381
+ 'endnodes': 'this',
1382
+ 'closeblock': true,
1383
+ 'label': function(node){
1384
+ var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
1385
+ return ret;
1386
+ },
1387
+ }//}}}
1388
+ }; /*}}}*/
1389
+ this.elements.loop_tail = { /*{{{*/
1390
+ 'parent': 'loop',
1391
+ 'illustrator': {//{{{
1392
+ 'endnodes': 'aggregate',
1393
+ 'closeblock': false,
1394
+ 'closing_symbol': 'loop_finish'
1395
+ },//}}}
1396
+ }; /*}}}*/
1397
+ this.elements.choose_inclusive = { /*{{{*/
1398
+ 'parent': 'choose',
1399
+ 'illustrator': {//{{{
1400
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1401
+ }//}}}
1402
+ }; /*}}}*/
1403
+ this.elements.choose_exclusive = { /*{{{*/
1404
+ 'parent': 'choose',
1405
+ 'illustrator': {//{{{
1406
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1407
+ },//}}}
1408
+ }; /*}}}*/
1409
+ this.elements.choose_inclusive_finish = { /*{{{*/
1410
+ 'parent': 'choose_finish',
1411
+ 'illustrator': {//{{{
1412
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
1413
+ }//}}}
1414
+ }; /*}}}*/
1415
+ this.elements.choose_exclusive_finish = { /*{{{*/
1416
+ 'parent': 'choose_finish',
1417
+ 'illustrator': {//{{{
1418
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1419
+ },//}}}
1420
+ }; /*}}}*/
1421
+ this.elements.loop_head_finish = { /*{{{*/
1422
+ 'parent': 'loop_finish',
1423
+ 'illustrator': {//{{{
1424
+ 'endnodes': 'this',
1425
+ 'closeblock': true,
1426
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1427
+ }//}}}
1428
+ }; /*}}}*/
1429
+ this.elements.loop_tail_finish = { /*{{{*/
1430
+ 'parent': 'loop_finish',
1431
+ 'illustrator': {//{{{
1432
+ 'endnodes': 'this',
1433
+ 'closeblock': false,
1434
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1435
+ },//}}}
1436
+ }; /*}}}*/
1437
+ this.elements.parallel_start = { /*{{{*/
1438
+ 'parent': 'parallel',
1439
+ 'illustrator': {//{{{
1440
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1441
+ }//}}}
1442
+ }; /*}}}*/
1443
+ this.elements.parallel_eventbased_exclusive = { /*{{{*/
1444
+ 'parent': 'parallel',
1445
+ 'illustrator': {//{{{
1446
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_exclusive.svg'
1447
+ }//}}}
1448
+ }; /*}}}*/
1449
+ this.elements.parallel_eventbased_parallel = { /*{{{*/
1450
+ 'parent': 'parallel',
1451
+ 'illustrator': {//{{{
1452
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1453
+ }//}}}
1454
+ }; /*}}}*/
1455
+ this.elements.parallel_simple = { /*{{{*/
1456
+ 'parent': 'parallel_finish',
1457
+ 'illustrator': {//{{{
1458
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
1459
+ }//}}}
1460
+ }; /*}}}*/
1461
+ this.elements.parallel_complex = { /*{{{*/
1462
+ 'parent': 'parallel_finish',
1463
+ 'illustrator': {//{{{
1464
+ 'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
1465
+ },//}}}
1466
+ }; /*}}}*/
1467
+ this.elements.parallel_event_all = { /*{{{*/
1468
+ 'parent': 'parallel_finish',
1469
+ 'illustrator': {//{{{
1470
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_eventbased_parallel.svg'
1471
+ }//}}}
1472
+ }; /*}}}*/
1473
+ this.elements.parallel_event_one = { /*{{{*/
1474
+ 'parent': 'parallel_finish',
1475
+ 'illustrator': {//{{{
1476
+ 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
1477
+ }//}}}
1478
+ }; /*}}}*/
1479
+ this.elements.parallel_branch_normal = { /*{{{*/
1480
+ 'parent': 'parallel_branch',
1481
+ 'illustrator': {//{{{
1482
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
1483
+ }//}}}
1484
+ }; /*}}}*/
1485
+ this.elements.parallel_branch_event = { /*{{{*/
1486
+ 'parent': 'parallel_branch',
1487
+ 'illustrator': {//{{{
1488
+ 'endnodes': 'this',
1489
+ 'noarrow': false,
1490
+ 'border': true,
1491
+ 'wide': true,
1492
+ 'closing_symbol': 'event_end',
1493
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
1494
+ }//}}}
1495
+ }; /*}}}*/
1496
+ this.elements.parallel_branch_compact = { /*{{{*/
1497
+ 'parent': 'parallel_branch',
1498
+ 'illustrator': {//{{{
1499
+ 'endnodes': 'this',
1500
+ 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_compact.svg'
1501
+ }//}}}
1502
+ }; /*}}}*/
1503
+ this.elements.scripts = { /*{{{*/
1504
+ 'description': [self.adaptor.theme_dir + 'rngs/scripts.rng']
1505
+ }; /*}}}*/
1506
+ }