cpee 1.4.30 → 1.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/cockpit/css/ui.css +23 -0
- data/cockpit/css/wfadaptor.css +80 -69
- data/cockpit/index.html +15 -8
- data/cockpit/js/details.js +2 -3
- data/cockpit/js/instance.js +37 -4
- data/cockpit/js/wfadaptor.js +196 -108
- data/cockpit/test.html +40 -0
- data/cockpit/themes/compact/theme.js +176 -36
- data/cockpit/themes/default/rngs/alternative.rng +20 -0
- data/cockpit/themes/default/rngs/call.rng +3 -3
- data/cockpit/themes/default/rngs/callmanipulate.rng +3 -3
- data/cockpit/themes/default/rngs/loop.rng +11 -0
- data/cockpit/themes/default/rngs/otherwise.rng +22 -1
- data/cockpit/themes/default/symbols/alternative.svg +3 -2
- data/cockpit/themes/default/symbols/complex.svg +8 -0
- data/cockpit/themes/default/symbols/end.svg +3 -0
- data/cockpit/themes/default/symbols/event_end.svg +3 -0
- data/cockpit/themes/default/symbols/parallel_branch.svg +3 -2
- data/cockpit/themes/default/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/default/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/default/theme.js +200 -45
- data/cockpit/themes/lego/theme.js +4 -4
- data/cpee.gemspec +2 -2
- data/lib/cpee/value_helper.rb +16 -0
- data/log/elasticsearch_logging.rb +1 -0
- data/server/handlerwrappers/default.rb +2 -2
- metadata +9 -4
- data/cockpit/js_libs.zip +0 -0
@@ -8,4 +8,15 @@
|
|
8
8
|
<attribute name="condition" rngui:label="Condition">
|
9
9
|
<data type="string" rngui:label="Condition"/>
|
10
10
|
</attribute>
|
11
|
+
<element name="_probability" rngui:mark="true" rngui:header="Execution Probability">
|
12
|
+
<element name="_probability_min" rngui:label='Min times'>
|
13
|
+
<data type='nonNegativeInteger' rngui:label='Times'/>
|
14
|
+
</element>
|
15
|
+
<element name="_probability_max" rngui:label='Max times'>
|
16
|
+
<data type='nonNegativeInteger' rngui:label='Times'/>
|
17
|
+
</element>
|
18
|
+
<element name="_probability_avg" rngui:label='Avg times'>
|
19
|
+
<data type='nonNegativeInteger' rngui:label='Times'/>
|
20
|
+
</element>
|
21
|
+
</element>
|
11
22
|
</element>
|
@@ -1 +1,22 @@
|
|
1
|
-
<element rngui:version="1.2" name="otherwise" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org"
|
1
|
+
<element rngui:version="1.2" name="otherwise" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
|
2
|
+
<element name="_probability" rngui:mark="true" rngui:header="Execution Probability">
|
3
|
+
<element name="_probability_min" rngui:label='Min in %'>
|
4
|
+
<data type='integer' rngui:label='Percent 0-100'>
|
5
|
+
<param name="minInclusive">1</param>
|
6
|
+
<param name="maxInclusive">100</param>
|
7
|
+
</data>
|
8
|
+
</element>
|
9
|
+
<element name="_probability_max" rngui:label='Max in %'>
|
10
|
+
<data type='integer' rngui:label='Percent 0-100'>
|
11
|
+
<param name="minInclusive">1</param>
|
12
|
+
<param name="maxInclusive">100</param>
|
13
|
+
</data>
|
14
|
+
</element>
|
15
|
+
<element name="_probability_avg" rngui:label='Avg in %'>
|
16
|
+
<data type='integer' rngui:label='Percent 0-100'>
|
17
|
+
<param name="minInclusive">1</param>
|
18
|
+
<param name="maxInclusive">100</param>
|
19
|
+
</data>
|
20
|
+
</element>
|
21
|
+
</element>
|
22
|
+
</element>
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<rect x="11" y="6" width="9" height="18" rx="0" class="hline white"/>
|
3
|
+
<path class="cline hfill stand" d="M 11,5 C 2,9 2,21 11,25 M 20,5 C 29,9 29,21 20,25" style="stroke-dasharray:1,4;"/>
|
4
|
+
<line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
|
4
5
|
</svg>
|
@@ -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
|
+
<line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>
|
4
|
+
<line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>
|
5
|
+
<line x1="8.5" y1="15.5" x2="22.5" y2="15.5" class="stand"/>
|
6
|
+
<line x1="15.5" y1="8.5" x2="15.5" y2="22.5" class="stand"/>
|
7
|
+
</svg>
|
8
|
+
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<rect
|
3
|
-
<
|
2
|
+
<rect x="11" y="6" width="9" height="18" rx="0" class="hline white"/>
|
3
|
+
<path class="cline hfill stand" d="M 11,5 C 2,9 2,21 11,25 M 20,5 C 29,9 29,21 20,25" style="stroke-dasharray:1,4;"/>
|
4
|
+
<line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
|
4
5
|
</svg>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<rect x="1" y="3" width="24" height="24" rx="4" class="hfill rfill cline stand"/>
|
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"/>
|
6
|
+
<line x1="24" y1="11" x2="20" y2="18" class="stand"/>
|
7
|
+
<line x1="20" y1="18" x2="28" y2="18" class="stand"/>
|
8
|
+
<line x1="28" y1="18" x2="24" y2="11" class="stand"/>
|
9
|
+
|
10
|
+
<circle cx="55.5" cy="15" r="14" class="cline hfill rfill stand"/>
|
11
|
+
<line x1="55.5" y1="11" x2="51.5" y2="18" class="stand"/>
|
12
|
+
<line x1="51.5" y1="18" x2="59.5" y2="18" class="stand"/>
|
13
|
+
<line x1="59.5" y1="18" x2="55.5" y2="11" class="stand"/>
|
14
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<svg class="clickable" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<rect x="11" y="6" width="9" height="18" rx="0" class="hline white"/>
|
3
|
+
<path class="cline hfill stand" d="M 11,5 C 2,9 2,21 11,25 M 20,5 C 29,9 29,21 20,25" style="stroke-dasharray:1,4;"/>
|
4
|
+
<line x1="15.6" y1="4" x2="15.6" y2="27" class="ourline"/>
|
5
|
+
</svg>
|
@@ -8,8 +8,6 @@ function WFAdaptorManifestation(adaptor) {
|
|
8
8
|
this.compact = false;
|
9
9
|
this.endpoints = {};
|
10
10
|
|
11
|
-
this.noarrow = ['alternative', 'otherwise'];
|
12
|
-
|
13
11
|
//{{{ transform the details data to description parts based on rng
|
14
12
|
this.source = function(base,opts) {
|
15
13
|
if (base[0].namespaceURI == "http://relaxng.org/ns/structure/1.0") {
|
@@ -34,11 +32,11 @@ function WFAdaptorManifestation(adaptor) {
|
|
34
32
|
return base;
|
35
33
|
}
|
36
34
|
}; //}}}
|
37
|
-
//{{{ Return the svgid for the
|
38
|
-
this.
|
35
|
+
//{{{ Return the svgid for the selected task
|
36
|
+
this.selected = function(){
|
39
37
|
var svgid = 'unknown';
|
40
38
|
_.each(self.adaptor.illustrator.get_elements(),function(value,key) {
|
41
|
-
if ($(value).hasClass('
|
39
|
+
if ($(value).hasClass('selected')) {
|
42
40
|
svgid = $(value).attr('element-id');
|
43
41
|
}
|
44
42
|
});
|
@@ -189,12 +187,15 @@ function WFAdaptorManifestation(adaptor) {
|
|
189
187
|
}
|
190
188
|
return false;
|
191
189
|
} // }}}
|
190
|
+
this.events.suppress = function(svgid, e, child, sibling) { // {{{
|
191
|
+
return false;
|
192
|
+
} // }}}
|
192
193
|
this.events.click = function(svgid, e) { // {{{
|
193
194
|
if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
|
194
195
|
return;
|
195
196
|
}
|
196
197
|
|
197
|
-
self.adaptor.illustrator.get_elements().removeClass('
|
198
|
+
self.adaptor.illustrator.get_elements().removeClass('selected');
|
198
199
|
|
199
200
|
if (e && e.ctrlKey) {
|
200
201
|
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
@@ -209,7 +210,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
209
210
|
|
210
211
|
var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
|
211
212
|
if (vtarget.length > 0) {
|
212
|
-
vtarget.parents('g.element[element-id]').addClass('
|
213
|
+
vtarget.parents('g.element[element-id]').addClass('selected');
|
213
214
|
}
|
214
215
|
|
215
216
|
self.update_details(svgid);
|
@@ -237,7 +238,28 @@ function WFAdaptorManifestation(adaptor) {
|
|
237
238
|
'illustrator': {//{{{
|
238
239
|
'endnodes': 'this',
|
239
240
|
'label': function(node){
|
240
|
-
|
241
|
+
var ep = self.endpoints[$(node).attr('endpoint')];
|
242
|
+
var eplen = 1;
|
243
|
+
if (ep != undefined && ep[0] == '[') {
|
244
|
+
try {
|
245
|
+
eplen = JSON.parse(ep).length;
|
246
|
+
} catch(e) {
|
247
|
+
eplen = 1;
|
248
|
+
}
|
249
|
+
} else {
|
250
|
+
eplen = 1;
|
251
|
+
}
|
252
|
+
var avg = $('> _timing_avg',$(node).children('_timing')).text();
|
253
|
+
var lnd = $(node).attr('endpoint');
|
254
|
+
var ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
255
|
+
if (lnd != '') {
|
256
|
+
ret.push({ column: 'Resource', value: lnd });
|
257
|
+
ret.push({ column: 'R#', value: eplen });
|
258
|
+
}
|
259
|
+
if (avg != '') {
|
260
|
+
ret.push({ column: 'Average', value: avg + 'min' });
|
261
|
+
}
|
262
|
+
return ret;
|
241
263
|
},
|
242
264
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
243
265
|
'resolve_symbol': function(node) {
|
@@ -274,9 +296,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
274
296
|
'label': function(node){
|
275
297
|
var lab = $(node).attr('label');
|
276
298
|
if (lab) {
|
277
|
-
return lab.replace(/^['"]/,'').replace(/['"]$/,'');
|
299
|
+
return [ { column: 'Label', value: lab.replace(/^['"]/,'').replace(/['"]$/,'') } ];
|
278
300
|
} else {
|
279
|
-
return
|
301
|
+
return [];
|
280
302
|
}
|
281
303
|
},
|
282
304
|
'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
|
@@ -332,8 +354,81 @@ function WFAdaptorManifestation(adaptor) {
|
|
332
354
|
return [];
|
333
355
|
}, //}}}
|
334
356
|
'adaptor': {//{{{
|
335
|
-
'mousedown': function (node,e) { self.events.mousedown(node,e,false,
|
357
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
|
358
|
+
}//}}}
|
359
|
+
}; /*}}}*/
|
360
|
+
this.elements.end = { /*{{{*/
|
361
|
+
'type': 'primitive',
|
362
|
+
'illustrator': {//{{{
|
363
|
+
'endnodes': 'this',
|
364
|
+
'svg': self.adaptor.theme_dir + 'symbols/end.svg'
|
365
|
+
}, //}}}
|
366
|
+
'adaptor': {//{{{
|
367
|
+
'mousedown': function (node,e) {
|
368
|
+
self.events.suppress();
|
369
|
+
}
|
370
|
+
}//}}}
|
371
|
+
}; /*}}}*/
|
372
|
+
this.elements.event_end = { /*{{{*/
|
373
|
+
'type': 'primitive',
|
374
|
+
'illustrator': {//{{{
|
375
|
+
'endnodes': 'this',
|
376
|
+
'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
|
377
|
+
}, //}}}
|
378
|
+
'adaptor': {//{{{
|
379
|
+
'mousedown': function (node,e) {
|
380
|
+
self.events.suppress();
|
381
|
+
},
|
336
382
|
'click': self.events.click,
|
383
|
+
'dblclick': self.events.dblclick,
|
384
|
+
'mouseover': self.events.mouseover,
|
385
|
+
'mouseout': self.events.mouseout
|
386
|
+
}//}}}
|
387
|
+
}; /*}}}*/
|
388
|
+
this.elements.choose_finish = { /*{{{*/
|
389
|
+
'type': 'primitive',
|
390
|
+
'illustrator': {//{{{
|
391
|
+
'endnodes': 'this',
|
392
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg',
|
393
|
+
'resolve_symbol': function(node) {
|
394
|
+
if($(node).attr('mode') == 'exclusive') {
|
395
|
+
return 'choose_exclusive_finish';
|
396
|
+
} else {
|
397
|
+
return 'choose_inclusive_finish';
|
398
|
+
}
|
399
|
+
},
|
400
|
+
}, //}}}
|
401
|
+
'adaptor': {//{{{
|
402
|
+
'mousedown': function (node,e) {
|
403
|
+
self.events.mousedown(node,e,true,true);
|
404
|
+
},
|
405
|
+
'click': self.events.click,
|
406
|
+
'dblclick': self.events.dblclick,
|
407
|
+
'mouseover': self.events.mouseover,
|
408
|
+
'mouseout': self.events.mouseout
|
409
|
+
}//}}}
|
410
|
+
}; /*}}}*/
|
411
|
+
this.elements.parallel_finish = { /*{{{*/
|
412
|
+
'type': 'primitive',
|
413
|
+
'illustrator': {//{{{
|
414
|
+
'endnodes': 'this',
|
415
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
|
416
|
+
'resolve_symbol': function(node) {
|
417
|
+
if($(node).attr('wait') == '-1') {
|
418
|
+
return 'parallel_simple';
|
419
|
+
} else {
|
420
|
+
return 'parallel_complex';
|
421
|
+
}
|
422
|
+
},
|
423
|
+
}, //}}}
|
424
|
+
'adaptor': {//{{{
|
425
|
+
'mousedown': function (node,e) {
|
426
|
+
self.events.mousedown(node,e,true,true);
|
427
|
+
},
|
428
|
+
'click': self.events.click,
|
429
|
+
'dblclick': self.events.dblclick,
|
430
|
+
'mouseover': self.events.mouseover,
|
431
|
+
'mouseout': self.events.mouseout
|
337
432
|
}//}}}
|
338
433
|
}; /*}}}*/
|
339
434
|
|
@@ -341,9 +436,10 @@ function WFAdaptorManifestation(adaptor) {
|
|
341
436
|
this.elements.choose = { /*{{{*/
|
342
437
|
'type': 'complex',
|
343
438
|
'illustrator': {//{{{
|
344
|
-
'label': function(node){return $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' },
|
439
|
+
'label': function(node){ return [ { column: 'Label', value: $(node).attr('mode') == 'exclusive' ? 'exclusive' : 'inclusive' } ]; },
|
345
440
|
'endnodes': 'aggregate',
|
346
441
|
'closeblock': false,
|
442
|
+
'closing_symbol': 'choose_finish',
|
347
443
|
'expansion': function(node) {
|
348
444
|
return 'horizontal';
|
349
445
|
},
|
@@ -403,8 +499,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
403
499
|
this.elements.otherwise = { /*{{{*/
|
404
500
|
'type': 'complex',
|
405
501
|
'illustrator': {//{{{
|
502
|
+
'label': function(node){
|
503
|
+
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
504
|
+
return (avg == '' ? [] : [ {}, {}, {}, {}, { column: 'Average', value: avg + '%' } ]);
|
505
|
+
},
|
406
506
|
'endnodes': 'passthrough',
|
407
507
|
'closeblock': false,
|
508
|
+
'noarrow': true,
|
408
509
|
'expansion': function(node) {
|
409
510
|
return 'vertical';
|
410
511
|
},
|
@@ -481,8 +582,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
481
582
|
this.elements.alternative = { /*{{{*/
|
482
583
|
'type': 'complex',
|
483
584
|
'illustrator': {//{{{
|
484
|
-
'label': function(node){
|
585
|
+
'label': function(node){
|
586
|
+
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
587
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') } ];
|
588
|
+
if (avg != '') {
|
589
|
+
ret.push({}, {}, {}, {},{ column: 'Average', value: avg + '%' });
|
590
|
+
}
|
591
|
+
return ret;
|
592
|
+
},
|
485
593
|
'endnodes': 'passthrough',
|
594
|
+
'noarrow': true,
|
486
595
|
'closeblock':false,
|
487
596
|
'expansion': function(node) {
|
488
597
|
return 'vertical';
|
@@ -564,7 +673,14 @@ function WFAdaptorManifestation(adaptor) {
|
|
564
673
|
this.elements.loop = { /*{{{*/
|
565
674
|
'type': 'complex',
|
566
675
|
'illustrator': {//{{{
|
567
|
-
'label': function(node){
|
676
|
+
'label': function(node){
|
677
|
+
var avg = $('> _probability_avg',$(node).children('_probability')).text();
|
678
|
+
var ret = [ { column: 'Label', value: $(node).attr('condition') + ($(node).attr('mode') == 'pre_test' ? ' (⭱)' : ' (⭳)') } ];
|
679
|
+
if (avg != '') {
|
680
|
+
ret.push({ column: 'Average', value: avg + '⨉' });
|
681
|
+
}
|
682
|
+
return ret;
|
683
|
+
},
|
568
684
|
'endnodes': 'this',
|
569
685
|
'closeblock': true,
|
570
686
|
'expansion': function(node) {
|
@@ -652,9 +768,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
652
768
|
this.elements.parallel = { /*{{{*/
|
653
769
|
'type': 'complex',
|
654
770
|
'illustrator': {//{{{
|
655
|
-
'endnodes': '
|
771
|
+
'endnodes': 'aggregate',
|
656
772
|
'closeblock': false,
|
657
|
-
'
|
773
|
+
'closing_symbol': 'parallel_finish',
|
658
774
|
'expansion': function(node) {
|
659
775
|
// check if any sibling other than 'parallel_branch' is present
|
660
776
|
if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
|
@@ -667,49 +783,37 @@ function WFAdaptorManifestation(adaptor) {
|
|
667
783
|
},//}}}
|
668
784
|
'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
|
669
785
|
'permissible_children': function(node,mode) { //{{{
|
786
|
+
var func = null;
|
787
|
+
if (mode == 'into') { func = self.adaptor.description.insert_first_into }
|
788
|
+
else { func = self.adaptor.description.insert_after }
|
670
789
|
var childs = [
|
671
790
|
{'label': 'Service Call with Scripts',
|
672
|
-
'function_call':
|
791
|
+
'function_call': func,
|
673
792
|
'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
|
674
793
|
'type': 'callmanipulate',
|
675
794
|
'params': [self.adaptor.description.elements.callmanipulate, node]},
|
676
795
|
{'label': 'Service Call',
|
677
|
-
'function_call':
|
796
|
+
'function_call': func,
|
678
797
|
'menu_icon': self.elements.call.illustrator.svg.clone(),
|
679
798
|
'type': 'call',
|
680
799
|
'params': [self.adaptor.description.elements.call, node]},
|
681
800
|
{'label': 'Manipulate',
|
682
|
-
'function_call':
|
801
|
+
'function_call': func,
|
683
802
|
'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
|
684
803
|
'type': 'manipulate',
|
685
804
|
'params': [self.adaptor.description.elements.manipulate, node]},
|
686
805
|
{'label': 'Decision',
|
687
|
-
'function_call':
|
806
|
+
'function_call': func,
|
688
807
|
'menu_icon': self.elements.choose.illustrator.svg.clone(),
|
689
808
|
'type': 'choose',
|
690
809
|
'params': [self.adaptor.description.elements.choose, node]},
|
691
810
|
{'label': 'Loop',
|
692
|
-
'function_call':
|
811
|
+
'function_call': func,
|
693
812
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
694
813
|
'type': 'loop',
|
695
814
|
'params': [self.adaptor.description.elements.loop, node]},
|
696
|
-
{'label': 'Terminate',
|
697
|
-
'function_call': self.adaptor.description.insert_last_into,
|
698
|
-
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
699
|
-
'type': 'terminate',
|
700
|
-
'params': [self.adaptor.description.elements.terminate, node]},
|
701
|
-
{'label': 'Stop',
|
702
|
-
'function_call': self.adaptor.description.insert_last_into,
|
703
|
-
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
704
|
-
'type': 'stop',
|
705
|
-
'params': [self.adaptor.description.elements.stop, node]},
|
706
|
-
{'label': 'Critical',
|
707
|
-
'function_call': self.adaptor.description.insert_last_into,
|
708
|
-
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
709
|
-
'type': 'critical',
|
710
|
-
'params': [self.adaptor.description.elements.critical, node]},
|
711
815
|
{'label': 'Parallel Branch',
|
712
|
-
'function_call':
|
816
|
+
'function_call': func,
|
713
817
|
'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
|
714
818
|
'type': 'parallel_branch',
|
715
819
|
'params': [self.adaptor.description.elements.parallel_branch, node]}
|
@@ -735,11 +839,19 @@ function WFAdaptorManifestation(adaptor) {
|
|
735
839
|
this.elements.parallel_branch = { /*{{{*/
|
736
840
|
'type': 'complex',
|
737
841
|
'illustrator': {//{{{
|
738
|
-
'endnodes': '
|
842
|
+
'endnodes': 'passthrough',
|
739
843
|
'closeblock': false,
|
844
|
+
'noarrow': true,
|
740
845
|
'expansion': function(node) {
|
741
846
|
return 'vertical';
|
742
847
|
},
|
848
|
+
'resolve_symbol': function(node,shift) {
|
849
|
+
if(shift == true) {
|
850
|
+
return 'parallel_branch_event';
|
851
|
+
} else {
|
852
|
+
return 'parallel_branch_normal';
|
853
|
+
}
|
854
|
+
},
|
743
855
|
'col_shift': function(node) {
|
744
856
|
if(node.parentNode.tagName == 'choose') return false;
|
745
857
|
if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
|
@@ -811,7 +923,12 @@ function WFAdaptorManifestation(adaptor) {
|
|
811
923
|
}, //}}}
|
812
924
|
'adaptor': {//{{{
|
813
925
|
'mousedown': function (node,e) {
|
814
|
-
self.
|
926
|
+
var xml_node = self.adaptor.description.get_node_by_svg_id(node);
|
927
|
+
if(xml_node.get(0).parentNode.tagName == 'parallel') {
|
928
|
+
self.events.mousedown(node,e,true,false);
|
929
|
+
} else {
|
930
|
+
self.events.mousedown(node,e,true,true);
|
931
|
+
}
|
815
932
|
},
|
816
933
|
'click': self.events.click,
|
817
934
|
'dblclick': self.events.dblclick,
|
@@ -933,9 +1050,11 @@ function WFAdaptorManifestation(adaptor) {
|
|
933
1050
|
'illustrator': {//{{{
|
934
1051
|
'endnodes': 'passthrough',
|
935
1052
|
'closeblock': false,
|
1053
|
+
'balance': true,
|
936
1054
|
'expansion': function(node) {
|
937
1055
|
return 'vertical';
|
938
1056
|
},
|
1057
|
+
'closing_symbol': 'end',
|
939
1058
|
'col_shift': function(node) {
|
940
1059
|
return true;
|
941
1060
|
},
|
@@ -1009,31 +1128,67 @@ function WFAdaptorManifestation(adaptor) {
|
|
1009
1128
|
// * they may only have an illustrator (or other parts)
|
1010
1129
|
// * they HAVE TO have a parent
|
1011
1130
|
this.elements.callmanipulate = { /*{{{*/
|
1012
|
-
'type': 'abstract',
|
1013
1131
|
'parent': 'call',
|
1014
1132
|
'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
|
1015
1133
|
'illustrator': {//{{{
|
1016
|
-
'label': function(node){return $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'')},
|
1017
1134
|
'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
|
1018
1135
|
'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
|
1019
1136
|
},//}}}
|
1020
1137
|
}; /*}}}*/
|
1021
1138
|
this.elements.choose_inclusive = { /*{{{*/
|
1022
|
-
'type': 'abstract',
|
1023
1139
|
'parent': 'choose',
|
1024
1140
|
'illustrator': {//{{{
|
1025
1141
|
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
|
1026
|
-
}
|
1142
|
+
}//}}}
|
1027
1143
|
}; /*}}}*/
|
1028
1144
|
this.elements.choose_exclusive = { /*{{{*/
|
1029
|
-
'type': 'abstract',
|
1030
1145
|
'parent': 'choose',
|
1031
1146
|
'illustrator': {//{{{
|
1032
1147
|
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1033
1148
|
},//}}}
|
1034
1149
|
}; /*}}}*/
|
1150
|
+
this.elements.choose_inclusive_finish = { /*{{{*/
|
1151
|
+
'parent': 'choose_finish',
|
1152
|
+
'illustrator': {//{{{
|
1153
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
|
1154
|
+
}//}}}
|
1155
|
+
}; /*}}}*/
|
1156
|
+
this.elements.choose_exclusive_finish = { /*{{{*/
|
1157
|
+
'parent': 'choose_finish',
|
1158
|
+
'illustrator': {//{{{
|
1159
|
+
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
|
1160
|
+
},//}}}
|
1161
|
+
}; /*}}}*/
|
1162
|
+
this.elements.parallel_simple = { /*{{{*/
|
1163
|
+
'parent': 'parallel_finish',
|
1164
|
+
'illustrator': {//{{{
|
1165
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
|
1166
|
+
}//}}}
|
1167
|
+
}; /*}}}*/
|
1168
|
+
this.elements.parallel_complex = { /*{{{*/
|
1169
|
+
'parent': 'parallel_finish',
|
1170
|
+
'illustrator': {//{{{
|
1171
|
+
'svg': self.adaptor.theme_dir + 'symbols/complex.svg'
|
1172
|
+
},//}}}
|
1173
|
+
}; /*}}}*/
|
1174
|
+
this.elements.parallel_branch_normal = { /*{{{*/
|
1175
|
+
'parent': 'parallel_branch',
|
1176
|
+
'illustrator': {//{{{
|
1177
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_normal.svg'
|
1178
|
+
}//}}}
|
1179
|
+
}; /*}}}*/
|
1180
|
+
this.elements.parallel_branch_event = { /*{{{*/
|
1181
|
+
'parent': 'parallel_branch',
|
1182
|
+
'illustrator': {//{{{
|
1183
|
+
'endnodes': 'this',
|
1184
|
+
'noarrow': false,
|
1185
|
+
'border': true,
|
1186
|
+
'wide': true,
|
1187
|
+
'closing_symbol': 'event_end',
|
1188
|
+
'svg': self.adaptor.theme_dir + 'symbols/parallel_branch_event.svg'
|
1189
|
+
}//}}}
|
1190
|
+
}; /*}}}*/
|
1035
1191
|
this.elements.scripts = { /*{{{*/
|
1036
|
-
'type': 'abstract',
|
1037
1192
|
'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
|
1038
1193
|
}; /*}}}*/
|
1039
1194
|
}
|