cpee 2.1.85 → 2.1.87
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/llm.css +79 -0
- data/cockpit/css/ui.css +11 -2
- data/cockpit/edit.html +6 -4
- data/cockpit/graph.html +5 -3
- data/cockpit/index.html +6 -4
- data/cockpit/js/instance.js +7 -0
- data/cockpit/js/llm.js +185 -0
- data/cockpit/js/llm_alternative.js +90 -0
- data/cockpit/js/ui.js +15 -15
- data/cockpit/js/wfadaptor.js +0 -1
- data/cockpit/llm.html +292 -0
- data/cockpit/llm_alternative.html +294 -0
- data/cockpit/model.html +4 -2
- data/cockpit/only_llm.html +250 -0
- data/cockpit/templates/Subprocess.xml +2 -16
- data/cockpit/templates/Worklist.xml +2 -1
- data/cockpit/themes/base.js +6 -1
- data/cockpit/track.html +5 -3
- data/cpee.gemspec +1 -1
- data/lib/cpee/implementation.rb +1 -2
- data/lib/cpee/implementation_callbacks.rb +69 -60
- data/lib/cpee/implementation_notifications.rb +36 -25
- data/lib/cpee/implementation_properties.rb +84 -30
- data/lib/cpee/statemachine.rb +7 -2
- data/lib/properties.xml +7 -0
- data/server/executionhandlers/ruby/ShiftingTestSimple.xml +100 -0
- data/server/executionhandlers/ruby/connection.rb +2 -1
- data/server/executionhandlers/ruby/dsl_to_dslx.xsl +9 -3
- metadata +9 -7
- data/server/resources/transformation.xml +0 -53
- data/server/routing/end.pid +0 -1
- data/server/routing/forward-events-00.pid +0 -1
- data/server/routing/forward-votes.pid +0 -1
- data/server/routing/persist.pid +0 -1
@@ -0,0 +1,250 @@
|
|
1
|
+
<!--
|
2
|
+
This file is part of CPEE.
|
3
|
+
|
4
|
+
CPEE is free software: you can redistribute it and/or modify it under the terms
|
5
|
+
of the GNU General Public License as published by the Free Software Foundation,
|
6
|
+
either version 3 of the License, or (at your option) any later version.
|
7
|
+
|
8
|
+
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
9
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
10
|
+
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
11
|
+
|
12
|
+
You should have received a copy of the GNU General Public License along with
|
13
|
+
CPEE (file COPYING in the main directory). If not, see
|
14
|
+
<http://www.gnu.org/licenses/>.
|
15
|
+
-->
|
16
|
+
|
17
|
+
<!DOCTYPE html>
|
18
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
19
|
+
<head>
|
20
|
+
<meta charset="utf-8"/>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
22
|
+
<title>CPEE Cockpit</title>
|
23
|
+
|
24
|
+
<!-- libs, do not modify. When local than load local libs. -->
|
25
|
+
<script type="text/javascript" src="/js_libs/jquery.min.js"></script>
|
26
|
+
<script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
|
27
|
+
<script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
|
28
|
+
<script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
|
29
|
+
<script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
|
30
|
+
<script type="text/javascript" src="/js_libs/util.js"></script>
|
31
|
+
<script type="text/javascript" src="/js_libs/printf.js"></script>
|
32
|
+
<script type="text/javascript" src="/js_libs/strftime.min.js"></script>
|
33
|
+
<script type="text/javascript" src="/js_libs/parsequery.js"></script>
|
34
|
+
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
35
|
+
<script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
|
36
|
+
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
37
|
+
|
38
|
+
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
39
|
+
|
40
|
+
<script type="text/javascript" src="/js_libs/uidash.js"></script>
|
41
|
+
<script type="text/javascript" src="/js_libs/custommenu.js"></script>
|
42
|
+
|
43
|
+
<link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
|
44
|
+
<link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
|
45
|
+
|
46
|
+
<link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
|
47
|
+
|
48
|
+
<!-- modelling ui -->
|
49
|
+
<script type="text/javascript" src="js/wfadaptor.js"></script>
|
50
|
+
<link rel="stylesheet" href="css/wfadaptor.css" type="text/css" data-include-export="true"/>
|
51
|
+
|
52
|
+
<!-- custom stuff, play arround -->
|
53
|
+
<script type="text/javascript" src="js/ui.js"></script>
|
54
|
+
<script type="text/javascript" src="js/instance.js"></script>
|
55
|
+
<script type="text/javascript" src="js/details.js"></script>
|
56
|
+
<script type="text/javascript" src="js/parameters.js"></script>
|
57
|
+
<script type="text/javascript" src="js/resources.js"></script>
|
58
|
+
<script type="text/javascript" src="js/modifiers.js"></script>
|
59
|
+
<script type="text/javascript" src="themes/base.js"></script>
|
60
|
+
|
61
|
+
<script type="text/javascript" src="js/llm.js"></script>
|
62
|
+
<link rel="stylesheet" href="css/llm.css" type="text/css"/>
|
63
|
+
|
64
|
+
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
65
|
+
<link rel="stylesheet" href="css/resources-label.css" type="text/css"/>
|
66
|
+
<link rel="stylesheet" href="css/resources-svg.css" type="text/css" data-include-export="true"/>
|
67
|
+
<link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
|
68
|
+
<style>
|
69
|
+
/* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
|
70
|
+
/* shit balls, no elegance is left in this world */
|
71
|
+
</style>
|
72
|
+
</head>
|
73
|
+
<body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
|
74
|
+
<div id='disclaimer' class='hidden'> <!--{{{-->
|
75
|
+
<h1>Disclaimer</h1>
|
76
|
+
|
77
|
+
<p>
|
78
|
+
We use reasonable care in creating and presenting the functionality
|
79
|
+
found in this demonstrator. It is provided purely for demonstration purposes
|
80
|
+
and you should seek further guidance and make independent enquiries
|
81
|
+
before relying upon it.
|
82
|
+
</p>
|
83
|
+
|
84
|
+
<p>
|
85
|
+
All functionality included in this demonstrator is subject to change
|
86
|
+
without notice. We make no representation or warranty whatsoever
|
87
|
+
regarding the completeness, accuracy, adequacy, suitability or
|
88
|
+
operation of this demonstrator, or of the results it produces.
|
89
|
+
</p>
|
90
|
+
|
91
|
+
<p>
|
92
|
+
We assume no responsibility for process instances created with this
|
93
|
+
demonstrator and disclaim all liability arising from negligence or
|
94
|
+
otherwise in respect of such process instances. We will not be liable
|
95
|
+
for any damages (including, without limitation, damages for any
|
96
|
+
consequential loss or loss of business opportunities or projects, or
|
97
|
+
loss of profits) howsoever arising from use of or inability to use
|
98
|
+
this demonstrator, or from any action or omission taken as a result of
|
99
|
+
using this demonstrator.
|
100
|
+
</p>
|
101
|
+
|
102
|
+
<p>
|
103
|
+
This demonstrator is hosted in Austria. All liability is excluded to the extent
|
104
|
+
permitted by law including any implied terms. Any interpretation of its
|
105
|
+
content, claims or disputes (of whatever nature and not limited to contractual
|
106
|
+
issues) shall be subject to the exclusive jurisdiction of the Austrian Courts
|
107
|
+
under Austrian law.
|
108
|
+
</p>
|
109
|
+
|
110
|
+
<p>
|
111
|
+
All actions performed while using this demonstrator will be logged, including
|
112
|
+
the IP address of the user.
|
113
|
+
</p>
|
114
|
+
|
115
|
+
<p>
|
116
|
+
<input id='iagree' type='checkbox'/><label for='iagree'><strong>OK, I Agree with this terms. I will be a happy person, and do no evil.</strong></label>
|
117
|
+
</p>
|
118
|
+
<p>
|
119
|
+
<button id='icontinue' disabled='disabled'>Continue</button>
|
120
|
+
</p>
|
121
|
+
</div> <!--}}}-->
|
122
|
+
|
123
|
+
<div class='hidden' id='relaxngworker'></div>
|
124
|
+
|
125
|
+
<div class='menu' id='templates'></div>
|
126
|
+
<div class='menu' id='modeltypes'></div>
|
127
|
+
|
128
|
+
<template id="label">
|
129
|
+
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: 0; left: 0;" class="displaylabel">
|
130
|
+
<g transform="translate(1 %%1) rotate(-%%2)">
|
131
|
+
<rect class="displaylabel" width="200" height="14" x="8" y="0" rx="5" ry="5"/>
|
132
|
+
<path class="displaylabel" d="M10,13 0,13 8,8"/>
|
133
|
+
<path class="displaylabelinner" d="M10,11.5 8.5,11.5 8.5,9.5 10,9.5"/>
|
134
|
+
<text class="label" x="18" y="10">aaaa</text>
|
135
|
+
</g>
|
136
|
+
</svg>
|
137
|
+
</template>
|
138
|
+
|
139
|
+
<ui-tabbed id="instance">
|
140
|
+
<ui-tabbar>
|
141
|
+
<ui-tab class="switch" ></ui-tab>
|
142
|
+
<ui-tab class="" data-tab="new" id="tabnew" >New</ui-tab>
|
143
|
+
<ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
|
144
|
+
<ui-behind ><a style='display:none' target='_blank' id='current-instance'></a><a style='display:none' target='_blank' id='current-instance-properties'>P</a><a style='display:none' target='_blank' id='current-instance-subscriptions'>S</a><a style='display:none' target='_blank' id='current-instance-callbacks'>C</a></ui-behind>
|
145
|
+
<ui-last ><a class="logo" href=".."></a></ui-last>
|
146
|
+
</ui-tabbar>
|
147
|
+
<ui-content>
|
148
|
+
<ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
|
149
|
+
<table class='x-ui-layout'>
|
150
|
+
<tr>
|
151
|
+
<td>Resources:</td>
|
152
|
+
<td><input name="res-url" type="text" value=""/></td>
|
153
|
+
<td></td>
|
154
|
+
</tr>
|
155
|
+
<tr>
|
156
|
+
<td>Engine:</td>
|
157
|
+
<td><input name="base-url" type="text" value=""/></td>
|
158
|
+
<td><button name="base">create new instance</button></td>
|
159
|
+
</tr>
|
160
|
+
<tr>
|
161
|
+
<td>Instance:</td>
|
162
|
+
<td><input name="instance-url" type="text" value=""/></td>
|
163
|
+
<td><button name="instance">monitor instance</button></td>
|
164
|
+
</tr>
|
165
|
+
</table>
|
166
|
+
</ui-area> <!--}}}-->
|
167
|
+
<ui-area data-belongs-to-tab="instance" id="areainstance" class="inactive"> <!--{{{-->
|
168
|
+
<div>
|
169
|
+
<div class='section'>
|
170
|
+
<div>
|
171
|
+
<form id='fuckchrome'>
|
172
|
+
<input type='file' name='testsetfile' id='testsetfile'/>
|
173
|
+
</form>
|
174
|
+
<button title='a template includes various settings, subscriptions or a (partial) model' name="loadtestset">load template</button><button title='a testset includes various settings, subscriptions or a model' name="loadtestsetfile">load testset</button>
|
175
|
+
</div>
|
176
|
+
<div>
|
177
|
+
<input type='file' name='modelfile' id='modelfile'/>
|
178
|
+
<button title='a standalone process model is only loadable if the currently loaded testset sucessfully prepared the current instance for the type of model' name="loadmodelfile">load model</button>
|
179
|
+
</div>
|
180
|
+
</div><div class='section'>
|
181
|
+
<a id="savetestsetfile" href="" download=""></a>
|
182
|
+
<a id="savesvgfile" href="" download=""></a>
|
183
|
+
<button title='a testset includes various settings, subscriptions and a model' name="savetestsetfile">save testset</button>
|
184
|
+
<button title='a testset includes various settings, subscriptions and a model' name="savesvgfile">save svg graph</button>
|
185
|
+
</div><div class='section' id='modifiers'>
|
186
|
+
<template id="item">
|
187
|
+
<div>
|
188
|
+
<div class='title'><strong></strong></div>
|
189
|
+
<div class='select'><select></select></div>
|
190
|
+
<div class='additional'></div>
|
191
|
+
</div>
|
192
|
+
</template>
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
</ui-area> <!--}}}-->
|
196
|
+
</ui-content>
|
197
|
+
</ui-tabbed>
|
198
|
+
|
199
|
+
<ui-rest id="main" class="hidden">
|
200
|
+
<ui-tabbar>
|
201
|
+
<ui-before ></ui-before>
|
202
|
+
<ui-tab class="" data-tab="details" id="tabdetails">Graph</ui-tab>
|
203
|
+
<ui-tab class="inactive" data-tab="log" id="tablog" >Log</ui-tab>
|
204
|
+
<ui-behind ><a style='display:none' target='_blank' id='current-index'>E</a><a style='display:none' target='_blank' id='current-track'>T</a><a style='display:none' target='_blank' id='current-graph'>G</a></ui-behind>
|
205
|
+
</ui-tabbar>
|
206
|
+
<ui-content>
|
207
|
+
<ui-area data-belongs-to-tab="details" id='graphcolumn' oncontextmenu='return false'>
|
208
|
+
<div id='prompt_container' class="stand_alone">
|
209
|
+
<div id='prompt' contenteditable="true" title="Please enter your modelling instructions here... CTRL-ENTER or press '➤' to submit ..." placeholder="Please enter your modelling instructions here... CTRL-ENTER or press '➤' to submit ..."></div>
|
210
|
+
</div>
|
211
|
+
<div id='status'></div>
|
212
|
+
<div id='llm_params' class="multi">
|
213
|
+
<label id="llmlabel" for="llms">Choose LLM:</label>
|
214
|
+
<select name="llms" id="llms">
|
215
|
+
<option value="gemini-2.0-flash" selected>gemini 2 Flash</option>
|
216
|
+
<option value="gemini-2.5-flash-preview-05-20">gemini 2.5 Flash</option>
|
217
|
+
<option value="gemini-2.5-pro-preview-05-06">gemini 2.5 Pro</option>
|
218
|
+
<option value="gpt-4">gpt 4</option>
|
219
|
+
<option value="gpt-4o">gpt 4o</option>
|
220
|
+
<option value="gpt-4o-mini">gpt 4o mini</option>
|
221
|
+
</select>
|
222
|
+
<a id="savetext" href="" download=""></a>
|
223
|
+
<button id='generate_text_button' class='llm_button' title='show text generated from model in text area'>Show as Text</button>
|
224
|
+
<button id='generate_itext_button' class='llm_button' title='save text generated from model to file'>Save as Text</button>
|
225
|
+
</div>
|
226
|
+
<div><input id="loadtxt" accept=".txt" type="file"/></div>
|
227
|
+
<div id='prompt_submit_container' class="multi">
|
228
|
+
<button id='prompt_undo_button' class='llm_button' title='undo (reset to state before your last submit)'>⤺</button>
|
229
|
+
<button id='prompt_attach_button' class='llm_button' title='load text from (txt) file'>📎</button>
|
230
|
+
<button id='prompt_submit_button' class='llm_button' title='submit'>➤</button>
|
231
|
+
</div>
|
232
|
+
</ui-area>
|
233
|
+
<ui-resizehandle data-belongs-to-tab="details" data-label="drag to resize"></ui-resizehandle>
|
234
|
+
<ui-area data-belongs-to-tab="details" id="detailcolumn">
|
235
|
+
<div id="modelling">
|
236
|
+
<div id='graphgrid'>
|
237
|
+
<div class="resource-label" style="display: none"></div>
|
238
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
|
239
|
+
</div>
|
240
|
+
</div>
|
241
|
+
</ui-area>
|
242
|
+
<ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
|
243
|
+
<div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a> [<a style='display:none' target='_blank' id='shifted-log'>S</a>]</div>
|
244
|
+
<table id="dat_log" class="x-ui-layout"></table>
|
245
|
+
</ui-area> <!--}}}-->
|
246
|
+
</ui-content>
|
247
|
+
</ui-rest>
|
248
|
+
|
249
|
+
</body>
|
250
|
+
</html>
|
@@ -1,22 +1,8 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<testset xmlns="http://cpee.org/ns/properties/2.0">
|
3
3
|
<executionhandler>ruby</executionhandler>
|
4
|
-
<dataelements
|
5
|
-
|
6
|
-
<start>1741706229.7376199</start>
|
7
|
-
<substart>0.8481366634368896</substart>
|
8
|
-
<subend>2.062901735305786</subend>
|
9
|
-
<duration>69.02397441864014</duration>
|
10
|
-
<teams>{"CPEE-INSTANCE":"51480","CPEE-INSTANCE-URL":"https://cpee.org/flow/engine/51480","CPEE-INSTANCE-UUID":"61291a99-86a7-4396-8e0c-456728c60d09","CPEE-STATE":"finished","b":4,"end":1741703309.6717181,"start":1741703308.456953,"teams":["Eugen Rigger","Celine Mader","Nataliia Klievtsova","Juergen Mangler","David Williamson","Alan Joannidi","Dariusz Opoka","David Ellis","Martin Hintzen","Mark Mattimoe","Ekaterina Zhuravleva","Joanne Mailen","Andreas Schmid","Iain Wilkie","Luke Chan","Eliot Horsman","MEHDI FARIK","Nic Winter","Salim Akram","ROMAIN VIRY","CORINNE DELOR","YANN LISSILLOUR","Julian Chatwin","Gregor Mayr","Andreas Fussenegger","Alexandru Zloteanu","Clemens Neuner","Birthe Bittner","Jan Schrottenholzer","Michael Schoech","Jörg Linden","Peter John Keill","Tobias Jonk","Ralf Mueller","Peter Kovacs","Sara Mota","Ulrich Juergenschellert","Yi Ju","Sven Scharfe","Armando Hoedl","Fabienne Meier","Olaf Zalewski","Stefan Bildstein","Sebastian Schade","Tomi Walter","Pascal Wolf","Thibaut Escourrou","Peter Jezsoviczki","Felix Breuss","Thomas Kladensky","Hossam Haridy","Christoph Stadler","Jens Beecken","Bernhard Klocker"]}</teams>
|
11
|
-
</dataelements>
|
12
|
-
<endpoints>
|
13
|
-
<subprocess>https-post://cpee.org/flow/start/url/</subprocess>
|
14
|
-
<user>https-post://cpee.org/services/timeout-user.php</user>
|
15
|
-
<auto>https-post://cpee.org/services/timeout-auto.php</auto>
|
16
|
-
<timeout>https://cpee.org/services/timeout.php</timeout>
|
17
|
-
<send>https-post://cpee.org/ing/correlators/message/send/</send>
|
18
|
-
<receive>https-get://cpee.org/ing/correlators/message/receive/</receive>
|
19
|
-
</endpoints>
|
4
|
+
<dataelements/>
|
5
|
+
<endpoints/>
|
20
6
|
<attributes>
|
21
7
|
<guarded>none</guarded>
|
22
8
|
<modeltype>CPEE</modeltype>
|
@@ -8,8 +8,8 @@
|
|
8
8
|
<attributes>
|
9
9
|
<info>Worklist</info>
|
10
10
|
<modeltype>CPEE</modeltype>
|
11
|
-
<organisation1>http://cpee.org/~demo/orgviz/organisation_informatik.xml</organisation1>
|
12
11
|
<theme>extended</theme>
|
12
|
+
<organisation1>http://cpee.org/~demo/orgviz/organisation_informatik.xml</organisation1>
|
13
13
|
<creator>Christine Ashcreek</creator>
|
14
14
|
<author>Christine Ashcreek</author>
|
15
15
|
<design_stage>development</design_stage>
|
@@ -25,6 +25,7 @@
|
|
25
25
|
<form>https://cpee.org/~demo/form/form-f.html</form>
|
26
26
|
<role>Assistant</role>
|
27
27
|
<priority>42</priority>
|
28
|
+
<handling>single</handling>
|
28
29
|
<restrictions/>
|
29
30
|
<data>
|
30
31
|
<schaden>10000</schaden>
|
data/cockpit/themes/base.js
CHANGED
@@ -1249,7 +1249,7 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
1249
1249
|
var regassi = /data\.([a-zA-Z_]+)\s*(=[^=]|\+\=|\-\=|\*\=|\/\=|<<|>>)/g; // we do not have to check for >/< version of stuff as only conditions are in attributes, and conditions can not contain assignments
|
1250
1250
|
var reg_not_assi = /data\.([a-zA-Z_]+)\s*/g;
|
1251
1251
|
|
1252
|
-
$('call, loop[condition], alternative[condition]',node).each(function(i,n) {
|
1252
|
+
$('call, manipulate, loop[condition], alternative[condition]',node).each(function(i,n) {
|
1253
1253
|
let item = '';
|
1254
1254
|
if (n.hasAttribute('condition')) {
|
1255
1255
|
item = n.getAttribute('condition');
|
@@ -1257,12 +1257,17 @@ function WFAdaptorManifestationBase(adaptor) {
|
|
1257
1257
|
$('call > code > prepare',n).each(function(j,m){
|
1258
1258
|
item += m.textContent + '\n';
|
1259
1259
|
});
|
1260
|
+
if (n.nodeName == 'manipulate') { // css selector can not directly access manipulate
|
1261
|
+
item += n.textContent + '\n';
|
1262
|
+
}
|
1260
1263
|
$('call > parameters > arguments > *, call > code > finalize, call > code > update, call > code > rescue',n).each(function(j,m){
|
1264
|
+
console.log('aaa');
|
1261
1265
|
let x = m.textContent;
|
1262
1266
|
if (m.parentNode.nodeName == 'arguments' && x.charAt(0) != '!' ) { return }
|
1263
1267
|
item += x + '\n';
|
1264
1268
|
});
|
1265
1269
|
}
|
1270
|
+
console.log(item);
|
1266
1271
|
if (item == '') { return; }
|
1267
1272
|
|
1268
1273
|
let indices = [];
|
data/cockpit/track.html
CHANGED
@@ -139,9 +139,11 @@
|
|
139
139
|
<span id="state_text">loading ...</span>
|
140
140
|
</div>
|
141
141
|
</div>
|
142
|
-
<div id=
|
143
|
-
<div
|
144
|
-
|
142
|
+
<div id="modelling">
|
143
|
+
<div id='graphgrid'>
|
144
|
+
<div class="resource-label" style="display: none"></div>
|
145
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" id='graphcanvas' width='1' height='1'></svg>
|
146
|
+
</div>
|
145
147
|
</div>
|
146
148
|
</div>
|
147
149
|
<div id='trackcolumn'>
|
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.87"
|
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."
|
data/lib/cpee/implementation.rb
CHANGED
@@ -62,7 +62,6 @@ module CPEE
|
|
62
62
|
opts[:topics] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','topics.xml'))
|
63
63
|
opts[:properties_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.init'))
|
64
64
|
opts[:properties_empty] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.empty'))
|
65
|
-
opts[:transformation_service] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','transformation.xml'))
|
66
65
|
opts[:empty_dslx] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','empty_dslx.xml'))
|
67
66
|
opts[:notifications_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','notifications'))
|
68
67
|
opts[:states] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','states.xml'))
|
@@ -102,7 +101,7 @@ module CPEE
|
|
102
101
|
opts[:sse_keepalive_frequency] ||= 10
|
103
102
|
opts[:sse_connections] = {}
|
104
103
|
|
105
|
-
opts[:statemachine] = CPEE::StateMachine.new opts[:states]
|
104
|
+
opts[:statemachine] = CPEE::StateMachine.new opts[:states] do |id|
|
106
105
|
CPEE::Persistence::extract_item(id,opts,"state")
|
107
106
|
end
|
108
107
|
|
@@ -13,6 +13,7 @@
|
|
13
13
|
# <http://www.gnu.org/licenses/>.
|
14
14
|
|
15
15
|
require 'json'
|
16
|
+
require 'charlock_holmes'
|
16
17
|
require_relative 'fail'
|
17
18
|
|
18
19
|
module CPEE
|
@@ -78,30 +79,34 @@ module CPEE
|
|
78
79
|
opts = @a[1]
|
79
80
|
callback = @r[-1]
|
80
81
|
|
81
|
-
if
|
82
|
-
|
83
|
-
:'callback-end',
|
84
|
-
callback,
|
85
|
-
opts[:url],
|
86
|
-
id,
|
87
|
-
{},
|
88
|
-
{},
|
89
|
-
{},
|
90
|
-
opts[:redis]
|
91
|
-
)
|
92
|
-
elsif CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'vote'
|
93
|
-
CPEE::Message::send(
|
94
|
-
:'vote-response',
|
95
|
-
callback,
|
96
|
-
opts[:url],
|
97
|
-
id,
|
98
|
-
{},
|
99
|
-
{},
|
100
|
-
'true',
|
101
|
-
opts[:redis]
|
102
|
-
)
|
82
|
+
if opts[:statemachine].final? id
|
83
|
+
@status = 410
|
103
84
|
else
|
104
|
-
|
85
|
+
if CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'callback'
|
86
|
+
CPEE::Message::send(
|
87
|
+
:'callback-end',
|
88
|
+
callback,
|
89
|
+
opts[:url],
|
90
|
+
id,
|
91
|
+
{},
|
92
|
+
{},
|
93
|
+
{},
|
94
|
+
opts[:redis]
|
95
|
+
)
|
96
|
+
elsif CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'vote'
|
97
|
+
CPEE::Message::send(
|
98
|
+
:'vote-response',
|
99
|
+
callback,
|
100
|
+
opts[:url],
|
101
|
+
id,
|
102
|
+
{},
|
103
|
+
{},
|
104
|
+
'true',
|
105
|
+
opts[:redis]
|
106
|
+
)
|
107
|
+
else
|
108
|
+
@status = 404
|
109
|
+
end
|
105
110
|
end
|
106
111
|
nil
|
107
112
|
end
|
@@ -120,54 +125,58 @@ module CPEE
|
|
120
125
|
opts = @a[1]
|
121
126
|
callback = @r[-1]
|
122
127
|
|
123
|
-
if
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
128
|
+
if opts[:statemachine].final? id
|
129
|
+
@status = 410
|
130
|
+
else
|
131
|
+
if CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'callback'
|
132
|
+
ret = {}
|
133
|
+
ret['values'] = @p.map{ |e|
|
134
|
+
# bei complex wenn kleiner 500KiB statt e.value.path e.value.read
|
135
|
+
# bei complex wenn groesser 500KiB das file ueber nginx in einem verzeichnis verfuegbar machen, mimetype auf cpee/externallink
|
136
|
+
# aendert, link auf den server in den content. Der eval macht das dann direkt.
|
137
|
+
# Alt: [e.name, e.class == Riddl::Parameter::Simple ? [:simple,e.value] : [:complex,e.mimetype,e.value.path] ]
|
138
|
+
[
|
139
|
+
e.name,
|
140
|
+
if e.class == Riddl::Parameter::Simple
|
141
|
+
[:simple,e.value]
|
142
|
+
elsif e.class == Riddl::Parameter::Complex && e.value.size <= 512000
|
143
|
+
[:complex,e.mimetype,cleanup_encoding(e.value.read)]
|
144
|
+
else
|
145
|
+
# [:complex,'cpee-external-' + e.mimetype,cleanup_encoding(e.value.read)]
|
146
|
+
[:complex, e.mimetype,cleanup_encoding(e.value.read)]
|
147
|
+
end
|
148
|
+
]
|
149
|
+
}
|
150
|
+
ret['headers'] = @h
|
143
151
|
|
144
|
-
CPEE::Message::send(
|
145
|
-
:'callback-response',
|
146
|
-
callback,
|
147
|
-
opts[:url],
|
148
|
-
id,
|
149
|
-
{},
|
150
|
-
{},
|
151
|
-
ret,
|
152
|
-
opts[:redis]
|
153
|
-
)
|
154
|
-
elsif CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'vote'
|
155
|
-
if @p.length == 1 && @p[0].name == 'continue' && @p[0].class == Riddl::Parameter::Simple
|
156
152
|
CPEE::Message::send(
|
157
|
-
:'
|
153
|
+
:'callback-response',
|
158
154
|
callback,
|
159
155
|
opts[:url],
|
160
156
|
id,
|
161
157
|
{},
|
162
158
|
{},
|
163
|
-
|
159
|
+
ret,
|
164
160
|
opts[:redis]
|
165
161
|
)
|
162
|
+
elsif CPEE::Persistence::extract_item(id,opts,"callback/#{callback}/type") == 'vote'
|
163
|
+
if @p.length == 1 && @p[0].name == 'continue' && @p[0].class == Riddl::Parameter::Simple
|
164
|
+
CPEE::Message::send(
|
165
|
+
:'vote-response',
|
166
|
+
callback,
|
167
|
+
opts[:url],
|
168
|
+
id,
|
169
|
+
{},
|
170
|
+
{},
|
171
|
+
@p[0].value,
|
172
|
+
opts[:redis]
|
173
|
+
)
|
174
|
+
else
|
175
|
+
@status = 400
|
176
|
+
end
|
166
177
|
else
|
167
|
-
@status =
|
178
|
+
@status = 503
|
168
179
|
end
|
169
|
-
else
|
170
|
-
@status = 503
|
171
180
|
end
|
172
181
|
nil
|
173
182
|
end
|
@@ -126,19 +126,22 @@ module CPEE
|
|
126
126
|
def response
|
127
127
|
id = @a[0]
|
128
128
|
opts = @a[1]
|
129
|
+
if opts[:statemachine].final? id
|
130
|
+
@status = 410
|
131
|
+
else
|
132
|
+
key = @p[0].name == 'id' ? @p.shift.value : Digest::MD5.hexdigest(Kernel::rand().to_s)
|
133
|
+
url = @p[0].name == 'url' ? @p.shift.value : nil
|
134
|
+
values = []
|
135
|
+
while @p.length > 0
|
136
|
+
topic = @p.shift.value
|
137
|
+
base = @p.shift
|
138
|
+
type = base.name
|
139
|
+
values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
|
140
|
+
end
|
141
|
+
@header = CPEE::Persistence::set_handler(id,opts,key,url,values)
|
129
142
|
|
130
|
-
|
131
|
-
url = @p[0].name == 'url' ? @p.shift.value : nil
|
132
|
-
values = []
|
133
|
-
while @p.length > 0
|
134
|
-
topic = @p.shift.value
|
135
|
-
base = @p.shift
|
136
|
-
type = base.name
|
137
|
-
values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
|
143
|
+
Riddl::Parameter::Simple.new('key',key)
|
138
144
|
end
|
139
|
-
@header = CPEE::Persistence::set_handler(id,opts,key,url,values)
|
140
|
-
|
141
|
-
Riddl::Parameter::Simple.new('key',key)
|
142
145
|
end
|
143
146
|
end #}}}
|
144
147
|
|
@@ -148,18 +151,22 @@ module CPEE
|
|
148
151
|
opts = @a[1]
|
149
152
|
key = @r.last
|
150
153
|
|
151
|
-
if
|
152
|
-
|
153
|
-
values = []
|
154
|
-
while @p.length > 0
|
155
|
-
topic = @p.shift.value
|
156
|
-
base = @p.shift
|
157
|
-
type = base.name
|
158
|
-
values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
|
159
|
-
end
|
160
|
-
@header = CPEE::Persistence::set_handler(id,opts,key,url,values,true)
|
154
|
+
if opts[:statemachine].final? id
|
155
|
+
@status = 410
|
161
156
|
else
|
162
|
-
|
157
|
+
if CPEE::Persistence::exists_handler?(id,opts,key)
|
158
|
+
url = @p[0].name == 'url' ? @p.shift.value : nil
|
159
|
+
values = []
|
160
|
+
while @p.length > 0
|
161
|
+
topic = @p.shift.value
|
162
|
+
base = @p.shift
|
163
|
+
type = base.name
|
164
|
+
values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
|
165
|
+
end
|
166
|
+
@header = CPEE::Persistence::set_handler(id,opts,key,url,values,true)
|
167
|
+
else
|
168
|
+
@status = 404
|
169
|
+
end
|
163
170
|
end
|
164
171
|
end
|
165
172
|
end #}}}
|
@@ -174,10 +181,14 @@ module CPEE
|
|
174
181
|
opts = @a[1]
|
175
182
|
key = @r.last
|
176
183
|
|
177
|
-
if
|
178
|
-
|
184
|
+
if opts[:statemachine].final? id
|
185
|
+
@status = 410
|
179
186
|
else
|
180
|
-
|
187
|
+
if CPEE::Persistence::exists_handler?(id,opts,key)
|
188
|
+
DeleteSubscription::set(id,opts,key)
|
189
|
+
else
|
190
|
+
@status = 404
|
191
|
+
end
|
181
192
|
end
|
182
193
|
nil
|
183
194
|
end
|