cpee 1.3.125 → 1.3.126

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,7 @@ $(document).ready(function() {
32
32
  }); //}}}
33
33
 
34
34
  $('#dat_details input.pair_name, #dat_details input.prop_value, #dat_details textarea.prop_value, #dat_details select.prop_value, #dat_details input.pair_value').live('keyup',function(e){ mark_main_save($(e.target).parents('div.tabbed')); });
35
+ $('#dat_details select.prop_value').live('change',function(e){ mark_main_save($(e.target).parents('div.tabbed')); });
35
36
  });
36
37
 
37
38
  function mark_main_save(top) { //{{{
@@ -120,6 +121,7 @@ function serialize_details(parent) { //{{{
120
121
  xml.attr($('select.pname_mode').val(),$('input.pname_condition').val());
121
122
  break;
122
123
  case 'choose':
124
+ xml.attr('mode',$('select.pname_mode').val());
123
125
  break;
124
126
  case 'alternative':
125
127
  xml.attr('condition',$('input.pname_condition').val());
@@ -1,6 +1,5 @@
1
1
  var ws;
2
2
  var running = false;
3
- var load;
4
3
  var graphrealization;
5
4
  var subscription;
6
5
  var subscription_state = 'less';
@@ -44,8 +43,8 @@ var sub_less = 'topic' + '=' + 'running' + '&' +// {{{
44
43
 
45
44
  $(document).ready(function() {// {{{
46
45
  $("input[name=base-url]").val(location.protocol + "//" + location.host + ":9298/");
47
- $("button[name=base]").click(create_instance);
48
- $("button[name=instance]").click(monitor_instance);
46
+ $("button[name=base]").click(function(){ create_instance(null); });
47
+ $("button[name=instance]").click(function(){ ui_tab_click("#tabinstance"); monitor_instance(false); });
49
48
  $("button[name=loadtestset]").click(load_testset);
50
49
  $("button[name=loadtestsetfile]").click(load_testsetfile);
51
50
  $("button[name=loadmodelfile]").click(load_modelfile);
@@ -53,6 +52,7 @@ $(document).ready(function() {// {{{
53
52
  $("button[name=savesvg]").click(function(){ save_svg(); });
54
53
  $("input[name=votecontinue]").click(check_subscription);
55
54
 
55
+
56
56
  $.ajax({
57
57
  url: "testsets/index.xml",
58
58
  dataType: 'xml',
@@ -63,20 +63,24 @@ $(document).ready(function() {// {{{
63
63
  $("<option></option>").attr("value",ts).text(ts)
64
64
  );
65
65
  });
66
+ var q = $.parseQuery();
67
+ if (q.monitor && q.load) {
68
+ $("input[name=instance-url]").val(q.monitor);
69
+ $("select[name=testset-names]").val(q.load)
70
+ ui_tab_click("#tabexecution");
71
+ monitor_instance(true);
72
+ } else if (q.load) {
73
+ $("select[name=testset-names]").val(q.load)
74
+ ui_tab_click("#tabexecution");
75
+ create_instance(q.load);
76
+ } else if (q.monitor) {
77
+ $("input[name=instance-url]").val(q.monitor);
78
+ ui_tab_click("#tabexecution");
79
+ // ui_toggle_vis_tab($("#instance td.switch"));
80
+ monitor_instance(false);
81
+ }
66
82
  }
67
83
  });
68
-
69
- var q = $.parseQuery();
70
- if (q.monitor) {
71
- $("input[name=instance-url]").val(q.monitor);
72
- ui_toggle_vis_tab($("#instance td.switch"));
73
- monitor_instance();
74
- }
75
- if (q.load) {
76
- load = q.load;
77
- ui_toggle_vis_tab($("#instance td.switch"));
78
- create_instance();
79
- }
80
84
  });// }}}
81
85
 
82
86
  function check_subscription() { // {{{
@@ -110,8 +114,8 @@ function check_subscription() { // {{{
110
114
  }
111
115
  }// }}}
112
116
 
113
- function create_instance() {// {{{
114
- var info = load ? load : prompt("Instance info?", "Enter info here");
117
+ function create_instance(ask) {// {{{
118
+ var info = ask ? ask: prompt("Instance info?", "Enter info here");
115
119
  if (info != null) {
116
120
  if (info.match(/\S/)) {
117
121
  var base = $("input[name=base-url]").val();
@@ -122,7 +126,7 @@ function create_instance() {// {{{
122
126
  data: "info=" + info,
123
127
  success: function(res){
124
128
  $("input[name=instance-url]").val((base + "//" + res + "/").replace(/\/+/g,"/").replace(/:\//,"://"));
125
- if (load) monitor_instance();
129
+ if (ask) monitor_instance(true);
126
130
  },
127
131
  error: function(a,b,c) {
128
132
  alert("No CPEE running.");
@@ -134,7 +138,7 @@ function create_instance() {// {{{
134
138
  }
135
139
  }// }}}
136
140
 
137
- function monitor_instance() {// {{{
141
+ function monitor_instance(load) {// {{{
138
142
  var url = $("input[name=instance-url]").val();
139
143
 
140
144
  $('.tabbehind button').hide();
@@ -153,8 +157,6 @@ function monitor_instance() {// {{{
153
157
  $("#current-instance").attr('href',url);
154
158
  history.replaceState({}, '', '?monitor='+url);
155
159
 
156
- ui_tab_click($("#tabinstance")[0]);
157
-
158
160
  // Change url to return to current instance when reloading (because new subscription is made)
159
161
  $("input[name=votecontinue]").removeAttr('checked');
160
162
  subscription_state = 'less';
@@ -222,6 +224,7 @@ function monitor_instance() {// {{{
222
224
  },
223
225
  error: function(a,b,c) {
224
226
  alert("This ain't no CPEE instance");
227
+ ui_tab_click("#tabnew");
225
228
  }
226
229
  });
227
230
  }// }}}
@@ -369,7 +372,6 @@ function monitor_instance_state_change(notification) { //{{{
369
372
  ctv.empty();
370
373
 
371
374
  if (notification == "stopped") {
372
- format_visual_clear();
373
375
  monitor_instance_pos();
374
376
  }
375
377
  if (notification == "running") {
@@ -651,7 +653,7 @@ function load_testset() {// {{{
651
653
  $('#main .tabbehind button').hide();
652
654
  $('#dat_details').empty();
653
655
 
654
- var name = load ? load : $("select[name=testset-names]").val();
656
+ var name = $("select[name=testset-names]").val();
655
657
 
656
658
  $.ajax({
657
659
  cache: false,
@@ -162,6 +162,8 @@ function CPEE(adaptor) {
162
162
  tab.append(create_input_property('Condition','',$(node).attr(mode)));
163
163
  break;
164
164
  case 'choose':
165
+ var mode = ($(node).attr('mode') == 'inclusive' || $(node).attr('mode') == undefined ? 'inclusive' : 'exclusive')
166
+ tab.append(create_select_property('Mode','',mode,['exclusive','inclusive']));
165
167
  break;
166
168
  case 'alternative':
167
169
  tab.append(create_input_property('Condition','',$(node).attr('condition')));
@@ -351,19 +353,14 @@ function CPEE(adaptor) {
351
353
  'resolve_symbol' : function(node) {
352
354
  if($(node).attr('endpoint') == 'instantiation') {
353
355
  return 'callinstantiation';
354
- return illustrator.elements.callinstantiation.draw(node, pos, block);
355
356
  } else if($(node).attr('endpoint') == 'correlation') {
356
357
  return 'callcorrelation';
357
- return illustrator.elements.callcorrelation.draw(node, pos, block);
358
358
  } else if($('parameters > service', node).length > 0) {
359
359
  return 'callinjection';
360
- return illustrator.elements.callinjection.draw(node, pos, block);
361
360
  } else if($('manipulate', node).length > 0) {
362
361
  return 'callmanipulate';
363
- return illustrator.elements.callmanipulate.draw(node, pos, block);
364
362
  } else {
365
- return'call'
366
- return illustrator.draw.draw_symbol('call', $(node).attr('svg-id'), pos.row, pos.col);
363
+ return'call';
367
364
  }
368
365
  },
369
366
  'svg': function() {
@@ -425,6 +422,34 @@ function CPEE(adaptor) {
425
422
  'click': events.click,
426
423
  }//}}}
427
424
  }; /*}}}*/
425
+ this.elements.break = { /*{{{*/
426
+ 'illustrator': {//{{{
427
+ 'type' : 'primitive',
428
+ 'endnodes' : 'this',
429
+ 'svg': function() {
430
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
431
+ '<circle cx="15" cy="15" r="14" class="stand"/>' +
432
+ '<circle cx="15" cy="15" r="11" class="stand"/>' +
433
+ '<polygon points="10.5,20.5 15,8.5 20.5,20.5 15,15.5 10.5,20.5" class="black"/>' +
434
+ '</svg>');
435
+ }
436
+ },//}}}
437
+ 'description' : {//{{{
438
+ 'create': function(target) {
439
+ var node = $X('<break xmlns="http://cpee.org/ns/description/1.0"/>');
440
+ return node;
441
+ },
442
+ 'permissible_children': function(node) {
443
+ return [];
444
+ }
445
+ },//}}}
446
+ 'adaptor' : {//{{{
447
+ 'mousedown': function (node, e) {
448
+ events.mousedown(node,e,false, true);
449
+ },
450
+ 'click': events.click,
451
+ }//}}}
452
+ }; /*}}}*/
428
453
  this.elements.constraints = { /*{{{*/
429
454
  'illustrator': {//{{{
430
455
  'type' : 'primitive',
@@ -451,6 +476,128 @@ function CPEE(adaptor) {
451
476
  }; /*}}}*/
452
477
 
453
478
  // Complex Elements
479
+ this.elements.choose_inclusive = { /*{{{*/
480
+ 'illustrator': {//{{{
481
+ 'type' : 'abstract',
482
+ 'endnodes' : 'aggregate',
483
+ 'closeblock': false,
484
+ 'expansion' : function(node) {
485
+ return 'horizontal';
486
+ },
487
+ 'col_shift' : function(node) {
488
+ return false;
489
+ },
490
+ 'svg': function() {
491
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
492
+ '<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>' +
493
+ '<circle cx="15.5" cy="15.5" r="7" class="stand"/>' +
494
+ '</svg>');
495
+ }
496
+ },//}}}
497
+ 'description' : {//{{{
498
+ 'create': function(target) {
499
+ var node = $X('<choose mode="exclusive" xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
500
+ return node;
501
+ },
502
+ 'permissible_children': function(node) {
503
+ var func = null;
504
+ if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
505
+ else { func = adaptor.description.insert_after }
506
+ if(node.children('parallel_branch').length > 0) {
507
+ return [{'label': 'Parallel Branch',
508
+ 'function_call': func,
509
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
510
+ 'params': [adaptor.description.elements.parallel_branch.create, node]}];
511
+ }
512
+ var childs = [{'label': 'Alternative',
513
+ 'function_call': func,
514
+ 'menu_icon': elements.alternative.illustrator.svg,
515
+ 'params': [adaptor.description.elements.alternative.create, node]}];
516
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
517
+ childs.push({'label': 'Otherwise',
518
+ 'function_call': func,
519
+ 'menu_icon': elements.otherwise.illustrator.svg,
520
+ 'params': [adaptor.description.elements.otherwise.create, node]});
521
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
522
+ childs.push({'label': 'Parallel Branch',
523
+ 'function_call': func,
524
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
525
+ 'params': [adaptor.description.elements.parallel_branch.create, node]});
526
+ return childs;
527
+ }
528
+ },//}}}
529
+ 'adaptor' : {//{{{
530
+ 'mousedown': function (node, e) {
531
+ events.mousedown(node,e,true, true);
532
+ },
533
+ 'click': events.click,
534
+ 'dblclick': events.dblclick,
535
+ 'mouseover': events.mouseover,
536
+ 'mouseout': events.mouseout,
537
+ }//}}}
538
+ }; /*}}}*/
539
+ this.elements.choose_exclusive = { /*{{{*/
540
+ 'illustrator': {//{{{
541
+ 'type' : 'abstract',
542
+ 'endnodes' : 'aggregate',
543
+ 'closeblock': false,
544
+ 'expansion' : function(node) {
545
+ return 'horizontal';
546
+ },
547
+ 'col_shift' : function(node) {
548
+ return false;
549
+ },
550
+ 'svg': function() {
551
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
552
+ '<rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>' +
553
+ '<line x1="10.5" y1="20.5" x2="20.5" y2="10.5" class="stand"/>' +
554
+ '<line x1="10.5" y1="10.5" x2="20.5" y2="20.5" class="stand"/>' +
555
+ '</svg>');
556
+ }
557
+ },//}}}
558
+ 'description' : {//{{{
559
+ 'create': function(target) {
560
+ var node = $X('<choose mode="exclusive" xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
561
+ return node;
562
+ },
563
+ 'permissible_children': function(node) {
564
+ var func = null;
565
+ if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
566
+ else { func = adaptor.description.insert_after }
567
+ if(node.children('parallel_branch').length > 0) {
568
+ return [{'label': 'Parallel Branch',
569
+ 'function_call': func,
570
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
571
+ 'params': [adaptor.description.elements.parallel_branch.create, node]}];
572
+ }
573
+ var childs = [{'label': 'Alternative',
574
+ 'function_call': func,
575
+ 'menu_icon': elements.alternative.illustrator.svg,
576
+ 'params': [adaptor.description.elements.alternative.create, node]}];
577
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
578
+ childs.push({'label': 'Otherwise',
579
+ 'function_call': func,
580
+ 'menu_icon': elements.otherwise.illustrator.svg,
581
+ 'params': [adaptor.description.elements.otherwise.create, node]});
582
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
583
+ childs.push({'label': 'Parallel Branch',
584
+ 'function_call': func,
585
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
586
+ 'params': [adaptor.description.elements.parallel_branch.create, node]});
587
+ return childs;
588
+ }
589
+ },//}}}
590
+ 'adaptor' : {//{{{
591
+ 'mousedown': function (node, e) {
592
+ events.mousedown(node,e,true, true);
593
+ },
594
+ 'click': events.click,
595
+ 'dblclick': events.dblclick,
596
+ 'mouseover': events.mouseover,
597
+ 'mouseout': events.mouseout,
598
+ }//}}}
599
+ }; /*}}}*/
600
+
454
601
  this.elements.choose = { /*{{{*/
455
602
  'illustrator': {//{{{
456
603
  'type' : 'complex',
@@ -459,6 +606,13 @@ function CPEE(adaptor) {
459
606
  'expansion' : function(node) {
460
607
  return 'horizontal';
461
608
  },
609
+ 'resolve_symbol' : function(node) {
610
+ if($(node).attr('mode') == 'exclusive') {
611
+ return 'choose_exclusive';
612
+ } else {
613
+ return 'choose_inclusive';
614
+ }
615
+ },
462
616
  'col_shift' : function(node) {
463
617
  return false;
464
618
  },
@@ -471,7 +625,7 @@ function CPEE(adaptor) {
471
625
  },//}}}
472
626
  'description' : {//{{{
473
627
  'create': function(target) {
474
- var node = $X('<choose xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
628
+ var node = $X('<choose mode="exclusive" xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
475
629
  return node;
476
630
  },
477
631
  'permissible_children': function(node) {
@@ -323,10 +323,12 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
323
323
  } // }}}
324
324
 
325
325
  $(root).children().each(function() {
326
+ var tname = this.tagName;
327
+
326
328
  // Set SVG-ID {{{
327
329
  if($(this).attr('id') == undefined) {
328
- if(id_counter[this.tagName] == undefined) id_counter[this.tagName] = -1;
329
- $(this).attr('svg-id', this.tagName + '_' + (++id_counter[this.tagName]));
330
+ if(id_counter[tname] == undefined) id_counter[tname] = -1;
331
+ $(this).attr('svg-id', tname + '_' + (++id_counter[tname]));
330
332
  $(this).attr('svg-label', '');
331
333
  } else {
332
334
  $(this).attr('svg-id', $(this).attr('id'));
@@ -341,15 +343,15 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
341
343
  else { collapsed = true; }
342
344
  if(root_expansion == 'vertical') pos.row++;
343
345
  if(root_expansion == 'horizontal') pos.col++;
344
- if(illustrator.elements[this.tagName] != undefined && illustrator.elements[this.tagName].type == 'complex' && !collapsed) {
345
- if(illustrator.elements[this.tagName] != undefined && !illustrator.elements[this.tagName].svg()) pos.row--;
346
- // TODO: Remaining problem is the order insode the svg. Thats why the connection is above the icon
346
+ if(illustrator.elements[tname] != undefined && illustrator.elements[tname].type == 'complex' && !collapsed) {
347
+ if(illustrator.elements[tname] != undefined && !illustrator.elements[tname].svg()) pos.row--;
348
+ // TODO: Remaining problem is the order inside the svg. Thats why the connection is above the icon
347
349
  block = parse(this, jQuery.extend(true, {}, pos));
348
350
  group.append(block.svg);
349
351
  block.svg.attr('id', 'group-' + $(this).attr('svg-id'));
350
- if(illustrator.elements[this.tagName].endnodes == 'aggregate') endnodes = []; // resets endpoints e.g. potential preceding primitive
352
+ if(illustrator.elements[tname].endnodes == 'aggregate') endnodes = []; // resets endpoints e.g. potential preceding primitive
351
353
  } else {
352
- if(illustrator.elements[this.tagName] != undefined && illustrator.elements[this.tagName].type == 'primitive' && illustrator.elements[this.tagName].svg()) { // This enables "invisble" elements, by returning false in the SVG function (e.g. constraints)
354
+ if(illustrator.elements[tname] != undefined && illustrator.elements[tname].type == 'primitive' && illustrator.elements[tname].svg()) { // This enables "invisble" elements, by returning false in the SVG function (e.g. constraints)
353
355
  block.max.row = pos.row;
354
356
  block.max.col = pos.col;
355
357
  block.endnodes = (!collapsed ? [pos] : [jQuery.extend(true, {}, pos)]);
@@ -359,27 +361,27 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
359
361
  // }}}
360
362
  // Draw symbol {{{
361
363
  var sym_name = '';
362
- if(!illustrator.elements[this.tagName]) {sym_name = 'unknown';}
363
- else if(typeof illustrator.elements[this.tagName].resolve_symbol == 'function') {sym_name = illustrator.elements[this.tagName].resolve_symbol(this);}
364
- else if(typeof illustrator.elements[this.tagName].resolve_symbol == 'string') {sym_name = illustrator.elements[this.tagName].resolve_symbol;}
365
- else {sym_name = this.tagName;}
366
- if((illustrator.elements[this.tagName] && illustrator.elements[this.tagName].svg()) || sym_name == 'unknown') {
367
- illustrator.draw.draw_symbol(sym_name, $(this).attr('svg-id'), $(this).attr('svg-label'), pos.row, pos.col, block.svg).addClass(illustrator.elements[this.tagName] ? illustrator.elements[this.tagName].type : 'primitive unknown');
368
- } else { console.log("no icon "+ this.tagName);}
369
- if(illustrator.elements[this.tagName] && illustrator.elements[this.tagName].border) illustrator.draw.draw_border($(this).attr('svg-id'), pos, block.max, block.svg);
370
- if(illustrator.elements[this.tagName] && illustrator.elements[this.tagName].type == 'complex') illustrator.draw.draw_tile($(this).attr('svg-id'), pos, block.max, block.svg);
364
+ if(!illustrator.elements[tname]) {sym_name = 'unknown';}
365
+ else if(typeof illustrator.elements[tname].resolve_symbol == 'function') {sym_name = illustrator.elements[tname].resolve_symbol(this);}
366
+ else if(typeof illustrator.elements[tname].resolve_symbol == 'string') {sym_name = illustrator.elements[tname].resolve_symbol;}
367
+ else {sym_name = tname;}
368
+ if((illustrator.elements[tname] && illustrator.elements[tname].svg()) || sym_name == 'unknown') {
369
+ illustrator.draw.draw_symbol(sym_name, $(this).attr('svg-id'), $(this).attr('svg-label'), pos.row, pos.col, block.svg).addClass(illustrator.elements[tname] ? illustrator.elements[tname].type : 'primitive unknown');
370
+ } else { console.log("no icon "+ tname);}
371
+ if(illustrator.elements[tname] && illustrator.elements[tname].border) illustrator.draw.draw_border($(this).attr('svg-id'), pos, block.max, block.svg);
372
+ if(illustrator.elements[tname] && illustrator.elements[tname].type == 'complex') illustrator.draw.draw_tile($(this).attr('svg-id'), pos, block.max, block.svg);
371
373
  // }}}
372
374
  // Calculate Connection {{{
373
- if(illustrator.elements[this.tagName] != undefined && illustrator.elements[this.tagName].closeblock) { // Close Block if element e.g. loop
375
+ if(illustrator.elements[tname] != undefined && illustrator.elements[tname].closeblock) { // Close Block if element e.g. loop
374
376
  for(node in block.endnodes) illustrator.draw.draw_connection(group, block.endnodes[node], pos, block.max.row+1, block.endnodes.length, true);
375
377
  }
376
- if(illustrator.elements[this.tagName] != undefined && illustrator.elements[this.tagName].endnodes != 'this') {
378
+ if(illustrator.elements[tname] != undefined && illustrator.elements[tname].endnodes != 'this') {
377
379
  for(i in block.endnodes) endnodes.push(block.endnodes[i]); // collects all endpoints from different childs e.g. alternatives from choose
378
380
  } else { endnodes = [jQuery.extend(true, {}, pos)]; } // sets this element as only endpoint (aggreagte)
379
381
  if(prev[0].row == 0 || prev[0].col == 0) { // this enforces the connection from description to the first element
380
382
  illustrator.draw.draw_connection(group, { row: 1, col: 1 }, pos, null, null, true);
381
383
  } else {
382
- if ($.inArray(this.tagName,noarrow) == -1)
384
+ if ($.inArray(tname,noarrow) == -1)
383
385
  for(node in prev) illustrator.draw.draw_connection(group, prev[node], pos, null, null, true);
384
386
  else
385
387
  for(node in prev) illustrator.draw.draw_connection(group, prev[node], pos, null, null, false);
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.125"
3
+ s.version = "1.3.126"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
@@ -64,12 +64,14 @@
64
64
  <get in="*" out="instance-info"/>
65
65
  <delete in="*"/>
66
66
  <resource relative="callbacks">
67
+ <doc:documentation>xb</doc:documentation>
67
68
  <get in="*" out="callbacks"/>
68
69
  <resource>
69
70
  <put in="*"/>
70
71
  </resource>
71
72
  </resource>
72
73
  <resource relative="notifications">
74
+ <doc:documentation>xr</doc:documentation>
73
75
  <resource relative="subscriptions">
74
76
  <resource>
75
77
  <resource relative="debug">
@@ -103,8 +103,6 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
103
103
  end # }}}
104
104
 
105
105
  def inform_syntax_error(err,code)# {{{
106
- puts err.message
107
- puts err.backtrace
108
106
  @controller.notify("properties/description/error", :instance => @controller.instance, :message => err.message)
109
107
  end# }}}
110
108
  def inform_manipulate_change(status,dataelements,endpoints) # {{{
@@ -0,0 +1,27 @@
1
+ <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
2
+ <topic id="running">
3
+ <event>activity_calling</event>
4
+ <event>activity_manipulating</event>
5
+ <event>activity_failed</event>
6
+ <event>activity_done</event>
7
+ </topic>
8
+ <topic id="properties/position">
9
+ <event>change</event>
10
+ </topic>
11
+ <topic id="properties/description">
12
+ <event>change</event>
13
+ <event>error</event>
14
+ </topic>
15
+ <topic id="properties/state">
16
+ <event>change</event>
17
+ </topic>
18
+ <topic id="properties/dataelements">
19
+ <event>change</event>
20
+ </topic>
21
+ <topic id="properties/endpoints">
22
+ <event>change</event>
23
+ </topic>
24
+ <topic id="properties/handlers">
25
+ <event>change</event>
26
+ </topic>
27
+ </subscription>
@@ -1,31 +1,64 @@
1
1
  <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
2
- <info>Enter info here</info>
3
- <state>finished</state>
2
+ <info>asd</info>
3
+ <state>stopped</state>
4
4
  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
5
- <positions/>
5
+ <positions>
6
+ <a1>after</a1>
7
+ </positions>
6
8
  <dataelements>
7
9
  <x/>
8
10
  </dataelements>
9
11
  <endpoints>
10
12
  <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
11
- <back>http://gruppe.wst.univie.ac.at/~mangler/services/callback.php</back>
12
13
  </endpoints>
13
- <dsl>call :a1, :back, { :method =&gt; "post", :parameters =&gt; { :timeout =&gt; 2 } }, &lt;&lt;-end
14
- data.x += "a1,"
14
+ <dsl>parallel do
15
+ parallel_branch do
16
+ call :a4, :timeout, { :label =&gt; nil, :method =&gt; "post", :parameters =&gt; { :timeout =&gt; a } }
17
+ end
18
+ parallel_branch do
19
+ call :a5, :timeout, { :label =&gt; nil, :method =&gt; "post", :parameters =&gt; { :timeout =&gt; a } }
20
+ end
21
+ end
22
+ call :a2, :timeout, { :label =&gt; nil, :method =&gt; "post", :parameters =&gt; { :timeout =&gt; b } }, &lt;&lt;-end
23
+ data.x += "a2,"
15
24
  end
16
25
  </dsl>
17
26
  <dslx>
18
27
  <description xmlns="http://cpee.org/ns/description/1.0">
19
- <call id="a1" endpoint="back">
28
+ <!--{{{-->
29
+ <parallel svg-label="">
30
+ <parallel_branch svg-label="">
31
+ <call id="a4" endpoint="timeout" svg-label="">
32
+ <parameters>
33
+ <label/>
34
+ <method>post</method>
35
+ <parameters>
36
+ <timeout>a</timeout>
37
+ </parameters>
38
+ </parameters>
39
+ </call>
40
+ </parallel_branch>
41
+ <parallel_branch svg-label="">
42
+ <call id="a5" endpoint="timeout" svg-label="">
43
+ <parameters>
44
+ <label/>
45
+ <method>post</method>
46
+ <parameters>
47
+ <timeout>a</timeout>
48
+ </parameters>
49
+ </parameters>
50
+ </call>
51
+ </parallel_branch>
52
+ </parallel>
53
+ <call id="a2" endpoint="timeout">
20
54
  <parameters>
21
- <!--{{{-->
55
+ <label/>
22
56
  <method>post</method>
23
57
  <parameters>
24
- <timeout>2</timeout>
58
+ <timeout>b</timeout>
25
59
  </parameters>
26
60
  </parameters>
27
- <!--}}}-->
28
- <manipulate output="result"> data.x += "a1,"</manipulate>
61
+ <manipulate>data.x += "a2,"</manipulate>
29
62
  </call>
30
63
  </description>
31
64
  </dslx>
@@ -35,16 +68,40 @@ end
35
68
  </status>
36
69
  <description>
37
70
  <description xmlns="http://cpee.org/ns/description/1.0">
38
- <call id="a1" endpoint="back">
71
+ <!--{{{-->
72
+ <parallel svg-label="">
73
+ <parallel_branch svg-label="">
74
+ <call id="a4" endpoint="timeout" svg-label="">
75
+ <parameters>
76
+ <label/>
77
+ <method>post</method>
78
+ <parameters>
79
+ <timeout>a</timeout>
80
+ </parameters>
81
+ </parameters>
82
+ </call>
83
+ </parallel_branch>
84
+ <parallel_branch svg-label="">
85
+ <call id="a5" endpoint="timeout" svg-label="">
86
+ <parameters>
87
+ <label/>
88
+ <method>post</method>
89
+ <parameters>
90
+ <timeout>a</timeout>
91
+ </parameters>
92
+ </parameters>
93
+ </call>
94
+ </parallel_branch>
95
+ </parallel>
96
+ <call id="a2" endpoint="timeout">
39
97
  <parameters>
40
- <!--{{{-->
98
+ <label/>
41
99
  <method>post</method>
42
100
  <parameters>
43
- <timeout>2</timeout>
101
+ <timeout>b</timeout>
44
102
  </parameters>
45
103
  </parameters>
46
- <!--}}}-->
47
- <manipulate output="result"> data.x += "a1,"</manipulate>
104
+ <manipulate>data.x += "a2,"</manipulate>
48
105
  </call>
49
106
  </description>
50
107
  </description>
@@ -0,0 +1,27 @@
1
+ <subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
2
+ <topic id="running">
3
+ <event>activity_calling</event>
4
+ <event>activity_manipulating</event>
5
+ <event>activity_failed</event>
6
+ <event>activity_done</event>
7
+ </topic>
8
+ <topic id="properties/position">
9
+ <event>change</event>
10
+ </topic>
11
+ <topic id="properties/description">
12
+ <event>change</event>
13
+ <event>error</event>
14
+ </topic>
15
+ <topic id="properties/state">
16
+ <event>change</event>
17
+ </topic>
18
+ <topic id="properties/dataelements">
19
+ <event>change</event>
20
+ </topic>
21
+ <topic id="properties/endpoints">
22
+ <event>change</event>
23
+ </topic>
24
+ <topic id="properties/handlers">
25
+ <event>change</event>
26
+ </topic>
27
+ </subscription>
@@ -1,33 +1,68 @@
1
1
  <properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
2
- <info>asdasd</info>
2
+ <info>asdads</info>
3
3
  <state>ready</state>
4
4
  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
5
- <positions>
6
- <a1>after</a1>
7
- </positions>
8
- <dataelements>
9
- <x/>
10
- </dataelements>
5
+ <positions/>
6
+ <dataelements/>
11
7
  <endpoints>
12
8
  <timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
13
- <back>http://gruppe.wst.univie.ac.at/~mangler/services/callback.php</back>
14
9
  </endpoints>
15
- <dsl>call :a1, :back, { :method =&gt; "post", :parameters =&gt; { :timeout =&gt; 2 } }, &lt;&lt;-end
16
- data.x += "a1,"
10
+ <dsl>choose :exclusive do
11
+ alternative "data.a &lt; 3" do
12
+ call :a42, :timeout, { :label =&gt; "B", :method =&gt; "post", :type =&gt; "serviceTask", :mid =&gt; "sid-C4915A51-F57C-44E7-8BA7-AC5247998430", :parameters =&gt; { :timeout =&gt; 1 } }, &lt;&lt;-end
13
+ data.a = 'path 1'
14
+ end
15
+ end
16
+ otherwise do
17
+ call :a44, :timeout, { :label =&gt; "C", :method =&gt; "post", :type =&gt; "serviceTask", :mid =&gt; "sid-4F7DC368-C233-43DF-862A-28FC41919D18", :parameters =&gt; { :timeout =&gt; 1 } }, &lt;&lt;-end
18
+ data.a = 'path 2'
19
+ end
20
+ end
17
21
  end
22
+ call :a46, :timeout, { :label =&gt; "A", :method =&gt; "post", :type =&gt; "serviceTask", :mid =&gt; "sid-DCA5CEE9-2935-4876-AF02-8322B5DB31EE", :parameters =&gt; { :timeout =&gt; 1 } }
18
23
  </dsl>
19
24
  <dslx>
20
25
  <description xmlns="http://cpee.org/ns/description/1.0">
21
- <call id="a1" endpoint="back">
26
+ <choose mode="exclusive">
27
+ <alternative condition="data.a &lt; 3" language="text/javascript">
28
+ <call id="a42" endpoint="timeout">
29
+ <parameters>
30
+ <label>B</label>
31
+ <method>post</method>
32
+ <type>serviceTask</type>
33
+ <mid>sid-C4915A51-F57C-44E7-8BA7-AC5247998430</mid>
34
+ <parameters>
35
+ <timeout>1</timeout>
36
+ </parameters>
37
+ </parameters>
38
+ <manipulate output="result" language="application/javascript">data.a = 'path 1'</manipulate>
39
+ </call>
40
+ </alternative>
41
+ <otherwise>
42
+ <call id="a44" endpoint="timeout">
43
+ <parameters>
44
+ <label>C</label>
45
+ <method>post</method>
46
+ <type>serviceTask</type>
47
+ <mid>sid-4F7DC368-C233-43DF-862A-28FC41919D18</mid>
48
+ <parameters>
49
+ <timeout>1</timeout>
50
+ </parameters>
51
+ </parameters>
52
+ <manipulate output="result" language="application/javascript">data.a = 'path 2'</manipulate>
53
+ </call>
54
+ </otherwise>
55
+ </choose>
56
+ <call id="a46" endpoint="timeout">
22
57
  <parameters>
23
- <!--{{{-->
58
+ <label>A</label>
24
59
  <method>post</method>
60
+ <type>serviceTask</type>
61
+ <mid>sid-DCA5CEE9-2935-4876-AF02-8322B5DB31EE</mid>
25
62
  <parameters>
26
- <timeout>2</timeout>
63
+ <timeout>1</timeout>
27
64
  </parameters>
28
65
  </parameters>
29
- <!--}}}-->
30
- <manipulate output="result"> data.x += "a1,"</manipulate>
31
66
  </call>
32
67
  </description>
33
68
  </dslx>
@@ -37,22 +72,52 @@ end
37
72
  </status>
38
73
  <description>
39
74
  <description xmlns="http://cpee.org/ns/description/1.0">
40
- <call id="a1" endpoint="back">
75
+ <choose mode="exclusive">
76
+ <alternative condition="data.a &lt; 3" language="text/javascript">
77
+ <call id="a42" endpoint="timeout">
78
+ <parameters>
79
+ <label>B</label>
80
+ <method>post</method>
81
+ <type>serviceTask</type>
82
+ <mid>sid-C4915A51-F57C-44E7-8BA7-AC5247998430</mid>
83
+ <parameters>
84
+ <timeout>1</timeout>
85
+ </parameters>
86
+ </parameters>
87
+ <manipulate output="result" language="application/javascript">data.a = 'path 1'</manipulate>
88
+ </call>
89
+ </alternative>
90
+ <otherwise>
91
+ <call id="a44" endpoint="timeout">
92
+ <parameters>
93
+ <label>C</label>
94
+ <method>post</method>
95
+ <type>serviceTask</type>
96
+ <mid>sid-4F7DC368-C233-43DF-862A-28FC41919D18</mid>
97
+ <parameters>
98
+ <timeout>1</timeout>
99
+ </parameters>
100
+ </parameters>
101
+ <manipulate output="result" language="application/javascript">data.a = 'path 2'</manipulate>
102
+ </call>
103
+ </otherwise>
104
+ </choose>
105
+ <call id="a46" endpoint="timeout">
41
106
  <parameters>
42
- <!--{{{-->
107
+ <label>A</label>
43
108
  <method>post</method>
109
+ <type>serviceTask</type>
110
+ <mid>sid-DCA5CEE9-2935-4876-AF02-8322B5DB31EE</mid>
44
111
  <parameters>
45
- <timeout>2</timeout>
112
+ <timeout>1</timeout>
46
113
  </parameters>
47
114
  </parameters>
48
- <!--}}}-->
49
- <manipulate output="result"> data.x += "a1,"</manipulate>
50
115
  </call>
51
116
  </description>
52
117
  </description>
53
118
  <transformation>
54
119
  <description type="copy"/>
55
- <dataelements type="rest"/>
56
- <endpoints type="rest"/>
120
+ <dataelements type="xslt"/>
121
+ <endpoints type="xslt"/>
57
122
  </transformation>
58
123
  </properties>
@@ -42,6 +42,10 @@
42
42
  </xsl:call-template>
43
43
  <xsl:call-template name="print-newline"/>
44
44
  </xsl:if>
45
+ <xsl:if test="name()='break'">
46
+ <xsl:text>break</xsl:text>
47
+ <xsl:call-template name="print-newline"/>
48
+ </xsl:if>
45
49
  <xsl:if test="name()='parallel'">
46
50
  <xsl:text>parallel</xsl:text>
47
51
  <xsl:if test="@wait">
@@ -63,14 +67,32 @@
63
67
  <xsl:if test="name()='loop'">
64
68
  <xsl:text>loop </xsl:text>
65
69
  <xsl:if test="@pre_test">
66
- <xsl:text>pre_test{</xsl:text>
67
- <xsl:value-of select="@pre_test"/>
68
- <xsl:text>} </xsl:text>
70
+ <xsl:choose>
71
+ <xsl:when test="not(@language) or @language='application/x-ruby'">
72
+ <xsl:text>pre_test{</xsl:text>
73
+ <xsl:value-of select="@pre_test"/>
74
+ <xsl:text>} </xsl:text>
75
+ </xsl:when>
76
+ <xsl:otherwise>
77
+ <xsl:text>pre_test("</xsl:text>
78
+ <xsl:value-of select="@pre_test"/>
79
+ <xsl:text>") </xsl:text>
80
+ </xsl:otherwise>
81
+ </xsl:choose>
69
82
  </xsl:if>
70
83
  <xsl:if test="@post_test">
71
- <xsl:text>post_test{</xsl:text>
72
- <xsl:value-of select="@post_test"/>
73
- <xsl:text>} </xsl:text>
84
+ <xsl:choose>
85
+ <xsl:when test="not(@language) or @language='application/x-ruby'">
86
+ <xsl:text>post_test{</xsl:text>
87
+ <xsl:value-of select="@post_test"/>
88
+ <xsl:text>} </xsl:text>
89
+ </xsl:when>
90
+ <xsl:otherwise>
91
+ <xsl:text>post_test("</xsl:text>
92
+ <xsl:value-of select="@post_test"/>
93
+ <xsl:text>") </xsl:text>
94
+ </xsl:otherwise>
95
+ </xsl:choose>
74
96
  </xsl:if>
75
97
  <xsl:text>do</xsl:text>
76
98
  <xsl:call-template name="print-newline"/>
@@ -85,7 +107,16 @@
85
107
  <xsl:call-template name="print-newline"/>
86
108
  </xsl:if>
87
109
  <xsl:if test="name()='choose'">
88
- <xsl:text>choose do</xsl:text>
110
+ <xsl:text>choose </xsl:text>
111
+ <xsl:choose>
112
+ <xsl:when test="@mode='exclusive'">
113
+ <xsl:text>:exclusive</xsl:text>
114
+ </xsl:when>
115
+ <xsl:otherwise>
116
+ <xsl:text>:inclusive</xsl:text>
117
+ </xsl:otherwise>
118
+ </xsl:choose>
119
+ <xsl:text> do</xsl:text>
89
120
  <xsl:call-template name="print-newline"/>
90
121
  <xsl:apply-templates>
91
122
  <xsl:with-param name="myspace"><xsl:value-of select="$myspace+$myspacemultiplier"/></xsl:with-param>
@@ -127,7 +158,18 @@
127
158
  <xsl:with-param name="count"><xsl:value-of select="$myspace+$myspacemultiplier"/></xsl:with-param>
128
159
  </xsl:call-template>
129
160
  <xsl:text>alternative </xsl:text>
130
- <xsl:value-of select="@condition"/>
161
+ <xsl:choose>
162
+ <xsl:when test="not(@language) or @language='application/x-ruby'">
163
+ <xsl:text>"</xsl:text>
164
+ <xsl:value-of select="@condition"/>
165
+ <xsl:text>"</xsl:text>
166
+ </xsl:when>
167
+ <xsl:otherwise>
168
+ <xsl:text>"</xsl:text>
169
+ <xsl:value-of select="@condition"/>
170
+ <xsl:text>"</xsl:text>
171
+ </xsl:otherwise>
172
+ </xsl:choose>
131
173
  <xsl:text> do</xsl:text>
132
174
  <xsl:call-template name="print-newline"/>
133
175
  <xsl:apply-templates>
@@ -0,0 +1 @@
1
+ 10417
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.125
4
+ version: 1.3.126
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-04-01 00:00:00.000000000 Z
14
+ date: 2014-07-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: riddl
@@ -76,8 +76,15 @@ files:
76
76
  - server/resources/transformation_dslx.xsl
77
77
  - server/resources/properties.schema.inactive
78
78
  - server/resources/transformation.xml
79
+ - server/instances/1/notifications/d12eff1ac812661c05d7090ce7394cf9/consumer-secret
80
+ - server/instances/1/notifications/d12eff1ac812661c05d7090ce7394cf9/producer-secret
81
+ - server/instances/1/notifications/d12eff1ac812661c05d7090ce7394cf9/subscription.xml
79
82
  - server/instances/1/properties.xml
83
+ - server/instances/2/notifications/cfe340bd438e36fa2eebbbbdb6f3a312/consumer-secret
84
+ - server/instances/2/notifications/cfe340bd438e36fa2eebbbbdb6f3a312/producer-secret
85
+ - server/instances/2/notifications/cfe340bd438e36fa2eebbbbdb6f3a312/subscription.xml
80
86
  - server/instances/2/properties.xml
87
+ - server/server.pid
81
88
  - server/handlerwrappers/soap.rb
82
89
  - server/handlerwrappers/default.rb
83
90
  - lib/engine.xml