cpee 1.4.8 → 1.4.10
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 +5 -5
- data/cockpit/config.json +6 -0
- data/cockpit/css/ui.css +7 -7
- data/cockpit/index.html +4 -4
- data/cockpit/js/instance.js +6 -3
- data/cockpit/themes/compact/theme.js +107 -6
- data/cockpit/themes/default/rngs/call.rng +29 -0
- data/cockpit/themes/default/rngs/callmanipulate.rng +29 -0
- data/cpee.gemspec +1 -1
- data/lib/cpee/controller.rb +1 -1
- data/lib/cpee/instantiation.rb +44 -21
- data/lib/engine/instances.rng +5 -2
- data/lib/instantiation.xml +5 -1
- data/log/elasticsearch.rb +1 -106
- data/log/elasticsearch_logging.rb +237 -0
- data/log/legacy/test_es.rb +26 -0
- data/log/legacy/test_split.rb +211 -0
- data/log/trace.yaml +17717 -0
- data/log/trace_sic.yaml +18343 -0
- data/server/handlerwrappers/default.rb +28 -23
- data/server/instances/1/properties.xml +158 -31
- data/server/instances/2/properties.xml +137 -12
- data/server/instances/3/properties.xml +116 -80
- data/server/resources/base.xml +78 -0
- data/server/resources/test.rb +19 -0
- data/server/resources/test.xml +33 -0
- data/server/resources/topics.xml +6 -3
- data/server/resources/transformation_dslx.xsl +5 -0
- data/server/server.pid +1 -0
- metadata +13 -71
- data/log/logs/1/test +0 -1
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/consumer-secret +0 -1
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/producer-secret +0 -1
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/subscription.xml +0 -23
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/consumer-secret +0 -1
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/producer-secret +0 -1
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/subscription.xml +0 -6
- data/server/instances/10/properties.xml +0 -187
- data/server/instances/11/properties.xml +0 -191
- data/server/instances/12/properties.xml +0 -191
- data/server/instances/13/properties.xml +0 -204
- data/server/instances/14/properties.xml +0 -31
- data/server/instances/15/properties.xml +0 -30
- data/server/instances/16/properties.xml +0 -29
- data/server/instances/17/properties.xml +0 -29
- data/server/instances/18/properties.xml +0 -31
- data/server/instances/19/properties.xml +0 -31
- data/server/instances/20/properties.xml +0 -191
- data/server/instances/21/properties.xml +0 -156
- data/server/instances/22/properties.xml +0 -118
- data/server/instances/23/properties.xml +0 -118
- data/server/instances/24/properties.xml +0 -156
- data/server/instances/25/properties.xml +0 -156
- data/server/instances/26/properties.xml +0 -156
- data/server/instances/27/properties.xml +0 -140
- data/server/instances/28/properties.xml +0 -156
- data/server/instances/29/properties.xml +0 -156
- data/server/instances/30/properties.xml +0 -354
- data/server/instances/31/properties.xml +0 -354
- data/server/instances/313/notifications/crisp/consumer-secret +0 -1
- data/server/instances/313/notifications/crisp/producer-secret +0 -1
- data/server/instances/313/notifications/crisp/subscription.xml +0 -7
- data/server/instances/313/notifications/logging/consumer-secret +0 -1
- data/server/instances/313/notifications/logging/producer-secret +0 -1
- data/server/instances/313/notifications/logging/subscription.xml +0 -7
- data/server/instances/313/notifications/logging_yaml/consumer-secret +0 -1
- data/server/instances/313/notifications/logging_yaml/producer-secret +0 -1
- data/server/instances/313/notifications/logging_yaml/subscription.xml +0 -7
- data/server/instances/313/properties.xml +0 -524
- data/server/instances/32/properties.xml +0 -628
- data/server/instances/33/properties.xml +0 -156
- data/server/instances/4/properties.xml +0 -114
- data/server/instances/5/properties.xml +0 -114
- data/server/instances/6/properties.xml +0 -206
- data/server/instances/662/notifications/crisp/consumer-secret +0 -1
- data/server/instances/662/notifications/crisp/producer-secret +0 -1
- data/server/instances/662/notifications/crisp/subscription.xml +0 -7
- data/server/instances/662/notifications/logging/consumer-secret +0 -1
- data/server/instances/662/notifications/logging/producer-secret +0 -1
- data/server/instances/662/notifications/logging/subscription.xml +0 -7
- data/server/instances/662/notifications/logging_yaml/consumer-secret +0 -1
- data/server/instances/662/notifications/logging_yaml/producer-secret +0 -1
- data/server/instances/662/notifications/logging_yaml/subscription.xml +0 -7
- data/server/instances/662/properties.xml +0 -427
- data/server/instances/663/properties.xml +0 -31
- data/server/instances/664/properties.xml +0 -425
- data/server/instances/665/properties.xml +0 -425
- data/server/instances/666/properties.xml +0 -427
- data/server/instances/667/properties.xml +0 -427
- data/server/instances/668/properties.xml +0 -425
- data/server/instances/669/properties.xml +0 -425
- data/server/instances/670/properties.xml +0 -31
- data/server/instances/671/properties.xml +0 -158
- data/server/instances/672/properties.xml +0 -199
- data/server/instances/673/properties.xml +0 -52
- data/server/instances/7/properties.xml +0 -156
- data/server/instances/8/properties.xml +0 -118
- data/server/instances/9/properties.xml +0 -120
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9bcb32efae8a0010345e6075833164b82be63e32fc74fe492e30794c39f1e0bb
|
|
4
|
+
data.tar.gz: 6374a34d2c0366549f152dcf5eadb896a2357c70f1d6c23b66985cda12c062f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7dd02049b645e866bfb8947a9fadf5d1718aa154d846cf0d36875b5d9bae38e39c31f8dbb8aa9c66f20422404e95047b97e7e55ffcacdd4a78ed7cf62620c78a
|
|
7
|
+
data.tar.gz: 61cc7b86287410f500f546cf777c65c9895b48de648cba65de6670135549d5a831f28028f4ed084137dee055148eadc69a30960af9eebe2b4280f5b26936efa7
|
data/cockpit/config.json
ADDED
data/cockpit/css/ui.css
CHANGED
|
@@ -65,15 +65,15 @@ ui-tabbed ui-tabbar ui-behind button {
|
|
|
65
65
|
#areainstance div.section:nth-child(3) button[name=loadmodeltype] { white-space: normal; width: 10em; height: 2em; }
|
|
66
66
|
|
|
67
67
|
#areaexecution input { padding: 0; margin:0; }
|
|
68
|
-
#areaexecution table.compact { width: 100%; }
|
|
69
|
-
#areaexecution table.compact tr td:nth-child(1) { width: 15ex; }
|
|
68
|
+
#areaexecution table.x-ui-compact { width: 100%; }
|
|
69
|
+
#areaexecution table.x-ui-compact tr td:nth-child(1) { width: 15ex; }
|
|
70
70
|
|
|
71
|
-
#areaexecution table.compact tbody.debug tr:last-child td { padding-bottom: 0.5em; }
|
|
72
|
-
#areaexecution table.compact tbody.debug tr:last-child td input { vertical-align: middle; }
|
|
73
|
-
#areaexecution table.compact tbody.exe tr:first-child td { padding-top: 0.5em; }
|
|
74
|
-
#areaexecution table.compact tbody.exe { border-top: 1px solid #a1a1a1; }
|
|
71
|
+
#areaexecution table.x-ui-compact tbody.debug tr:last-child td { padding-bottom: 0.5em; }
|
|
72
|
+
#areaexecution table.x-ui-compact tbody.debug tr:last-child td input { vertical-align: middle; }
|
|
73
|
+
#areaexecution table.x-ui-compact tbody.exe tr:first-child td { padding-top: 0.5em; }
|
|
74
|
+
#areaexecution table.x-ui-compact tbody.exe { border-top: 1px solid #a1a1a1; }
|
|
75
75
|
|
|
76
|
-
#areaexecution table.compact tbody.exe td { height: 2.2em; }
|
|
76
|
+
#areaexecution table.x-ui-compact tbody.exe td { height: 2.2em; }
|
|
77
77
|
|
|
78
78
|
#dat_endpoints {
|
|
79
79
|
border-collapse:collapse;
|
data/cockpit/index.html
CHANGED
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
</ui-tabbar>
|
|
126
126
|
<ui-content>
|
|
127
127
|
<ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
|
|
128
|
-
<table class='layout'>
|
|
128
|
+
<table class='x-ui-layout'>
|
|
129
129
|
<tr>
|
|
130
130
|
<td>Repository:</td>
|
|
131
131
|
<td><input name="repo-url" type="text" value=""/></td>
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
</div>
|
|
171
171
|
</ui-area> <!--}}}-->
|
|
172
172
|
<ui-area data-belongs-to-tab="execution" id="areaexecution" class='inactive'> <!--{{{-->
|
|
173
|
-
<table class='compact'>
|
|
173
|
+
<table class='x-ui-compact'>
|
|
174
174
|
<tbody class='debug'>
|
|
175
175
|
<tr>
|
|
176
176
|
<td>Debugging:</td>
|
|
@@ -229,11 +229,11 @@
|
|
|
229
229
|
</ui-area>
|
|
230
230
|
<ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
|
|
231
231
|
<ui-area data-belongs-to-tab="details" id="detailcolumn">
|
|
232
|
-
<div id="dat_details" class='layout'></div>
|
|
232
|
+
<div id="dat_details" class='x-ui-layout'></div>
|
|
233
233
|
</ui-area>
|
|
234
234
|
<ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
|
|
235
235
|
<ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
|
|
236
|
-
<table id="dat_log" class="layout"></table>
|
|
236
|
+
<table id="dat_log" class="x-ui-layout"></table>
|
|
237
237
|
</ui-area> <!--}}}-->
|
|
238
238
|
</ui-content>
|
|
239
239
|
</ui-rest>
|
data/cockpit/js/instance.js
CHANGED
|
@@ -367,8 +367,10 @@ function adaptor_update() { //{{{
|
|
|
367
367
|
$('g.element[element-endpoint]').each(function(k,ele){
|
|
368
368
|
if (save['endpoints_cache'][$(ele).attr('element-endpoint')] && save['endpoints_cache'][$(ele).attr('element-endpoint')]) {
|
|
369
369
|
var c = $(ele).find('g.replace');
|
|
370
|
-
var symbol = save['endpoints_cache'][$(ele).attr('element-endpoint')].symbol
|
|
371
|
-
|
|
370
|
+
var symbol = save['endpoints_cache'][$(ele).attr('element-endpoint')].symbol;
|
|
371
|
+
if (symbol) {
|
|
372
|
+
c.replaceWith($(symbol.documentElement).clone());
|
|
373
|
+
}
|
|
372
374
|
}
|
|
373
375
|
});
|
|
374
376
|
} //}}}
|
|
@@ -739,7 +741,8 @@ function set_testset(testset,exec) {// {{{
|
|
|
739
741
|
data: ({value: res}),
|
|
740
742
|
error: report_failure,
|
|
741
743
|
success: function(res){
|
|
742
|
-
|
|
744
|
+
// use promises you filthy animal
|
|
745
|
+
if (exec) setTimeout(start_instance,2000);
|
|
743
746
|
}
|
|
744
747
|
});
|
|
745
748
|
}
|
|
@@ -23,13 +23,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
23
23
|
return($X(ntxt));
|
|
24
24
|
} else {
|
|
25
25
|
if (opts && opts == 'clone') {
|
|
26
|
+
base = base.clone();
|
|
26
27
|
if (base.attr('id')) {
|
|
27
|
-
base = base.clone();
|
|
28
|
-
// not very generic, because it is assumed that id is attribute of top level
|
|
29
|
-
// a better solution would be to parse rng for get_free_id()
|
|
30
|
-
// but: there is lots of lock-in to element-id, so fuck it
|
|
31
28
|
base.attr('id',self.adaptor.description.get_free_id());
|
|
32
29
|
}
|
|
30
|
+
base.find('*[id]').each(function(k,v){
|
|
31
|
+
$(v).attr('id',self.adaptor.description.get_free_id(base));
|
|
32
|
+
});
|
|
33
33
|
}
|
|
34
34
|
return base;
|
|
35
35
|
}
|
|
@@ -59,9 +59,9 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
59
59
|
var tab = $('#dat_details');
|
|
60
60
|
var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
|
|
61
61
|
tab.empty();
|
|
62
|
-
if (self.adaptor.description.elements[$(node).attr('svg-
|
|
62
|
+
if (self.adaptor.description.elements[$(node).attr('svg-subtype')]) {
|
|
63
63
|
save['details_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
|
|
64
|
-
var rng = self.adaptor.description.elements[$(node).attr('svg-
|
|
64
|
+
var rng = self.adaptor.description.elements[$(node).attr('svg-subtype')].clone();
|
|
65
65
|
if (save['endpoints_cache'][$(node).attr('endpoint')] && save['endpoints_cache'][$(node).attr('endpoint')].schema) {
|
|
66
66
|
var schema = save['endpoints_cache'][$(node).attr('endpoint')].schema.documentElement;
|
|
67
67
|
$(rng).find(' > element[name="parameters"] > element[name="arguments"]').replaceWith($(schema).clone());
|
|
@@ -275,6 +275,37 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
275
275
|
'click': self.events.click,
|
|
276
276
|
}//}}}
|
|
277
277
|
}; /*}}}*/
|
|
278
|
+
this.elements.stop = { /*{{{*/
|
|
279
|
+
'type': 'primitive',
|
|
280
|
+
'illustrator': {//{{{
|
|
281
|
+
'endnodes': 'this',
|
|
282
|
+
'svg': self.adaptor.theme_dir + 'symbols/stop.svg'
|
|
283
|
+
},//}}}
|
|
284
|
+
'description': self.adaptor.theme_dir + 'rngs/stop.rng',
|
|
285
|
+
'permissible_children': function(node,mode) { //{{{
|
|
286
|
+
return [];
|
|
287
|
+
}, //}}}
|
|
288
|
+
'adaptor': {//{{{
|
|
289
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
|
290
|
+
'click': self.events.click,
|
|
291
|
+
}//}}}
|
|
292
|
+
}; /*}}}*/
|
|
293
|
+
this.elements.terminate = { /*{{{*/
|
|
294
|
+
'type': 'primitive',
|
|
295
|
+
'illustrator': {//{{{
|
|
296
|
+
'endnodes': 'this',
|
|
297
|
+
'final': true,
|
|
298
|
+
'svg': self.adaptor.theme_dir + 'symbols/terminate.svg'
|
|
299
|
+
},//}}}
|
|
300
|
+
'description': self.adaptor.theme_dir + 'rngs/terminate.rng',
|
|
301
|
+
'permissible_children': function(node,mode) { //{{{
|
|
302
|
+
return [];
|
|
303
|
+
}, //}}}
|
|
304
|
+
'adaptor': {//{{{
|
|
305
|
+
'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
|
|
306
|
+
'click': self.events.click,
|
|
307
|
+
}//}}}
|
|
308
|
+
}; /*}}}*/
|
|
278
309
|
|
|
279
310
|
// Complex Elements
|
|
280
311
|
this.elements.choose = { /*{{{*/
|
|
@@ -390,6 +421,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
390
421
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
391
422
|
'type': 'loop',
|
|
392
423
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
424
|
+
{'label': 'Terminate',
|
|
425
|
+
'function_call': func,
|
|
426
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
427
|
+
'type': 'terminate',
|
|
428
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
429
|
+
{'label': 'Stop',
|
|
430
|
+
'function_call': func,
|
|
431
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
432
|
+
'type': 'stop',
|
|
433
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
393
434
|
{'label': 'Critical',
|
|
394
435
|
'function_call': func,
|
|
395
436
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -463,6 +504,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
463
504
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
464
505
|
'type': 'loop',
|
|
465
506
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
507
|
+
{'label': 'Terminate',
|
|
508
|
+
'function_call': func,
|
|
509
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
510
|
+
'type': 'terminate',
|
|
511
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
512
|
+
{'label': 'Stop',
|
|
513
|
+
'function_call': func,
|
|
514
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
515
|
+
'type': 'stop',
|
|
516
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
466
517
|
{'label': 'Critical',
|
|
467
518
|
'function_call': func,
|
|
468
519
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -525,6 +576,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
525
576
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
526
577
|
'type': 'loop',
|
|
527
578
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
579
|
+
{'label': 'Terminate',
|
|
580
|
+
'function_call': func,
|
|
581
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
582
|
+
'type': 'terminate',
|
|
583
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
584
|
+
{'label': 'Stop',
|
|
585
|
+
'function_call': func,
|
|
586
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
587
|
+
'type': 'stop',
|
|
588
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
528
589
|
{'label': 'Critical',
|
|
529
590
|
'function_call': func,
|
|
530
591
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -602,6 +663,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
602
663
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
603
664
|
'type': 'loop',
|
|
604
665
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
666
|
+
{'label': 'Terminate',
|
|
667
|
+
'function_call': self.adaptor.description.insert_last_into,
|
|
668
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
669
|
+
'type': 'terminate',
|
|
670
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
671
|
+
{'label': 'Stop',
|
|
672
|
+
'function_call': self.adaptor.description.insert_last_into,
|
|
673
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
674
|
+
'type': 'stop',
|
|
675
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
605
676
|
{'label': 'Critical',
|
|
606
677
|
'function_call': self.adaptor.description.insert_last_into,
|
|
607
678
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -683,6 +754,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
683
754
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
684
755
|
'type': 'loop',
|
|
685
756
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
757
|
+
{'label': 'Terminate',
|
|
758
|
+
'function_call': func,
|
|
759
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
760
|
+
'type': 'terminate',
|
|
761
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
762
|
+
{'label': 'Stop',
|
|
763
|
+
'function_call': func,
|
|
764
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
765
|
+
'type': 'stop',
|
|
766
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
686
767
|
{'label': 'Critical',
|
|
687
768
|
'function_call': func,
|
|
688
769
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -758,6 +839,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
758
839
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
759
840
|
'type': 'loop',
|
|
760
841
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
842
|
+
{'label': 'Terminate',
|
|
843
|
+
'function_call': func,
|
|
844
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
845
|
+
'type': 'terminate',
|
|
846
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
847
|
+
{'label': 'Stop',
|
|
848
|
+
'function_call': func,
|
|
849
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
850
|
+
'type': 'stop',
|
|
851
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
761
852
|
{'label': 'Critical',
|
|
762
853
|
'function_call': func,
|
|
763
854
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -856,6 +947,16 @@ function WFAdaptorManifestation(adaptor) {
|
|
|
856
947
|
'menu_icon': self.elements.loop.illustrator.svg.clone(),
|
|
857
948
|
'type': 'loop',
|
|
858
949
|
'params': [self.adaptor.description.elements.loop, node]},
|
|
950
|
+
{'label': 'Terminate',
|
|
951
|
+
'function_call': func,
|
|
952
|
+
'menu_icon': self.elements.terminate.illustrator.svg.clone(),
|
|
953
|
+
'type': 'terminate',
|
|
954
|
+
'params': [self.adaptor.description.elements.terminate, node]},
|
|
955
|
+
{'label': 'Stop',
|
|
956
|
+
'function_call': func,
|
|
957
|
+
'menu_icon': self.elements.stop.illustrator.svg.clone(),
|
|
958
|
+
'type': 'stop',
|
|
959
|
+
'params': [self.adaptor.description.elements.stop, node]},
|
|
859
960
|
{'label': 'Critical',
|
|
860
961
|
'function_call': func,
|
|
861
962
|
'menu_icon': self.elements.critical.illustrator.svg.clone(),
|
|
@@ -25,6 +25,35 @@
|
|
|
25
25
|
</element>
|
|
26
26
|
</zeroOrMore>
|
|
27
27
|
</element>
|
|
28
|
+
<element name="sensors" rngui:header="Sensors">
|
|
29
|
+
<zeroOrMore rngui:label="Add Sensor">
|
|
30
|
+
<element name="sensor">
|
|
31
|
+
<element name="name" rngui:label="Label">
|
|
32
|
+
<data type="string" rngui:label="Label"/>
|
|
33
|
+
</element>
|
|
34
|
+
<element name="extractor_url" rngui:label="Extractor Url">
|
|
35
|
+
<data type="string" rngui:label="Url"/>
|
|
36
|
+
</element>
|
|
37
|
+
<element name="extractor_arg" rngui:label="Extractor Argument">
|
|
38
|
+
<data type="string" rngui:label="Path"/>
|
|
39
|
+
</element>
|
|
40
|
+
<element name="visualizer_url" rngui:label="Visualizer Url">
|
|
41
|
+
<data type="string" rngui:label="Url"/>
|
|
42
|
+
</element>
|
|
43
|
+
<element name="visualizer_config" rngui:label="Visualizer Config">
|
|
44
|
+
<data type="string" rngui:label="Url"/>
|
|
45
|
+
</element>
|
|
46
|
+
<element name="visualizer_params" rngui:header="Visualizer Arguments">
|
|
47
|
+
<zeroOrMore rngui:label="Create Argument Pair">
|
|
48
|
+
<element rngui:label='Name'>
|
|
49
|
+
<anyName/>
|
|
50
|
+
<data type="string" rngui:label="Value"/>
|
|
51
|
+
</element>
|
|
52
|
+
</zeroOrMore>
|
|
53
|
+
</element>
|
|
54
|
+
</element>
|
|
55
|
+
</zeroOrMore>
|
|
56
|
+
</element>
|
|
28
57
|
</element>
|
|
29
58
|
<element name="_timing" rngui:header="Timing">
|
|
30
59
|
<element name="_timing_min" rngui:label='Min in m'>
|
|
@@ -25,6 +25,35 @@
|
|
|
25
25
|
</element>
|
|
26
26
|
</zeroOrMore>
|
|
27
27
|
</element>
|
|
28
|
+
<element name="sensors" rngui:header="Sensors">
|
|
29
|
+
<zeroOrMore rngui:label="Add Sensor">
|
|
30
|
+
<element name="sensor">
|
|
31
|
+
<element name="name" rngui:label="Label">
|
|
32
|
+
<data type="string" rngui:label="Label"/>
|
|
33
|
+
</element>
|
|
34
|
+
<element name="extractor_url" rngui:label="Extractor Url">
|
|
35
|
+
<data type="string" rngui:label="Url"/>
|
|
36
|
+
</element>
|
|
37
|
+
<element name="extractor_arg" rngui:label="Extractor Argument">
|
|
38
|
+
<data type="string" rngui:label="Path"/>
|
|
39
|
+
</element>
|
|
40
|
+
<element name="visualizer_url" rngui:label="Visualizer Url">
|
|
41
|
+
<data type="string" rngui:label="Url"/>
|
|
42
|
+
</element>
|
|
43
|
+
<element name="visualizer_config" rngui:label="Visualizer Config">
|
|
44
|
+
<data type="string" rngui:label="Url"/>
|
|
45
|
+
</element>
|
|
46
|
+
<element name="visualizer_params" rngui:header="Visualizer Arguments">
|
|
47
|
+
<zeroOrMore rngui:label="Create Argument Pair">
|
|
48
|
+
<element rngui:label='Name'>
|
|
49
|
+
<anyName/>
|
|
50
|
+
<data type="string" rngui:label="Value"/>
|
|
51
|
+
</element>
|
|
52
|
+
</zeroOrMore>
|
|
53
|
+
</element>
|
|
54
|
+
</element>
|
|
55
|
+
</zeroOrMore>
|
|
56
|
+
</element>
|
|
28
57
|
</element>
|
|
29
58
|
<element name="finalize" rngui:header="Finalize" rngui:label="Code">
|
|
30
59
|
<attribute name="output" rngui:label="Access Variable" rngui:default="result">
|
data/cpee.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "cpee"
|
|
3
|
-
s.version = "1.4.
|
|
3
|
+
s.version = "1.4.10"
|
|
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). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
|
data/lib/cpee/controller.rb
CHANGED
data/lib/cpee/instantiation.rb
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
|
14
14
|
|
|
15
15
|
require 'riddl/server'
|
|
16
|
+
require 'securerandom'
|
|
16
17
|
require 'xml/smart'
|
|
17
18
|
require 'base64'
|
|
18
19
|
require 'uri'
|
|
@@ -77,31 +78,21 @@ module CPEE
|
|
|
77
78
|
return ins
|
|
78
79
|
end #}}}
|
|
79
80
|
private :load_testset
|
|
80
|
-
def handle_waiting(cpee,instance,behavior) #{{{
|
|
81
|
+
def handle_waiting(cpee,instance,behavior,selfurl,cblist) #{{{
|
|
81
82
|
if behavior =~ /^wait/
|
|
82
83
|
condition = behavior.match(/_([^_]+)_/)&.[](1) || 'finished'
|
|
83
|
-
@headers << Riddl::Header.new('
|
|
84
|
+
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
|
84
85
|
cb = @h['CPEE_CALLBACK']
|
|
85
86
|
|
|
86
87
|
if cb
|
|
88
|
+
cbk = SecureRandom.uuid
|
|
87
89
|
srv = Riddl::Client.new(cpee, cpee + "?riddl-description")
|
|
88
90
|
status, response = srv.resource("/#{instance}/notifications/subscriptions/").post [
|
|
91
|
+
Riddl::Parameter::Simple.new("url",File.join(selfurl,'callback',cbk)),
|
|
89
92
|
Riddl::Parameter::Simple.new("topic","state"),
|
|
90
|
-
Riddl::Parameter::Simple.new("events","change")
|
|
93
|
+
Riddl::Parameter::Simple.new("events","change")
|
|
91
94
|
]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
srv.resource("/#{instance}/notifications/subscriptions/#{key}/ws/").ws do |conn|
|
|
95
|
-
conn.on :message do |msg|
|
|
96
|
-
if JSON::parse(XML::Smart::string(msg.data).find('string(/event/notification)'))['state'] == condition
|
|
97
|
-
conn.close
|
|
98
|
-
Riddl::Client.new(cb).put [
|
|
99
|
-
# TODO extract all dataelements from instance
|
|
100
|
-
Riddl::Parameter::Simple.new('instance',instance)
|
|
101
|
-
]
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|
|
95
|
+
cblist[cbk] = cb, condition, instance
|
|
105
96
|
end
|
|
106
97
|
end
|
|
107
98
|
end #}}}
|
|
@@ -135,6 +126,8 @@ module CPEE
|
|
|
135
126
|
|
|
136
127
|
def response
|
|
137
128
|
cpee = @a[0]
|
|
129
|
+
selfurl = @a[1]
|
|
130
|
+
cblist = @a[2]
|
|
138
131
|
status, res = Riddl::Client.new(@p[2].value).get
|
|
139
132
|
tdoc = if status >= 200 && status < 300
|
|
140
133
|
res[0].value.read
|
|
@@ -145,8 +138,9 @@ module CPEE
|
|
|
145
138
|
if (instance = load_testset(tdoc,cpee,@p[0].value)) == -1
|
|
146
139
|
@status = 500
|
|
147
140
|
else
|
|
141
|
+
@headers << Riddl::Header.new('CPEE-INSTANTIATION',File.join(cpee,instance))
|
|
148
142
|
handle_data cpee, instance, @p[3]&.value
|
|
149
|
-
handle_waiting cpee, instance, @p[1].value
|
|
143
|
+
handle_waiting cpee, instance, @p[1].value, selfurl, cblist
|
|
150
144
|
handle_starting cpee, instance, @p[1].value
|
|
151
145
|
return Riddl::Parameter::Simple.new("url",cpee + instance)
|
|
152
146
|
end
|
|
@@ -160,6 +154,8 @@ module CPEE
|
|
|
160
154
|
cpee = @a[0]
|
|
161
155
|
behavior = @a[1] ? 'fork_ready' : @p[0].value
|
|
162
156
|
data = @a[1] ? 0 : 1
|
|
157
|
+
selfurl = @a[2]
|
|
158
|
+
cblist = @a[3]
|
|
163
159
|
tdoc = if @p[data].additional =~ /base64/
|
|
164
160
|
Base64.decode64(@p[data].value.read)
|
|
165
161
|
else
|
|
@@ -169,8 +165,9 @@ module CPEE
|
|
|
169
165
|
if (instance = load_testset(tdoc,cpee)) == -1
|
|
170
166
|
@status = 500
|
|
171
167
|
else
|
|
168
|
+
@headers << Riddl::Header.new('CPEE-INSTANTIATION',File.join(cpee,instance))
|
|
172
169
|
handle_data cpee, instance, @p[data+1]&.value
|
|
173
|
-
handle_waiting cpee, instance, behavior
|
|
170
|
+
handle_waiting cpee, instance, behavior, selfurl, cblist
|
|
174
171
|
handle_starting cpee, instance, behavior
|
|
175
172
|
return Riddl::Parameter::Simple.new("url",cpee + instance)
|
|
176
173
|
end
|
|
@@ -182,29 +179,55 @@ module CPEE
|
|
|
182
179
|
|
|
183
180
|
def response
|
|
184
181
|
cpee = @a[0]
|
|
182
|
+
selfurl = @a[1]
|
|
183
|
+
cblist = @a[2]
|
|
185
184
|
instance = @p[1].value
|
|
186
185
|
|
|
187
186
|
handle_data cpee, instance, @p[2]&.value
|
|
188
|
-
handle_waiting cpee, instance, @p[0].value
|
|
187
|
+
handle_waiting cpee, instance, @p[0].value, selfurl, cblist
|
|
189
188
|
handle_starting cpee, instance, @p[0].value
|
|
190
189
|
return Riddl::Parameter::Simple.new("url",cpee + instance)
|
|
191
190
|
end
|
|
192
191
|
end #}}}
|
|
193
192
|
|
|
193
|
+
class ContinueTask < Riddl::Implementation #{{{
|
|
194
|
+
def response
|
|
195
|
+
cblist = @a[0]
|
|
196
|
+
topic = @p[1].value
|
|
197
|
+
event_name = @p[2].value
|
|
198
|
+
notification = JSON.parse(@p[3].value)
|
|
199
|
+
|
|
200
|
+
cb, condition, instance = cblist[@r.last]
|
|
201
|
+
if notification['state'] == condition
|
|
202
|
+
Riddl::Client.new(cb).put [
|
|
203
|
+
# TODO extract all dataelements from instance
|
|
204
|
+
Riddl::Parameter::Simple.new('instance',instance)
|
|
205
|
+
]
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end #}}}
|
|
209
|
+
|
|
194
210
|
def self::implementation(opts)
|
|
195
211
|
opts[:cpee] ||= 'http://localhost:9298/'
|
|
212
|
+
opts[:self] ||= "http#{opts[:secure] ? 's' : ''}://#{opts[:host]}:#{opts[:port]}/"
|
|
213
|
+
opts[:cblist] ||= {}
|
|
196
214
|
Proc.new do
|
|
197
215
|
on resource do
|
|
198
|
-
run InstantiateXML, opts[:cpee],true if post 'xmlsimple'
|
|
216
|
+
run InstantiateXML, opts[:cpee], true if post 'xmlsimple'
|
|
199
217
|
on resource 'xml' do
|
|
200
218
|
run InstantiateXML, opts[:cpee], false if post 'xml'
|
|
201
219
|
end
|
|
202
220
|
on resource 'url' do
|
|
203
|
-
run InstantiateUrl, opts[:cpee] if post 'url'
|
|
221
|
+
run InstantiateUrl, opts[:cpee], opts[:self], opts[:cblist] if post 'url'
|
|
204
222
|
end
|
|
205
223
|
on resource 'instance' do
|
|
206
224
|
run HandleInstance, opts[:cpee] if post 'instance'
|
|
207
225
|
end
|
|
226
|
+
on resource 'callback' do
|
|
227
|
+
on resource do
|
|
228
|
+
run ContinueTask, opts[:cblist] if post
|
|
229
|
+
end
|
|
230
|
+
end
|
|
208
231
|
end
|
|
209
232
|
end
|
|
210
233
|
end
|