cpee 2.1.23 → 2.1.27
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 +2 -2
- data/cockpit/themes/compact/rngs/call.rng +1 -1
- data/cockpit/themes/compact/rngs/callmanipulate.rng +1 -1
- data/cockpit/themes/compact/theme.js +139 -119
- data/cockpit/themes/control/rngs/call.rng +1 -1
- data/cockpit/themes/control/rngs/callmanipulate.rng +1 -1
- data/cockpit/themes/control/theme.js +151 -131
- data/cockpit/themes/default/rngs/call.rng +1 -1
- data/cockpit/themes/default/rngs/callmanipulate.rng +1 -1
- data/cockpit/themes/default/theme.js +139 -119
- data/cockpit/themes/extended/rngs/call.rng +1 -1
- data/cockpit/themes/extended/rngs/callmanipulate.rng +1 -1
- data/cockpit/themes/extended/theme.js +139 -119
- data/cockpit/themes/model/theme.js +117 -97
- data/cockpit/themes/packed/rngs/call.rng +1 -1
- data/cockpit/themes/packed/rngs/callmanipulate.rng +1 -1
- data/cockpit/themes/packed/theme.js +139 -119
- data/cockpit/themes/preset/rngs/call.rng +1 -1
- data/cockpit/themes/preset/rngs/callmanipulate.rng +1 -1
- data/cockpit/themes/preset/theme.js +139 -119
- data/cpee.gemspec +2 -1
- data/server/executionhandlers/ruby/connection.rb +3 -5
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +38 -18
- data/server/executionhandlers/ruby/test.xml +43 -0
- data/tools/cpee +14 -6
- metadata +17 -2
@@ -8,6 +8,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
8
8
|
this.compact = false;
|
9
9
|
this.striped = false;
|
10
10
|
this.endpoints = {};
|
11
|
+
this.presstimer;
|
11
12
|
|
12
13
|
//{{{ transform the details data to description parts based on rng
|
13
14
|
this.source = function(base,opts) {
|
@@ -137,93 +138,104 @@ function WFAdaptorManifestation(adaptor) {
|
|
137
138
|
}
|
138
139
|
} //}}}
|
139
140
|
|
140
|
-
//
|
141
|
-
|
142
|
-
if(e.button == 0) { // left-click
|
143
|
-
} else if(e.button == 1) { // middle-click
|
144
|
-
} else if(e.button == 2) { // right-click
|
145
|
-
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
141
|
+
function contextMenuHandling(svgid,e,child,sibling) { //{{{
|
142
|
+
if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
|
146
143
|
|
147
|
-
|
148
|
-
|
149
|
-
|
144
|
+
var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
|
145
|
+
var group = null;
|
146
|
+
var menu = {};
|
150
147
|
|
151
|
-
|
152
|
-
|
148
|
+
if (child) {
|
149
|
+
group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node,'into');
|
150
|
+
if(group.length > 0) {
|
151
|
+
menu['Insert into'] = group;
|
152
|
+
copyOrMove(menu['Insert into'],group,xml_node,self.adaptor.description.insert_first_into);
|
153
|
+
}
|
154
|
+
if (self.elements[xml_node.get(0).tagName].permissible_children_expert) {
|
155
|
+
group = self.elements[xml_node.get(0).tagName].permissible_children_expert(xml_node,'into');
|
153
156
|
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
|
-
}
|
157
|
+
menu['Insert into (Experts Only!)'] = group;
|
158
|
+
copyOrMove(menu['Insert into (Experts Only!)'],group,xml_node,self.adaptor.description.insert_first_into);
|
163
159
|
}
|
164
160
|
}
|
165
|
-
|
166
|
-
|
161
|
+
}
|
162
|
+
if (sibling) {
|
163
|
+
group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node,'after');
|
164
|
+
if(group.length > 0) {
|
165
|
+
menu['Insert after'] = group;
|
166
|
+
copyOrMove(menu['Insert after'],group,xml_node,self.adaptor.description.insert_after);
|
167
|
+
}
|
168
|
+
if (self.elements[xml_node.parent().get(0).tagName].permissible_children_expert) {
|
169
|
+
group = self.elements[xml_node.parent().get(0).tagName].permissible_children_expert(xml_node,'after');
|
167
170
|
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
|
-
}
|
171
|
+
menu['Insert after (Experts Only!)'] = group;
|
172
|
+
copyOrMove(menu['Insert after (Experts Only!)'],group,xml_node,self.adaptor.description.insert_after);
|
177
173
|
}
|
178
174
|
}
|
175
|
+
}
|
179
176
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
}
|
177
|
+
if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
|
178
|
+
var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
|
179
|
+
icon.children('.rfill').addClass('menu');
|
180
|
+
menu['Delete'] = [{
|
181
|
+
'label': 'Remove Element',
|
182
|
+
'function_call': function(selector,target,selected){ self.adaptor.description.remove(selector,target); self.adaptor.illustrator.get_label_by_svg_id(selected).addClass('selected'); },
|
183
|
+
'menu_icon': icon,
|
184
|
+
'type': undefined,
|
185
|
+
'params': [null, xml_node, self.selected()]
|
186
|
+
}];
|
187
|
+
}
|
188
|
+
if($('> code', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
|
189
|
+
var icon = self.elements.callmanipulate.illustrator.svg.clone();
|
190
|
+
icon.children('.rfill:last').addClass('menu');
|
191
|
+
menu['Delete'].push({
|
192
|
+
'label': 'Remove Scripts',
|
193
|
+
'function_call': self.adaptor.description.remove,
|
194
|
+
'menu_icon': icon,
|
195
|
+
'type': undefined,
|
196
|
+
'params': ['> code', xml_node]
|
197
|
+
});
|
198
|
+
}
|
199
|
+
if (xml_node.get(0).tagName == "call" || xml_node.get(0).tagName == "manipulate" || xml_node.get(0).tagName == "stop") {
|
200
|
+
var icon = self.elements.call.illustrator.svg.clone();
|
201
|
+
icon.children('g.replace').addClass('active');
|
202
|
+
var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
|
203
|
+
if (vtarget.length > 0) {
|
204
|
+
if (vtarget.parents('g.activities.passive, g.activities.active').length > 0) {
|
205
|
+
menu['Position'] = [{
|
206
|
+
'label': 'No Execution from here',
|
207
|
+
'function_call': del_ui_pos,
|
208
|
+
'menu_icon': icon,
|
209
|
+
'type': undefined,
|
210
|
+
'params': xml_node
|
211
|
+
}];
|
212
|
+
} else {
|
213
|
+
menu['Position'] = [{
|
214
|
+
'label': 'Execute from here',
|
215
|
+
'function_call': add_ui_pos,
|
216
|
+
'menu_icon': icon,
|
217
|
+
'type': undefined,
|
218
|
+
'params': xml_node
|
219
|
+
}];
|
224
220
|
}
|
225
221
|
}
|
226
|
-
|
222
|
+
}
|
223
|
+
new CustomMenu(e).contextmenu(menu);
|
224
|
+
} //}}}
|
225
|
+
|
226
|
+
// Events
|
227
|
+
this.events.touchend = function(svgid, e) { // {{{
|
228
|
+
clearTimeout(self.presstimer);
|
229
|
+
} // }}}
|
230
|
+
this.events.touchstart = function(svgid, e, child, sibling) { // {{{
|
231
|
+
self.presstimer = window.setTimeout(function() { contextMenuHandling(svgid,e,child,sibling); },1000);
|
232
|
+
return false;
|
233
|
+
} // }}}
|
234
|
+
this.events.mousedown = function(svgid, e, child, sibling) { // {{{
|
235
|
+
if(e.button == 0) { // left-click
|
236
|
+
} else if(e.button == 1) { // middle-click
|
237
|
+
} else if(e.button == 2) { // right-click
|
238
|
+
contextMenuHandling(svgid,e,child,sibling);
|
227
239
|
}
|
228
240
|
return false;
|
229
241
|
} // }}}
|
@@ -321,6 +333,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
321
333
|
}, //}}}
|
322
334
|
'adaptor': {//{{{
|
323
335
|
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
336
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
337
|
+
'touchend': self.events.touchend,
|
324
338
|
'click': self.events.click,
|
325
339
|
'dragstart': self.events.dragstart,
|
326
340
|
'mouseover': self.events.mouseover,
|
@@ -347,6 +361,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
347
361
|
}, //}}}
|
348
362
|
'adaptor': {//{{{
|
349
363
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
364
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,false,true); },
|
365
|
+
'touchend': self.events.touchend,
|
350
366
|
'click': self.events.click,
|
351
367
|
'mouseover': self.events.mouseover,
|
352
368
|
'mouseout': self.events.mouseout
|
@@ -364,6 +380,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
364
380
|
}, //}}}
|
365
381
|
'adaptor': {//{{{
|
366
382
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
383
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,false,true); },
|
384
|
+
'touchend': self.events.touchend,
|
367
385
|
'click': self.events.click,
|
368
386
|
'mouseover': self.events.mouseover,
|
369
387
|
'mouseout': self.events.mouseout
|
@@ -381,6 +399,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
381
399
|
}, //}}}
|
382
400
|
'adaptor': {//{{{
|
383
401
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
402
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,false,true); },
|
403
|
+
'touchend': self.events.touchend,
|
384
404
|
'click': self.events.click,
|
385
405
|
'mouseover': self.events.mouseover,
|
386
406
|
'mouseout': self.events.mouseout
|
@@ -399,6 +419,8 @@ function WFAdaptorManifestation(adaptor) {
|
|
399
419
|
}, //}}}
|
400
420
|
'adaptor': {//{{{
|
401
421
|
'mousedown': function (node,e) { self.events.mousedown(node,e,false,false); },
|
422
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,false,false); },
|
423
|
+
'touchend': self.events.touchend,
|
402
424
|
'mouseover': self.events.mouseover,
|
403
425
|
'mouseout': self.events.mouseout
|
404
426
|
}//}}}
|
@@ -410,9 +432,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
410
432
|
'svg': self.adaptor.theme_dir + 'symbols/end.svg'
|
411
433
|
}, //}}}
|
412
434
|
'adaptor': {//{{{
|
413
|
-
'mousedown': function (node,e) {
|
414
|
-
self.events.suppress();
|
415
|
-
}
|
435
|
+
'mousedown': function (node,e) { self.events.suppress(); }
|
416
436
|
}//}}}
|
417
437
|
}; /*}}}*/
|
418
438
|
this.elements.event_end = { /*{{{*/
|
@@ -422,9 +442,7 @@ function WFAdaptorManifestation(adaptor) {
|
|
422
442
|
'svg': self.adaptor.theme_dir + 'symbols/event_end.svg'
|
423
443
|
}, //}}}
|
424
444
|
'adaptor': {//{{{
|
425
|
-
'mousedown': function (node,e) {
|
426
|
-
self.events.suppress();
|
427
|
-
},
|
445
|
+
'mousedown': function (node,e) { self.events.suppress(); },
|
428
446
|
'click': self.events.click,
|
429
447
|
'dblclick': self.events.dblclick,
|
430
448
|
'mouseover': self.events.mouseover,
|
@@ -445,9 +463,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
445
463
|
},
|
446
464
|
}, //}}}
|
447
465
|
'adaptor': {//{{{
|
448
|
-
'mousedown': function (node,e) {
|
449
|
-
|
450
|
-
|
466
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
467
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
468
|
+
'touchend': self.events.touchend,
|
451
469
|
'click': self.events.click,
|
452
470
|
'dblclick': self.events.dblclick,
|
453
471
|
'mouseover': self.events.mouseover,
|
@@ -466,9 +484,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
466
484
|
'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg',
|
467
485
|
}, //}}}
|
468
486
|
'adaptor': {//{{{
|
469
|
-
'mousedown': function (node,e) {
|
470
|
-
|
471
|
-
|
487
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
488
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
489
|
+
'touchend': self.events.touchend,
|
472
490
|
'click': self.events.click,
|
473
491
|
'dblclick': self.events.dblclick,
|
474
492
|
'mouseover': self.events.mouseover,
|
@@ -481,7 +499,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
481
499
|
'endnodes': 'this',
|
482
500
|
'svg': self.adaptor.theme_dir + 'symbols/parallel.svg',
|
483
501
|
'resolve_symbol': function(node) {
|
484
|
-
if($(node).
|
502
|
+
if($(node).children(':not(parallel_branch)').length > 0) {
|
503
|
+
return 'parallel_complex';
|
504
|
+
} else if($(node).attr('cancel') == 'last' && $(node).attr('wait') == '-1') {
|
485
505
|
return 'parallel_simple';
|
486
506
|
} else if($(node).attr('cancel') == 'first' && $(node).attr('wait') == '-1') {
|
487
507
|
return 'parallel_event_all';
|
@@ -493,9 +513,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
493
513
|
},
|
494
514
|
}, //}}}
|
495
515
|
'adaptor': {//{{{
|
496
|
-
'mousedown': function (node,e) {
|
497
|
-
|
498
|
-
|
516
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
517
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
518
|
+
'touchend': self.events.touchend,
|
499
519
|
'click': self.events.click,
|
500
520
|
'dblclick': self.events.dblclick,
|
501
521
|
'mouseover': self.events.mouseover,
|
@@ -558,9 +578,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
558
578
|
return childs;
|
559
579
|
}, //}}}
|
560
580
|
'adaptor': {//{{{
|
561
|
-
'mousedown': function (node,e) {
|
562
|
-
|
563
|
-
|
581
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
582
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
583
|
+
'touchend': self.events.touchend,
|
564
584
|
'click': self.events.click,
|
565
585
|
'dblclick': self.events.dblclick,
|
566
586
|
'mouseover': self.events.mouseover,
|
@@ -642,9 +662,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
642
662
|
return childs;
|
643
663
|
}, //}}}
|
644
664
|
'adaptor': {//{{{
|
645
|
-
'mousedown': function (node,e) {
|
646
|
-
|
647
|
-
|
665
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,false); },
|
666
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,false); },
|
667
|
+
'touchend': self.events.touchend,
|
648
668
|
'click': self.events.click,
|
649
669
|
'dblclick': self.events.dblclick,
|
650
670
|
'mouseover': self.events.mouseover,
|
@@ -734,9 +754,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
734
754
|
return childs;
|
735
755
|
}, //}}}
|
736
756
|
'adaptor': {//{{{
|
737
|
-
'mousedown': function (node,e) {
|
738
|
-
|
739
|
-
|
757
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
758
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
759
|
+
'touchend': self.events.touchend,
|
740
760
|
'click': self.events.click,
|
741
761
|
'dblclick': self.events.dblclick,
|
742
762
|
'mouseover': self.events.mouseover,
|
@@ -830,9 +850,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
830
850
|
return childs;
|
831
851
|
}, //}}}
|
832
852
|
'adaptor': {//{{{
|
833
|
-
'mousedown': function (node,e) {
|
834
|
-
|
835
|
-
|
853
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
854
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
855
|
+
'touchend': self.events.touchend,
|
836
856
|
'click': self.events.click,
|
837
857
|
'dblclick': self.events.dblclick,
|
838
858
|
'mouseover': self.events.mouseover,
|
@@ -923,9 +943,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
923
943
|
return childs;
|
924
944
|
}, //}}}
|
925
945
|
'adaptor': {//{{{
|
926
|
-
'mousedown': function (node,e) {
|
927
|
-
|
928
|
-
|
946
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
947
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
948
|
+
'touchend': self.events.touchend,
|
929
949
|
'click': self.events.click,
|
930
950
|
'dblclick': self.events.dblclick,
|
931
951
|
'mouseover': self.events.mouseover,
|
@@ -1017,9 +1037,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
1017
1037
|
return childs;
|
1018
1038
|
}, //}}}
|
1019
1039
|
'adaptor': {//{{{
|
1020
|
-
'mousedown': function (node,e) {
|
1021
|
-
|
1022
|
-
|
1040
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
1041
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
1042
|
+
'touchend': self.events.touchend,
|
1023
1043
|
'click': self.events.click,
|
1024
1044
|
'dblclick': self.events.dblclick,
|
1025
1045
|
'mouseover': self.events.mouseover,
|
@@ -1099,9 +1119,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
1099
1119
|
return childs;
|
1100
1120
|
}, //}}}
|
1101
1121
|
'adaptor': {//{{{
|
1102
|
-
'mousedown': function (node,e) {
|
1103
|
-
|
1104
|
-
|
1122
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
1123
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
1124
|
+
'touchend': self.events.touchend,
|
1105
1125
|
'click': self.events.click,
|
1106
1126
|
'dblclick': self.events.dblclick,
|
1107
1127
|
'mouseover': self.events.mouseover,
|
@@ -1131,9 +1151,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
1131
1151
|
];
|
1132
1152
|
}, //}}}
|
1133
1153
|
'adaptor': {//{{{
|
1134
|
-
'mousedown': function (node,e) {
|
1135
|
-
|
1136
|
-
|
1154
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
|
1155
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,true); },
|
1156
|
+
'touchend': self.events.touchend,
|
1137
1157
|
'click': self.events.click,
|
1138
1158
|
'dblclick': self.events.dblclick,
|
1139
1159
|
'mouseover': self.events.mouseover,
|
@@ -1209,9 +1229,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
1209
1229
|
return childs;
|
1210
1230
|
}, //}}}
|
1211
1231
|
'adaptor': {//{{{
|
1212
|
-
'mousedown': function (node,e) {
|
1213
|
-
|
1214
|
-
|
1232
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,true,false); },
|
1233
|
+
'touchstart': function (node,e) { self.events.touchstart(node,e,true,false); },
|
1234
|
+
'touchend': self.events.touchend,
|
1215
1235
|
'click': self.events.click,
|
1216
1236
|
'dblclick': self.events.dblclick,
|
1217
1237
|
'mouseover': self.events.mouseover,
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.1.
|
3
|
+
s.version = "2.1.27"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3.0"
|
6
6
|
s.summary = "Preliminary release of cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
|
@@ -28,4 +28,5 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_runtime_dependency 'redis', '~> 4.1'
|
29
29
|
s.add_runtime_dependency 'rubyzip', '~>2'
|
30
30
|
s.add_runtime_dependency 'charlock_holmes', '~>0'
|
31
|
+
s.add_runtime_dependency 'mimemagic', '~>0'
|
31
32
|
end
|
@@ -149,10 +149,8 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
149
149
|
def activity_handle(passthrough, parameters) # {{{
|
150
150
|
raise "Wrong endpoint" if @handler_endpoint.nil? || @handler_endpoint.empty?
|
151
151
|
@label = parameters[:label]
|
152
|
-
@
|
153
|
-
@
|
154
|
-
@costs = parameters.dig(:stream,:costs)
|
155
|
-
@controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
|
152
|
+
@anno = parameters[:annotations]
|
153
|
+
@controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :annotations => anno)
|
156
154
|
if passthrough.to_s.empty?
|
157
155
|
proto_curl parameters
|
158
156
|
else
|
@@ -303,7 +301,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
303
301
|
end
|
304
302
|
|
305
303
|
def callback(result=nil,options={})
|
306
|
-
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :
|
304
|
+
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :annotations => @anno)
|
307
305
|
@guard_files += result
|
308
306
|
@handler_returnValue = simplify_result(result)
|
309
307
|
@handler_returnOptions = options
|
@@ -403,6 +403,8 @@
|
|
403
403
|
<xsl:template match="d:parameters">
|
404
404
|
<xsl:apply-templates select="d:label" mode="parameter"/>
|
405
405
|
<xsl:apply-templates select="d:*[not(name()='label')]" mode="parameter"/>
|
406
|
+
<xsl:if test="count(*) > 0">, </xsl:if>
|
407
|
+
<xsl:apply-templates select="../d:annotations" mode="annotations"/>
|
406
408
|
</xsl:template>
|
407
409
|
<xsl:template match="d:label" mode="parameter">
|
408
410
|
<xsl:text>:</xsl:text>
|
@@ -411,6 +413,14 @@
|
|
411
413
|
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
412
414
|
<xsl:text>"</xsl:text>
|
413
415
|
</xsl:template>
|
416
|
+
<xsl:template match="d:annotations" mode="annotations">
|
417
|
+
<xsl:text>:</xsl:text>
|
418
|
+
<xsl:value-of select="name()"/>
|
419
|
+
<xsl:text> => </xsl:text>
|
420
|
+
<xsl:text>{ </xsl:text>
|
421
|
+
<xsl:apply-templates select="d:*" mode="simplemulti"/>
|
422
|
+
<xsl:text> }</xsl:text>
|
423
|
+
</xsl:template>
|
414
424
|
<xsl:template match="d:*[not(name()='label')]" mode="parameter">
|
415
425
|
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
416
426
|
<xsl:text>:</xsl:text>
|
@@ -423,24 +433,6 @@
|
|
423
433
|
<xsl:apply-templates select="d:*" mode="sub"/>
|
424
434
|
<xsl:text>]</xsl:text>
|
425
435
|
</xsl:when>
|
426
|
-
<xsl:when test="count(*) > 0 and name()='sensors'">
|
427
|
-
<xsl:text>[</xsl:text>
|
428
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
429
|
-
<xsl:text>]</xsl:text>
|
430
|
-
</xsl:when>
|
431
|
-
<xsl:when test="count(*) > 0 and name()='aggregators'">
|
432
|
-
<xsl:text>[</xsl:text>
|
433
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
434
|
-
<xsl:text>]</xsl:text>
|
435
|
-
</xsl:when>
|
436
|
-
<xsl:when test="count(*) > 0 and name()='costs'">
|
437
|
-
<xsl:text>[</xsl:text>
|
438
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
439
|
-
<xsl:text>]</xsl:text>
|
440
|
-
</xsl:when>
|
441
|
-
<xsl:when test="count(*) > 0 and name()='report'">
|
442
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
443
|
-
</xsl:when>
|
444
436
|
<xsl:when test="count(*) > 0 and not(name()='arguments')">
|
445
437
|
<xsl:text>{</xsl:text>
|
446
438
|
<xsl:apply-templates select="d:*" mode="parameter"/>
|
@@ -517,6 +509,34 @@
|
|
517
509
|
</xsl:choose>
|
518
510
|
<xsl:text> }</xsl:text>
|
519
511
|
</xsl:template>
|
512
|
+
<xsl:template match="d:*" mode="simplemulti">
|
513
|
+
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
514
|
+
<xsl:text>:</xsl:text>
|
515
|
+
<xsl:value-of select="name()"/>
|
516
|
+
<xsl:text> => </xsl:text>
|
517
|
+
<xsl:choose>
|
518
|
+
<xsl:when test="count(*) > 0">
|
519
|
+
<xsl:text>{</xsl:text>
|
520
|
+
<xsl:apply-templates select="d:*" mode="plain"/>
|
521
|
+
<xsl:text>}</xsl:text>
|
522
|
+
</xsl:when>
|
523
|
+
<xsl:when test="not(node())">
|
524
|
+
<xsl:text>nil</xsl:text>
|
525
|
+
</xsl:when>
|
526
|
+
<xsl:otherwise>
|
527
|
+
<xsl:choose>
|
528
|
+
<xsl:when test="substring(text(),1,1) = '!'">
|
529
|
+
<xsl:value-of select="substring(text(),2)"/>
|
530
|
+
</xsl:when>
|
531
|
+
<xsl:otherwise>
|
532
|
+
<xsl:text>"</xsl:text>
|
533
|
+
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
534
|
+
<xsl:text>"</xsl:text>
|
535
|
+
</xsl:otherwise>
|
536
|
+
</xsl:choose>
|
537
|
+
</xsl:otherwise>
|
538
|
+
</xsl:choose>
|
539
|
+
</xsl:template>
|
520
540
|
<xsl:template name="format-name">
|
521
541
|
<xsl:param name="tname"/>
|
522
542
|
<xsl:choose>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
3
|
+
<call id="a1" endpoint="">
|
4
|
+
<parameters>
|
5
|
+
<label>asdad</label>
|
6
|
+
<method>:post</method>
|
7
|
+
<arguments/>
|
8
|
+
</parameters>
|
9
|
+
<code>
|
10
|
+
<prepare/>
|
11
|
+
<finalize output="result"/>
|
12
|
+
<update output="result"/>
|
13
|
+
<rescue output="result"/>
|
14
|
+
</code>
|
15
|
+
<annotations>
|
16
|
+
<_timing>
|
17
|
+
<_timing_weight/>
|
18
|
+
<_timing_avg/>
|
19
|
+
<explanations/>
|
20
|
+
</_timing>
|
21
|
+
<_context_data_analysis>
|
22
|
+
<probes/>
|
23
|
+
<ips/>
|
24
|
+
</_context_data_analysis>
|
25
|
+
<report>
|
26
|
+
<url>http://hoellerersdsdf</url>
|
27
|
+
</report>
|
28
|
+
<_notes>
|
29
|
+
<_notes_general/>
|
30
|
+
</_notes>
|
31
|
+
</annotations>
|
32
|
+
<documentation>
|
33
|
+
<input/>
|
34
|
+
<output/>
|
35
|
+
<implementation>
|
36
|
+
<description/>
|
37
|
+
</implementation>
|
38
|
+
<code>
|
39
|
+
<description/>
|
40
|
+
</code>
|
41
|
+
</documentation>
|
42
|
+
</call>
|
43
|
+
</description>
|
data/tools/cpee
CHANGED
@@ -119,14 +119,22 @@ elsif command == 'convert'
|
|
119
119
|
doc.find('//d:parallel_branch/@pass').delete_all!
|
120
120
|
doc.find('//d:parallel_branch/@local').delete_all!
|
121
121
|
doc.find('//d:call').each do |c|
|
122
|
-
c.find('d:annotations').
|
123
|
-
|
122
|
+
if c.find('d:annotations').empty?
|
123
|
+
c.add('d:annotations')
|
124
|
+
end
|
125
|
+
c.find('d:annotations').first.add c.find('d:parameters/d:_context_data_analysis') rescue nil
|
126
|
+
c.find('d:annotations').first.add c.find('d:parameters/d:report') rescue nil
|
127
|
+
c.find('d:annotations').first.add c.find('d:_timing') rescue nil
|
128
|
+
c.find('d:annotations').first.add c.find('d:_notes') rescue nil
|
129
|
+
c.find('d:parameters/d:sensors').delete_all! rescue nil
|
130
|
+
c.find('d:parameters/d:stream').delete_all! rescue nil
|
131
|
+
c.find('d:annotations').first.add c.find('d:parameters/d:report') rescue nil
|
124
132
|
if c.find('d:documentation').empty?
|
125
133
|
node = c.add('d:documentation')
|
126
|
-
node.add c.find('d:input')
|
127
|
-
node.add c.find('d:output')
|
128
|
-
node.add c.find('d:implementation')
|
129
|
-
node.add c.find('d:code[d:description]')
|
134
|
+
node.add c.find('d:input') rescue nil
|
135
|
+
node.add c.find('d:output') rescue nil
|
136
|
+
node.add c.find('d:implementation') rescue nil
|
137
|
+
node.add c.find('d:code[d:description]') rescue nil
|
130
138
|
end
|
131
139
|
end
|
132
140
|
doc.find('//x:handlerwrapper').delete_all!
|
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: 2.1.
|
4
|
+
version: 2.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: tools
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-11-
|
13
|
+
date: 2021-11-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -116,6 +116,20 @@ dependencies:
|
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: mimemagic
|
121
|
+
requirement: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
type: :runtime
|
127
|
+
prerelease: false
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
119
133
|
description: see http://cpee.org
|
120
134
|
email: juergen.mangler@gmail.com
|
121
135
|
executables:
|
@@ -638,6 +652,7 @@ files:
|
|
638
652
|
- server/executionhandlers/ruby/controller.rb
|
639
653
|
- server/executionhandlers/ruby/dsl_to_dslx.xsl
|
640
654
|
- server/executionhandlers/ruby/execution.rb
|
655
|
+
- server/executionhandlers/ruby/test.xml
|
641
656
|
- server/resources/empty_dslx.xml
|
642
657
|
- server/resources/notifications/logging/subscription.xml
|
643
658
|
- server/resources/properties.empty
|