cpee 2.1.140 → 2.1.143
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/compliance-view.html +2 -5
- data/cockpit/compliance.html +2 -5
- data/cockpit/conformance.html +299 -0
- data/cockpit/css/compliance.css +7 -42
- data/cockpit/css/ui.css +7 -5
- data/cockpit/edit.html +1 -4
- data/cockpit/graph.html +1 -4
- data/cockpit/index.html +1 -4
- data/cockpit/js/compliance.js +102 -258
- data/cockpit/js/extended_columns.js +1 -1
- data/cockpit/js/instance.js +50 -19
- data/cockpit/js/llm.js +153 -81
- data/cockpit/js/mp-conformance.js +84 -0
- data/cockpit/js/parameters.js +3 -1
- data/cockpit/js/ui.js +2 -2
- data/cockpit/js/wfadaptor.js +41 -30
- data/cockpit/llm.html +1 -4
- data/cockpit/llmmodel.html +1 -4
- data/cockpit/model.html +1 -4
- data/cockpit/only_llm.html +1 -4
- data/cockpit/rngs/aggregations.rng +15 -0
- data/cockpit/rngs/intervals.rng +12 -0
- data/cockpit/rngs/nlrequirements.rng +8 -0
- data/cockpit/rngs/requirements.rng +2 -2
- data/cockpit/rngs/rules.rng +30 -0
- data/cockpit/templates/Coopis 2010.xml +10 -2
- data/cockpit/themes/base.js +5 -4
- data/cockpit/themes/presetlr/theme.js +2 -0
- data/cockpit/track.html +1 -4
- data/cpee.gemspec +1 -1
- data/lib/cpee/implementation_callbacks.rb +4 -2
- data/lib/cpee/implementation_notifications.rb +2 -2
- data/lib/cpee/implementation_properties.rb +36 -18
- data/lib/cpee/message.rb +3 -1
- data/lib/properties/set-properties.rng +4 -0
- data/lib/properties/set-some-properties.rng +4 -0
- data/lib/properties/set-testset.rng +4 -0
- data/lib/properties/transformation.rng +43 -34
- data/server/executionhandlers/ruby/controller.rb +16 -9
- data/server/resources/notifications/logging/subscription.xml +5 -0
- data/server/routing/end.pid +1 -1
- data/server/routing/forward-events-00.pid +1 -1
- data/server/routing/forward-votes.pid +1 -1
- data/server/routing/persist.pid +1 -1
- data/server/routing/persist.rb +1 -0
- metadata +7 -1
data/cockpit/js/wfadaptor.js
CHANGED
|
@@ -171,7 +171,7 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
171
171
|
if ( typeof manifestation.elements[element].description === 'string' ) {
|
|
172
172
|
manifestation.elements[element].description = [ manifestation.elements[element].description ];
|
|
173
173
|
}
|
|
174
|
-
if (
|
|
174
|
+
if (Array.isArray(manifestation.elements[element].description)) {
|
|
175
175
|
manifestation.elements[element].description.forEach(function(val,ind){
|
|
176
176
|
deferreds.push(
|
|
177
177
|
$.ajax({
|
|
@@ -493,13 +493,13 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
493
493
|
var debug_dim = this.dim.debug = function() { //{{{
|
|
494
494
|
line = '\n';
|
|
495
495
|
for (let i=1; i < self.dim.symbols.length; i++) {
|
|
496
|
-
line +=
|
|
496
|
+
line += i.sprintf('%02d') + ': ';
|
|
497
497
|
if (self.dim.symbols[i]) {
|
|
498
498
|
for (let j=1; j < self.dim.symbols[i].length; j++) {
|
|
499
499
|
line += ' [ ';
|
|
500
|
-
if (self.dim.symbols[i] && self.dim.symbols[i][j] && self.dim.symbols[i][j].x) { line +=
|
|
500
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][j] && self.dim.symbols[i][j].x) { line += self.dim.symbols[i][j].x.sprintf('%3d'); } else { line += ' '; }
|
|
501
501
|
line += ', ';
|
|
502
|
-
if (self.dim.symbols[i] && self.dim.symbols[i][j] && self.dim.symbols[i][j].width) { line +=
|
|
502
|
+
if (self.dim.symbols[i] && self.dim.symbols[i][j] && self.dim.symbols[i][j].width) { line += self.dim.symbols[i][j].width.sprintf('%3d'); } else { line += ' '; }
|
|
503
503
|
line += ' ] ';
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -846,32 +846,43 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
846
846
|
if (g.attr('element-endpoint')) {
|
|
847
847
|
let tsym = self.get_symbol(g.attr('element-endpoint'));
|
|
848
848
|
if (tsym) {
|
|
849
|
-
let
|
|
850
|
-
|
|
851
|
-
if (
|
|
852
|
-
|
|
853
|
-
|
|
849
|
+
let tpart = (p) => $('.part-' + p,tsym);
|
|
850
|
+
let tnor = tpart('normal');
|
|
851
|
+
if (tnor.length + tpart('start').length + tpart('middle').length + tpart('end').length == 0) {
|
|
852
|
+
// a plain icon, all of it is the normal part
|
|
853
|
+
tnor = $X('<g class="part-normal" xmlns="http://www.w3.org/2000/svg"></g>');
|
|
854
|
+
tnor.append($(tsym.documentElement.children).clone());
|
|
854
855
|
}
|
|
855
|
-
if (
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
856
|
+
if (tpart('start').length + tpart('middle').length + tpart('end').length == 0) {
|
|
857
|
+
// only a normal part: the icon has no place for a label, so none is shown
|
|
858
|
+
$('.part-start, .part-middle, .part-end',sym).remove();
|
|
859
|
+
} else {
|
|
860
|
+
// an own middle without an end is not clipped after the label, so then the default end goes as well
|
|
861
|
+
if (tpart('middle').length > 0 || tpart('end').length > 0) {
|
|
862
|
+
$('.part-end',sym).remove();
|
|
863
|
+
}
|
|
864
|
+
if (tpart('end').length > 0) {
|
|
865
|
+
sym.prepend(tpart('end').clone());
|
|
866
|
+
}
|
|
867
|
+
if (tpart('middle').length > 0) {
|
|
868
|
+
$('.part-middle',sym).remove();
|
|
869
|
+
sym.prepend(tpart('middle').clone());
|
|
870
|
+
}
|
|
871
|
+
let dsta = $('.part-start',sym);
|
|
872
|
+
if (tpart('start').length > 0) {
|
|
873
|
+
dsta.remove();
|
|
874
|
+
sym.prepend(tpart('start').clone());
|
|
875
|
+
} else if (dsta.length > 0 && tnor.length > 0) {
|
|
876
|
+
// without an own start, the normal part is the start, clipped like the default start
|
|
877
|
+
let tsta = tnor.clone().attr('class','part-start');
|
|
878
|
+
if (dsta.attr('clip-path')) { tsta.attr('clip-path',dsta.attr('clip-path')); }
|
|
879
|
+
dsta.remove();
|
|
880
|
+
sym.prepend(tsta);
|
|
881
|
+
}
|
|
869
882
|
}
|
|
870
|
-
if (
|
|
883
|
+
if (tnor.length > 0) {
|
|
871
884
|
$('.part-normal',sym).remove();
|
|
872
|
-
|
|
873
|
-
ts.append($(tsym.documentElement.children).clone());
|
|
874
|
-
sym.prepend(ts);
|
|
885
|
+
sym.prepend(tnor.clone());
|
|
875
886
|
}
|
|
876
887
|
}
|
|
877
888
|
let tprop = self.get_properties(g.attr('element-endpoint'));
|
|
@@ -1251,7 +1262,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1251
1262
|
// Adaption functions {{{
|
|
1252
1263
|
this.insert_after = function(new_node, target, source_opts) { // {{{
|
|
1253
1264
|
reset_used_id_list();
|
|
1254
|
-
if (
|
|
1265
|
+
if (Array.isArray(new_node)) {
|
|
1255
1266
|
$.each(new_node,function(k,v){
|
|
1256
1267
|
var nn = self.source(v,source_opts);
|
|
1257
1268
|
target.after(nn);
|
|
@@ -1266,7 +1277,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1266
1277
|
} // }}}
|
|
1267
1278
|
this.insert_first_into = function(new_node, target, source_opts) { // {{{
|
|
1268
1279
|
reset_used_id_list();
|
|
1269
|
-
if (
|
|
1280
|
+
if (Array.isArray(new_node)) {
|
|
1270
1281
|
$.each(new_node,function(k,v){
|
|
1271
1282
|
var nn = self.source(v,source_opts);
|
|
1272
1283
|
target.prepend(nn);
|
|
@@ -1281,7 +1292,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1281
1292
|
} // }}}
|
|
1282
1293
|
this.insert_last_into = function(new_node, target) { // {{{
|
|
1283
1294
|
reset_used_id_list();
|
|
1284
|
-
if (
|
|
1295
|
+
if (Array.isArray(new_node)) {
|
|
1285
1296
|
$.each(new_node,function(k,v){
|
|
1286
1297
|
var nn = self.source(v);
|
|
1287
1298
|
target.append(nn);
|
data/cockpit/llm.html
CHANGED
|
@@ -25,11 +25,8 @@
|
|
|
25
25
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
26
26
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
27
27
|
<script type="text/javascript" src="/js_libs/uidash_util.js"></script>
|
|
28
|
-
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
29
28
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/
|
|
31
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
29
|
+
<script type="text/javascript" src="/js_libs/js.cookie.min.js"></script>
|
|
33
30
|
|
|
34
31
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
35
32
|
|
data/cockpit/llmmodel.html
CHANGED
|
@@ -25,11 +25,8 @@
|
|
|
25
25
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
26
26
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
27
27
|
<script type="text/javascript" src="/js_libs/uidash_util.js"></script>
|
|
28
|
-
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
29
28
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/
|
|
31
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
29
|
+
<script type="text/javascript" src="/js_libs/js.cookie.min.js"></script>
|
|
33
30
|
|
|
34
31
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
35
32
|
|
data/cockpit/model.html
CHANGED
|
@@ -25,11 +25,8 @@
|
|
|
25
25
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
26
26
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
27
27
|
<script type="text/javascript" src="/js_libs/uidash_util.js"></script>
|
|
28
|
-
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
29
28
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/
|
|
31
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
29
|
+
<script type="text/javascript" src="/js_libs/js.cookie.min.js"></script>
|
|
33
30
|
|
|
34
31
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
35
32
|
|
data/cockpit/only_llm.html
CHANGED
|
@@ -25,11 +25,8 @@
|
|
|
25
25
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
26
26
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
27
27
|
<script type="text/javascript" src="/js_libs/uidash_util.js"></script>
|
|
28
|
-
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
29
28
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
30
|
-
<script type="text/javascript" src="/js_libs/
|
|
31
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
32
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
29
|
+
<script type="text/javascript" src="/js_libs/js.cookie.min.js"></script>
|
|
33
30
|
|
|
34
31
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
35
32
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<element rngui:version="1.2" name="aggregations" ns="http://cpee.org/ns/properties/2.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
|
|
2
|
+
<zeroOrMore rngui:label="Create Aggregation">
|
|
3
|
+
<element name='aggregation' rngui:header='Aggregation'>
|
|
4
|
+
<element name='id' rngui:label='Identifier'>
|
|
5
|
+
<data type="string" rngui:label="value"/>
|
|
6
|
+
</element>
|
|
7
|
+
<element name='aggregation-operation' rngui:label='Aggregation Operation'>
|
|
8
|
+
<data type="string" rngui:label="value"/>
|
|
9
|
+
</element>
|
|
10
|
+
<element name='window-predicate' rngui:label='Window Predicate'>
|
|
11
|
+
<data type="string" rngui:label="value"/>
|
|
12
|
+
</element>
|
|
13
|
+
</element>
|
|
14
|
+
</zeroOrMore>
|
|
15
|
+
</element>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<element rngui:version="1.2" name="intervals" ns="http://cpee.org/ns/properties/2.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
|
|
2
|
+
<zeroOrMore rngui:label="Create Interval">
|
|
3
|
+
<element name='interval' rngui:header='Interval'>
|
|
4
|
+
<element name='id' rngui:label='Identifier'>
|
|
5
|
+
<data type="string" rngui:label="value"/>
|
|
6
|
+
</element>
|
|
7
|
+
<element name='validity_predicate' rngui:label='Validity Predicate (event, state, trace)'>
|
|
8
|
+
<data type="string" rngui:label="value"/>
|
|
9
|
+
</element>
|
|
10
|
+
</element>
|
|
11
|
+
</zeroOrMore>
|
|
12
|
+
</element>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<element rngui:version="1.2" name="nlrequirements" ns="http://cpee.org/ns/properties/2.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
|
|
2
|
+
<zeroOrMore rngui:label="Create NL Requirement">
|
|
3
|
+
<element rngui:label='Name' rngui:action_button_label="Extract" rngui:action_button_handler="extract_single_nl_requirement(entry)">
|
|
4
|
+
<anyName rngui:unique="true" rngui:default="javascript:next_requirement_id()" rngui:readonly="true"/>
|
|
5
|
+
<data type="string" rngui:label="Write natural-language requirement"/>
|
|
6
|
+
</element>
|
|
7
|
+
</zeroOrMore>
|
|
8
|
+
</element>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<element rngui:version="1.2" name="requirements" ns="http://cpee.org/ns/properties/2.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
|
|
2
2
|
<zeroOrMore rngui:label="Create Requirement">
|
|
3
|
-
<element rngui:label='Name'>
|
|
4
|
-
<anyName rngui:unique="true"/>
|
|
3
|
+
<element rngui:label='Name' rngui:action_button_label="Save" rngui:action_button_handler="save_requirements()">
|
|
4
|
+
<anyName rngui:unique="true" rngui:default="javascript:next_requirement_id()" rngui:readonly="true"/>
|
|
5
5
|
<data type="string" rngui:label="value"/>
|
|
6
6
|
</element>
|
|
7
7
|
</zeroOrMore>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<element rngui:version="1.2" name="rules" ns="http://cpee.org/ns/properties/2.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:rngui="http://rngui.org">
|
|
2
|
+
<zeroOrMore rngui:label="Create Rules">
|
|
3
|
+
<element name='rule' rngui:header='Rule'>
|
|
4
|
+
<element name='rule_id' rngui:label='Rule Identifier'>
|
|
5
|
+
<data type="string" rngui:label="value"/>
|
|
6
|
+
</element>
|
|
7
|
+
<element name='interval' rngui:label='Validity Interval (event, state, trace)'>
|
|
8
|
+
<data type="string" rngui:label="value"/>
|
|
9
|
+
</element>
|
|
10
|
+
<element name='filter' rngui:label='Event Filter (event, state)'>
|
|
11
|
+
<data type="string" rngui:label="value"/>
|
|
12
|
+
</element>
|
|
13
|
+
<element name='spawn_condition' rngui:label='Spawn Condition (event, state, trace)'>
|
|
14
|
+
<data type="string" rngui:label="value"/>
|
|
15
|
+
</element>
|
|
16
|
+
<element name='predicate' rngui:label='Predicate (event, state, trace)'>
|
|
17
|
+
<data type="string" rngui:label="value"/>
|
|
18
|
+
</element>
|
|
19
|
+
<element name='termination_predicate' rngui:label='Termination Predicate (event, state, trace)'>
|
|
20
|
+
<data type="string" rngui:label="value"/>
|
|
21
|
+
</element>
|
|
22
|
+
<element name='action_sat' rngui:label='Satisfaction Action (event, state, trace)'>
|
|
23
|
+
<data type="string" rngui:label="value"/>
|
|
24
|
+
</element>
|
|
25
|
+
<element name='action_viol' rngui:label='Compensation Action (event, state, trace)'>
|
|
26
|
+
<data type="string" rngui:label="value"/>
|
|
27
|
+
</element>
|
|
28
|
+
</element>
|
|
29
|
+
</zeroOrMore>
|
|
30
|
+
</element>
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<from>Vienna</from>
|
|
11
11
|
<to>Prague</to>
|
|
12
12
|
</dataelements>
|
|
13
|
+
<documents/>
|
|
13
14
|
<endpoints>
|
|
14
15
|
<bookAir>https://cpee.org/services/airline.php</bookAir>
|
|
15
16
|
<user>https-post://cpee.org/services/timeout-user.php</user>
|
|
@@ -22,11 +23,11 @@
|
|
|
22
23
|
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
|
23
24
|
</endpoints>
|
|
24
25
|
<attributes>
|
|
26
|
+
<info>Coopis 2010</info>
|
|
25
27
|
<guarded>none</guarded>
|
|
26
28
|
<modeltype>CPEE</modeltype>
|
|
27
29
|
<theme>extended</theme>
|
|
28
30
|
<guarded_id/>
|
|
29
|
-
<info>Coopis 2010</info>
|
|
30
31
|
<creator>Christine Ashcreek</creator>
|
|
31
32
|
<author>Christine Ashcreek</author>
|
|
32
33
|
<design_stage>development</design_stage>
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
39
40
|
<call id="a1" endpoint="bookAir">
|
|
40
41
|
<parameters>
|
|
41
|
-
<label>Book Airline
|
|
42
|
+
<label>Book Airline 12</label>
|
|
43
|
+
<color/>
|
|
42
44
|
<method>:post</method>
|
|
43
45
|
<arguments>
|
|
44
46
|
<from>!data.from</from>
|
|
@@ -47,6 +49,7 @@
|
|
|
47
49
|
</arguments>
|
|
48
50
|
</parameters>
|
|
49
51
|
<code>
|
|
52
|
+
<signal>false</signal>
|
|
50
53
|
<prepare/>
|
|
51
54
|
<finalize output="result">data.airline = result.value('id')
|
|
52
55
|
data.costs += result.value('costs').to_f
|
|
@@ -55,6 +58,11 @@ status.update 1, 'Hotel'</finalize>
|
|
|
55
58
|
<rescue output="result"/>
|
|
56
59
|
</code>
|
|
57
60
|
<annotations>
|
|
61
|
+
<_generic/>
|
|
62
|
+
<_logging_behavior>
|
|
63
|
+
<_exclude>false</_exclude>
|
|
64
|
+
<_include>false</_include>
|
|
65
|
+
</_logging_behavior>
|
|
58
66
|
<_timing>
|
|
59
67
|
<_timing_weight/>
|
|
60
68
|
<_timing_avg/>
|
data/cockpit/themes/base.js
CHANGED
|
@@ -34,7 +34,7 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
|
34
34
|
//{{{ Return the svgid for the selected task
|
|
35
35
|
this.selected = function(){
|
|
36
36
|
var svgid = 'unknown';
|
|
37
|
-
|
|
37
|
+
self.adaptor.illustrator.get_elements().each(function(key,value) {
|
|
38
38
|
if ($(value).hasClass('selected')) {
|
|
39
39
|
svgid = $(value).attr('element-id');
|
|
40
40
|
}
|
|
@@ -44,7 +44,7 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
|
44
44
|
//{{{ Return the svgids for all marked tasks
|
|
45
45
|
this.marked = function(){
|
|
46
46
|
var svgid = [];
|
|
47
|
-
|
|
47
|
+
self.adaptor.illustrator.get_elements().each(function(key,value) {
|
|
48
48
|
if ($(value).hasClass('marked')) {
|
|
49
49
|
svgid.push($(value).attr('element-id'));
|
|
50
50
|
}
|
|
@@ -54,7 +54,7 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
|
54
54
|
//{{{ Return the json for all marked tasks
|
|
55
55
|
this.marked_text = function(){
|
|
56
56
|
var nodes = [];
|
|
57
|
-
var markymark =
|
|
57
|
+
var markymark = self.marked().uniq();
|
|
58
58
|
$(markymark).each(function(key,svgid){
|
|
59
59
|
var node = self.adaptor.description.get_node_by_svg_id(svgid);
|
|
60
60
|
nodes.push($(node).serializePrettyXML());
|
|
@@ -110,7 +110,8 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
|
110
110
|
check2.push(value.type);
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
// all types of the copied nodes are allowed in the group
|
|
114
|
+
if (nodes.length > 0 && check1.uniq().length == check1.intersection(check2).length) {
|
|
114
115
|
if (myid == localStorage.getItem('marked_from')) {
|
|
115
116
|
$(nodes).each(function(key,node){
|
|
116
117
|
nodes[key] = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
|
|
@@ -5,6 +5,8 @@ WFAdaptorManifestation = class extends WFAdaptorManifestationBase {
|
|
|
5
5
|
this.rotated_labels = false;
|
|
6
6
|
this.lr = true;
|
|
7
7
|
this.wellformed_pre_test = true;
|
|
8
|
+
this.elements.alternative.illustrator.noindent = true;
|
|
9
|
+
this.elements.parallel_branch.illustrator.noindent = true;
|
|
8
10
|
this.elements.loop.illustrator.resolve_symbol = function(node) {
|
|
9
11
|
return $(node).attr('mode') == 'pre_test' ? 'loop_tail_pre' : 'loop_tail'; // pre_test loops look like post_test loops, but reversed
|
|
10
12
|
};
|
data/cockpit/track.html
CHANGED
|
@@ -24,11 +24,8 @@
|
|
|
24
24
|
<!-- libs, do not modify. When local than load local libs. -->
|
|
25
25
|
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
|
26
26
|
<script type="text/javascript" src="/js_libs/uidash_util.js"></script>
|
|
27
|
-
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
|
28
27
|
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
|
29
|
-
<script type="text/javascript" src="/js_libs/
|
|
30
|
-
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
|
31
|
-
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
|
28
|
+
<script type="text/javascript" src="/js_libs/js.cookie.min.js"></script>
|
|
32
29
|
|
|
33
30
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
|
34
31
|
|
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.143"
|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
|
5
5
|
s.license = "LGPL-3.0-or-later"
|
|
6
6
|
s.summary = "The cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
|
|
@@ -102,7 +102,8 @@ module CPEE
|
|
|
102
102
|
{},
|
|
103
103
|
{},
|
|
104
104
|
'true',
|
|
105
|
-
opts[:redis]
|
|
105
|
+
opts[:redis],
|
|
106
|
+
0
|
|
106
107
|
)
|
|
107
108
|
else
|
|
108
109
|
@status = 404
|
|
@@ -169,7 +170,8 @@ module CPEE
|
|
|
169
170
|
{},
|
|
170
171
|
{},
|
|
171
172
|
@p[0].class == Riddl::Parameter::Simple ? @p[0].value : @p[0].value.read,
|
|
172
|
-
opts[:redis]
|
|
173
|
+
opts[:redis],
|
|
174
|
+
0
|
|
173
175
|
)
|
|
174
176
|
else
|
|
175
177
|
@status = 400
|
|
@@ -196,7 +196,7 @@ module CPEE
|
|
|
196
196
|
|
|
197
197
|
def self::sse_distributor(opts) #{{{
|
|
198
198
|
conn = opts[:redis_dyn].call "Server SSE"
|
|
199
|
-
conn.psubscribe('forward:*','event
|
|
199
|
+
conn.psubscribe('forward:*','event:*:state/change') do |on|
|
|
200
200
|
on.pmessage do |pat, what, message|
|
|
201
201
|
if pat == 'forward:*'
|
|
202
202
|
id, key = what.match(/forward:([^\/]+)\/(.+)/).captures
|
|
@@ -208,7 +208,7 @@ module CPEE
|
|
|
208
208
|
else
|
|
209
209
|
DeleteSubscription::set(id,opts,key)
|
|
210
210
|
end
|
|
211
|
-
elsif pat == 'event
|
|
211
|
+
elsif pat == 'event:*:state/change'
|
|
212
212
|
mess = JSON.parse(message[message.index(' ')+1..-1])
|
|
213
213
|
state = mess.dig('content','state')
|
|
214
214
|
if state == 'finished' || state == 'abandoned'
|
|
@@ -140,7 +140,9 @@ module CPEE
|
|
|
140
140
|
doc.find('/p:properties/p:transformation/p:dataelements/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dataelements/@type')
|
|
141
141
|
doc.find('/p:properties/p:transformation/p:endpoints/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/endpoints/@type')
|
|
142
142
|
doc.find('/p:properties/p:transformation/p:dslx').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dslx') || ''
|
|
143
|
-
|
|
143
|
+
ttype, text = PutTransformation::stored_dslx(id,opts)
|
|
144
|
+
doc.find('/p:properties/p:transformation/p:dslx/@type').first.text = ttype
|
|
145
|
+
doc.find('/p:properties/p:transformation/p:dslx').first.attributes['extension'] = text
|
|
144
146
|
Riddl::Parameter::Complex.new('properties','application/xml',doc.to_s)
|
|
145
147
|
end
|
|
146
148
|
end #}}}
|
|
@@ -159,7 +161,7 @@ module CPEE
|
|
|
159
161
|
CPEE::Properties::PutStatus::set id, opts, node.first.dump
|
|
160
162
|
end
|
|
161
163
|
if (node = doc.find('/p:properties/p:executionhandler')).any?
|
|
162
|
-
if doc.find('/p:properties/p:description/*').any?
|
|
164
|
+
if doc.find('/p:properties/p:description/* | /p:properties/p:dslx/*').any?
|
|
163
165
|
CPEE::Properties::PutExecutionHandler::set id, opts, node.first.text, false
|
|
164
166
|
else
|
|
165
167
|
CPEE::Properties::PutExecutionHandler::set id, opts, node.first.text
|
|
@@ -173,9 +175,12 @@ module CPEE
|
|
|
173
175
|
end
|
|
174
176
|
|
|
175
177
|
if (node = doc.find('/p:properties/p:transformation')).any?
|
|
176
|
-
CPEE::Properties::PutTransformation::set id, opts, node.first.dump, doc.find('/p:properties/p:description/*').empty?
|
|
178
|
+
CPEE::Properties::PutTransformation::set id, opts, node.first.dump, doc.find('/p:properties/p:description/* | /p:properties/p:dslx/*').empty?
|
|
179
|
+
CPEE::Persistence::wait(opts)
|
|
177
180
|
end
|
|
178
|
-
if (node = doc.find('/p:properties/p:
|
|
181
|
+
if (node = doc.find('/p:properties/p:dslx/*')).any?
|
|
182
|
+
CPEE::Properties::PutDescription::set id, opts, node.first.dump, true
|
|
183
|
+
elsif (node = doc.find('/p:properties/p:description/*')).any?
|
|
179
184
|
CPEE::Properties::PutDescription::set id, opts, node.first.dump
|
|
180
185
|
end
|
|
181
186
|
|
|
@@ -208,9 +213,12 @@ module CPEE
|
|
|
208
213
|
end
|
|
209
214
|
|
|
210
215
|
if (node = doc.find('/*/p:transformation')).any?
|
|
211
|
-
CPEE::Properties::PutTransformation::set id, opts, node.first.dump, doc.find('/*/p:description/*').empty?
|
|
216
|
+
CPEE::Properties::PutTransformation::set id, opts, node.first.dump, doc.find('/*/p:description/* | /*/p:dslx/*').empty?
|
|
217
|
+
CPEE::Persistence::wait(opts)
|
|
212
218
|
end
|
|
213
|
-
if (node = doc.find('/*/p:
|
|
219
|
+
if (node = doc.find('/*/p:dslx/*')).any?
|
|
220
|
+
CPEE::Properties::PutDescription::set id, opts, node.first.dump, true
|
|
221
|
+
elsif (node = doc.find('/*/p:description/*')).any?
|
|
214
222
|
CPEE::Properties::PutDescription::set id, opts, node.first.dump
|
|
215
223
|
end
|
|
216
224
|
|
|
@@ -310,7 +318,7 @@ module CPEE
|
|
|
310
318
|
end
|
|
311
319
|
end #}}}
|
|
312
320
|
class PutStatus < Riddl::Implementation #{{{
|
|
313
|
-
EXPOSITION_ONLY = 18510501
|
|
321
|
+
EXPOSITION_ONLY = 18510501
|
|
314
322
|
|
|
315
323
|
def self::set(id,opts,xml)
|
|
316
324
|
doc = XML::Smart::string(xml)
|
|
@@ -320,18 +328,16 @@ module CPEE
|
|
|
320
328
|
CPEE::Persistence::set_item(id,opts,'status',:id => sid, :message => doc.find('string(/p:status/p:message)'))
|
|
321
329
|
end
|
|
322
330
|
|
|
323
|
-
def self::expositions(id,opts,expositions)
|
|
331
|
+
def self::expositions(id,opts,expositions)
|
|
324
332
|
return if expositions.empty?
|
|
325
333
|
attrs = CPEE::Persistence::extract_list(id,opts,'attributes').to_h
|
|
326
|
-
change_uuid = CPEE::Persistence::extract_item(id,opts,'dslx/@change_uuid')
|
|
327
334
|
expositions.each do |info,body|
|
|
328
335
|
content = {
|
|
329
|
-
:change_uuid => change_uuid,
|
|
330
336
|
:exposition => body,
|
|
331
337
|
:info => info,
|
|
332
338
|
:attributes => attrs
|
|
333
339
|
}
|
|
334
|
-
CPEE::Message::send(:event,'
|
|
340
|
+
CPEE::Message::send(:event,'status/exposition',File.join(opts[:url],'/'),id,attrs['uuid'],attrs['info'],content,opts[:redis])
|
|
335
341
|
end
|
|
336
342
|
end
|
|
337
343
|
|
|
@@ -901,7 +907,7 @@ module CPEE
|
|
|
901
907
|
)
|
|
902
908
|
end
|
|
903
909
|
tdslx = CPEE::Persistence::extract_item(id,opts,'transformation/dslx')
|
|
904
|
-
tdslxtype =
|
|
910
|
+
tdslxtype = PutTransformation::stored_dslx(id,opts)[0]
|
|
905
911
|
description = if copy && tdslxtype == 'rest'
|
|
906
912
|
nil # slow (e.g. bpmn layout), done after storing, see backtransform_async
|
|
907
913
|
elsif copy
|
|
@@ -989,29 +995,41 @@ module CPEE
|
|
|
989
995
|
des.find('p:dataelements/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dataelements/@type')
|
|
990
996
|
des.find('p:endpoints/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/endpoints/@type')
|
|
991
997
|
des.find('p:dslx').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dslx') || ''
|
|
992
|
-
|
|
998
|
+
ttype, text = PutTransformation::stored_dslx(id,opts)
|
|
999
|
+
des.find('p:dslx/@type').first.text = ttype
|
|
1000
|
+
des.find('p:dslx').first.attributes['extension'] = text
|
|
993
1001
|
Riddl::Parameter::Complex.new('status','text/xml',des.to_doc.to_s)
|
|
994
1002
|
end
|
|
995
1003
|
end #}}}
|
|
996
1004
|
class PutTransformation < Riddl::Implementation #{{{
|
|
1005
|
+
def self::stored_dslx(id,opts)
|
|
1006
|
+
ttype = CPEE::Persistence::extract_item(id,opts,'transformation/dslx/@type')
|
|
1007
|
+
text = CPEE::Persistence::extract_item(id,opts,'transformation/dslx/@extension')
|
|
1008
|
+
fallback = ttype.nil? && CPEE::Persistence::extract_item(id,opts,'transformation/description/@type') == 'copy'
|
|
1009
|
+
[ttype || (fallback ? 'copy' : 'none'), text || (fallback ? 'xml' : 'txt')]
|
|
1010
|
+
end
|
|
997
1011
|
def self::set(id,opts,xml,backtrans=true)
|
|
998
1012
|
doc = XML::Smart::string(xml)
|
|
999
1013
|
doc.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
|
|
1000
1014
|
tdslx = doc.find('string(/p:transformation/p:dslx)')
|
|
1001
|
-
|
|
1015
|
+
type = Proc.new { |item| (t = doc.find("string(/p:transformation/p:#{item}/@type)")).empty? ? 'none' : t }
|
|
1016
|
+
fallback = doc.find('string(/p:transformation/p:dslx/@type)').empty? && type.call('description') == 'copy'
|
|
1017
|
+
tdslxtype = fallback ? 'copy' : type.call('dslx')
|
|
1018
|
+
tdslxext = (t = doc.find('string(/p:transformation/p:dslx/@extension)')).empty? ? (fallback ? 'xml' : 'txt') : t
|
|
1002
1019
|
changed = tdslx != (CPEE::Persistence::extract_item(id,opts,'transformation/dslx') || '') ||
|
|
1003
|
-
tdslxtype !=
|
|
1020
|
+
tdslxtype != PutTransformation::stored_dslx(id,opts)[0]
|
|
1004
1021
|
dslx = CPEE::Persistence::extract_item(id,opts,'dslx')
|
|
1005
1022
|
dslx = nil if dslx&.empty?
|
|
1006
1023
|
CPEE::Persistence::set_item(id,opts,'transformation',
|
|
1007
1024
|
:description => doc.find('string(/p:transformation/p:description)'),
|
|
1008
|
-
:description_type =>
|
|
1025
|
+
:description_type => type.call('description'),
|
|
1009
1026
|
:dataelements =>doc.find('string(/p:transformation/p:dataelements)'),
|
|
1010
|
-
:dataelements_type =>
|
|
1027
|
+
:dataelements_type => type.call('dataelements'),
|
|
1011
1028
|
:endpoints =>doc.find('string(/p:transformation/p:endpoints)'),
|
|
1012
|
-
:endpoints_type =>
|
|
1029
|
+
:endpoints_type => type.call('endpoints'),
|
|
1013
1030
|
:dslx => tdslx,
|
|
1014
1031
|
:dslx_type => tdslxtype,
|
|
1032
|
+
:dslx_extension => tdslxext,
|
|
1015
1033
|
:change_uuid => dslx ? Digest::SHA1.hexdigest(dslx) : nil,
|
|
1016
1034
|
:change_pending => backtrans && changed && tdslxtype == 'rest' && !dslx.nil? # description follows with description/sync
|
|
1017
1035
|
)
|
data/lib/cpee/message.rb
CHANGED
|
@@ -66,11 +66,13 @@ module CPEE
|
|
|
66
66
|
wid = SecureRandom.hex(16)
|
|
67
67
|
begin
|
|
68
68
|
sub.subscribe_with_timeout(2,"event:#{target}:transaction/finished") do |on|
|
|
69
|
+
on.subscribe do
|
|
70
|
+
backend.publish("event:#{target}:transaction/start","#{wid} {}")
|
|
71
|
+
end
|
|
69
72
|
on.message do |what,message|
|
|
70
73
|
mess = message[0...message.index(' ')]
|
|
71
74
|
sub.unsubscribe("event:#{target}:transaction/finished") if mess == wid
|
|
72
75
|
end
|
|
73
|
-
backend.publish("event:#{target}:transaction/start","#{wid} {}")
|
|
74
76
|
end
|
|
75
77
|
rescue => e
|
|
76
78
|
puts "timeout error"
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<include href="endpoints.rng"/>
|
|
9
9
|
<include href="attributes.rng"/>
|
|
10
10
|
<include href="description.rng"/>
|
|
11
|
+
<include href="dslx.rng"/>
|
|
11
12
|
<include href="transformation.rng"/>
|
|
12
13
|
|
|
13
14
|
<start>
|
|
@@ -21,6 +22,9 @@
|
|
|
21
22
|
<ref name="endpoints"/>
|
|
22
23
|
<ref name="attributes"/>
|
|
23
24
|
<ref name="description"/>
|
|
25
|
+
<optional>
|
|
26
|
+
<ref name="dslx"/>
|
|
27
|
+
</optional>
|
|
24
28
|
<ref name="transformation"/>
|
|
25
29
|
</element>
|
|
26
30
|
</start>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<include href="endpoints.rng"/>
|
|
9
9
|
<include href="attributes.rng"/>
|
|
10
10
|
<include href="description.rng"/>
|
|
11
|
+
<include href="dslx.rng"/>
|
|
11
12
|
<include href="transformation.rng"/>
|
|
12
13
|
|
|
13
14
|
<start>
|
|
@@ -40,6 +41,9 @@
|
|
|
40
41
|
<optional>
|
|
41
42
|
<ref name="description"/>
|
|
42
43
|
</optional>
|
|
44
|
+
<optional>
|
|
45
|
+
<ref name="dslx"/>
|
|
46
|
+
</optional>
|
|
43
47
|
<optional>
|
|
44
48
|
<ref name="transformation"/>
|
|
45
49
|
</optional>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<include href="endpoints.rng"/>
|
|
9
9
|
<include href="attributes.rng"/>
|
|
10
10
|
<include href="description.rng"/>
|
|
11
|
+
<include href="dslx.rng"/>
|
|
11
12
|
<include href="transformation.rng"/>
|
|
12
13
|
<include href="subscriptions.rng"/>
|
|
13
14
|
|
|
@@ -44,6 +45,9 @@
|
|
|
44
45
|
<optional>
|
|
45
46
|
<ref name="description"/>
|
|
46
47
|
</optional>
|
|
48
|
+
<optional>
|
|
49
|
+
<ref name="dslx"/>
|
|
50
|
+
</optional>
|
|
47
51
|
<optional>
|
|
48
52
|
<ref name="transformation"/>
|
|
49
53
|
</optional>
|