cpee 2.0.1 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/js/instance.js +6 -1
- data/cockpit/model.html +1 -0
- data/cpee.gemspec +2 -2
- data/lib/cpee/implementation.rb +3 -2
- data/lib/cpee/implementation_properties.rb +6 -3
- data/server/resources/backend/run +1 -1
- data/tools/cpee +30 -6
- data/tools/server/resources/notifications/logging/subscription.xml +13 -1
- data/tools/server/resources/properties.init +16 -15
- metadata +2 -5
- data/tools/instantiation/instantiation +0 -23
- data/tools/server/resources/notifications/logging/consumer-secret +0 -1
- data/tools/server/resources/notifications/logging/producer-secret +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 892345432ec66be6bde99413fae6a0b212bbfb0dda125d73baaca1f3d7dd316d
|
4
|
+
data.tar.gz: 8eb06548d37bae0609def5a8fee6a3bdddfd99a7c3c08820ae21f6adeed5469f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cb92676128eecf6cd2e7d294accbd5c7b691f34ac9b9371d388348600f0e98f1eeff8ec72b71edaf2573167a58539078e84e088c111c1ac5fd828205ea35d7b
|
7
|
+
data.tar.gz: f08abbc9c2543f0799a608051b8d87e29b81e9175e7fec8ee3265296b2a2451aabf4894271fd1a1a0b09133cca113c4b740899f99b35cf91bbbf0ed1fa238d94
|
data/cockpit/js/instance.js
CHANGED
@@ -784,7 +784,7 @@ function save_testsetfile() {// {{{
|
|
784
784
|
var def = new $.Deferred();
|
785
785
|
def.done(function(name,testset) {
|
786
786
|
var ct = new Date();
|
787
|
-
$('#savetestsetfile').attr('download',name + '
|
787
|
+
$('#savetestsetfile').attr('download',name + '.xml');
|
788
788
|
$('#savetestsetfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(testset.serializePrettyXML()));
|
789
789
|
document.getElementById('savetestsetfile').click();
|
790
790
|
});
|
@@ -811,6 +811,11 @@ function get_testset(deferred) {// {{{
|
|
811
811
|
$('testset > dslx',testset).remove();
|
812
812
|
testset.append($X('<transformation xmlns="http://cpee.org/ns/properties/2.0"><description type="copy"/><dataelements type="none"/><endpoints type="none"/></transformation>'));
|
813
813
|
var name = $('testset > attributes > info',testset).text();
|
814
|
+
$('[xmlns]',testset).each((idx,ele) => {
|
815
|
+
if (ele.parentNode.namespaceURI == ele.getAttribute('xmlns')) {
|
816
|
+
ele.removeAttribute('xmlns');
|
817
|
+
}
|
818
|
+
});
|
814
819
|
deferred.resolve(name,testset);
|
815
820
|
},
|
816
821
|
error: function() { deferred.reject(); report_failure(); }
|
data/cockpit/model.html
CHANGED
@@ -33,6 +33,7 @@
|
|
33
33
|
<script type="text/javascript" src="/js_libs/underscore.min.js"></script>
|
34
34
|
<script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
|
35
35
|
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
36
|
+
|
36
37
|
<script type="text/javascript" src="/js_libs/relaxngui.js"></script>
|
37
38
|
|
38
39
|
<script type="text/javascript" src="/js_libs/ui.js"></script>
|
data/cpee.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.0.
|
3
|
+
s.version = "2.0.7"
|
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."
|
7
7
|
|
8
8
|
s.description = "see http://cpee.org"
|
9
9
|
|
10
|
-
s.files = Dir['{example/**/*,server/**/*,tools/**/*,lib/**/*,cockpit/**/*,cockpit/themes/*/*/*,contrib/logo*,contrib/Screen*}'] - Dir['{server/instances/**/*,cockpit/js_libs/**/*}'] + %w(COPYING FEATURES.md INSTALL.md Rakefile cpee.gemspec README.md AUTHORS)
|
10
|
+
s.files = Dir['{example/**/*,server/**/*,tools/**/*,tools/archive,lib/**/*,cockpit/**/*,cockpit/themes/*/*/*,contrib/logo*,contrib/Screen*}'] - Dir['{server/instances/**/*,cockpit/js_libs/**/*}'] + %w(COPYING FEATURES.md INSTALL.md Rakefile cpee.gemspec README.md AUTHORS)
|
11
11
|
s.require_path = 'lib'
|
12
12
|
s.extra_rdoc_files = ['README.md']
|
13
13
|
s.bindir = 'tools'
|
data/lib/cpee/implementation.rb
CHANGED
@@ -259,12 +259,13 @@ module CPEE
|
|
259
259
|
opts = @a[0]
|
260
260
|
redis = opts[:redis]
|
261
261
|
id = @r[0].to_i
|
262
|
-
unless redis.exists("instance:#{id}/state")
|
262
|
+
unless redis.exists?("instance:#{id}/state")
|
263
263
|
@status = 404
|
264
264
|
return
|
265
265
|
end
|
266
|
+
empt = redis.keys("instance:#{id}/*").to_a
|
266
267
|
redis.multi do |multi|
|
267
|
-
multi.del
|
268
|
+
multi.del empt
|
268
269
|
multi.zrem 'instances', id
|
269
270
|
end
|
270
271
|
end
|
@@ -215,13 +215,16 @@ module CPEE
|
|
215
215
|
case state
|
216
216
|
when 'running'
|
217
217
|
CPEE::Persistence::write_instance id, opts
|
218
|
-
pid = Kernel.spawn(exe , :out => exe + '.out', :err => exe + '.err')
|
219
|
-
File.write(exe + '.pid',pid)
|
218
|
+
pid = Kernel.spawn(exe , :pgroup => true, :in => '/dev/null', :out => exe + '.out', :err => exe + '.err')
|
220
219
|
Process.detach pid
|
220
|
+
File.write(exe + '.pid',pid)
|
221
221
|
when 'stopping'
|
222
222
|
pid = File.read(exe + '.pid') rescue nil
|
223
|
-
if pid
|
223
|
+
if pid && (Process.kill(0, pid.to_i) rescue false)
|
224
224
|
Process.kill('HUP', pid.to_i) rescue nil
|
225
|
+
else
|
226
|
+
File.unlink(exe + '.pid') rescue nil
|
227
|
+
PutState::set id, opts, 'stopped'
|
225
228
|
end
|
226
229
|
else
|
227
230
|
### Most probably this is never needed. Lets see.
|
data/tools/cpee
CHANGED
@@ -30,7 +30,7 @@ end
|
|
30
30
|
ARGV.options { |opt|
|
31
31
|
opt.summary_indent = ' ' * 2
|
32
32
|
opt.summary_width = 15
|
33
|
-
opt.banner = "Usage:\n#{opt.summary_indent}#{File.basename($0)} [options] ui | cpui DIR | new DIR | archive DIR URL | start URL | delete! URL | abandon URL\n"
|
33
|
+
opt.banner = "Usage:\n#{opt.summary_indent}#{File.basename($0)} [options] convert | ui | cpui DIR | new DIR | archive DIR URL | start URL | delete! URL | abandon URL\n"
|
34
34
|
opt.on("Options:")
|
35
35
|
opt.on("--help", "-h", "This text") { puts opt; exit }
|
36
36
|
opt.on("")
|
@@ -47,10 +47,12 @@ ARGV.options { |opt|
|
|
47
47
|
opt.on(wrap("[cpui DIR] scaffolds a sample html client. New versions might require manual merging if you changed something."))
|
48
48
|
opt.on("")
|
49
49
|
opt.on(wrap("[ui] starts a simple static web server with the ui on http://localhost:8080. Use [cpui DIR] if you want stuff in apache or nginx."))
|
50
|
+
opt.on("")
|
51
|
+
opt.on(wrap("[convert] converts all testsets in the current directory to cpee2"))
|
50
52
|
opt.parse!
|
51
53
|
}
|
52
54
|
if (ARGV.length == 0) ||
|
53
|
-
(ARGV.length == 1 && ARGV[0]
|
55
|
+
(ARGV.length == 1 && !(%w(ui convert).include?(ARGV[0]))) ||
|
54
56
|
(ARGV.length == 2 && !(%w(abandon start delete! cpui new).include?(ARGV[0]))) ||
|
55
57
|
(ARGV.length == 3 && ARGV[0] != 'archive') ||
|
56
58
|
(ARGV.length > 3)
|
@@ -99,6 +101,29 @@ elsif command == 'cpui'
|
|
99
101
|
puts "Directory already exists."
|
100
102
|
end
|
101
103
|
end
|
104
|
+
elsif command == 'convert'
|
105
|
+
Dir['*.xml'].each do |f|
|
106
|
+
XML::Smart.modify(f) do |doc|
|
107
|
+
doc.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
|
108
|
+
doc.register_namespace 'p', 'http://riddl.org/ns/common-patterns/properties/1.0'
|
109
|
+
doc.register_namespace 'x', 'http://cpee.org/ns/properties/2.0'
|
110
|
+
if doc.root.qname.name == 'testset'
|
111
|
+
doc.root.namespaces[nil] = 'http://cpee.org/ns/properties/2.0'
|
112
|
+
doc.root.namespace = nil
|
113
|
+
|
114
|
+
doc.find('//x:start_url').each do |e|
|
115
|
+
e.text = 'https://centurio.work/flow-test/start/url/'
|
116
|
+
end rescue nil
|
117
|
+
doc.find('//x:start_git').each do |e|
|
118
|
+
e.text = 'https://centurio.work/flow-test/start/git/'
|
119
|
+
end rescue nil
|
120
|
+
|
121
|
+
doc.find('//p:*').each do |e|
|
122
|
+
e.namespaces.delete_all!
|
123
|
+
end rescue nil
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
102
127
|
elsif command == 'archive'
|
103
128
|
p2 = File.join(p2,'*') if p2 =~ /([a-zA-Z]|\/)$/
|
104
129
|
base = File.dirname(p2)
|
@@ -139,11 +164,12 @@ elsif command == 'archive'
|
|
139
164
|
prop = Typhoeus.get(File.join(base,name.to_s,'properties','/'))
|
140
165
|
if prop.success?
|
141
166
|
xprop = XML::Smart::string(prop.response_body)
|
142
|
-
xprop.register_namespace 'p', 'http://
|
167
|
+
xprop.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
|
143
168
|
if ["finished","abandoned"].include?(xprop.find("string(/p:properties/p:state)"))
|
144
169
|
uuid = xprop.find("string(/p:properties/p:attributes/p:uuid)")
|
145
170
|
id = name.to_s
|
146
171
|
File.write(File.join(p1,uuid + '.xml'),prop.response_body) if prop.headers['Content-Type'] =~ /^(text|application)\/xml/
|
172
|
+
p File.join(base,name.to_s,'/')
|
147
173
|
Typhoeus.delete(File.join(base,name.to_s,'/'))
|
148
174
|
end
|
149
175
|
end
|
@@ -220,6 +246,7 @@ elsif command == 'delete!'
|
|
220
246
|
elsif command == 'new'
|
221
247
|
if !File.exists?(p1)
|
222
248
|
FileUtils.cp_r("#{curpath}/server/",p1)
|
249
|
+
FileUtils.mkdir("#{p1}/archive") rescue nil
|
223
250
|
FileUtils.mkdir("#{p1}/instances") rescue nil
|
224
251
|
FileUtils.mkdir("#{p1}/resources") rescue nil
|
225
252
|
FileUtils.mkdir("#{p1}/handlerwrappers") rescue nil
|
@@ -230,9 +257,6 @@ elsif command == 'new'
|
|
230
257
|
cont.gsub!(/{CPEEWORKINGDIR}/,"#{File.realpath(p1)}")
|
231
258
|
cont.gsub!(/{CPEESERVER}/,"#{File.realpath(p1)}/server")
|
232
259
|
File.write("#{p1}/#{nam}",cont)
|
233
|
-
p f
|
234
|
-
p nam
|
235
|
-
p "#{p1}/#{nam}"
|
236
260
|
end
|
237
261
|
else
|
238
262
|
puts 'Directory already exists.'
|
@@ -1,7 +1,19 @@
|
|
1
|
-
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/
|
1
|
+
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/2.0" url="http://localhost:9299/">
|
2
2
|
<topic id="activity">
|
3
3
|
<event>calling</event>
|
4
4
|
<event>receiving</event>
|
5
5
|
<event>done</event>
|
6
6
|
</topic>
|
7
|
+
<topic id="dataelements">
|
8
|
+
<event>change</event>
|
9
|
+
</topic>
|
10
|
+
<topic id="endpoints">
|
11
|
+
<event>change</event>
|
12
|
+
</topic>
|
13
|
+
<topic id="attributes">
|
14
|
+
<event>change</event>
|
15
|
+
</topic>
|
16
|
+
<topic id="task">
|
17
|
+
<event>instantiation</event>
|
18
|
+
</topic>
|
7
19
|
</subscription>
|
@@ -2,40 +2,41 @@
|
|
2
2
|
<!--
|
3
3
|
This file is part of CPEE.
|
4
4
|
|
5
|
-
CPEE is free software: you can redistribute it and/or modify it under the
|
6
|
-
of the GNU General Public License as published by the Free Software
|
7
|
-
either version 3 of the License, or (at your option) any later
|
5
|
+
CPEE is free software: you can redistribute it and/or modify it under the
|
6
|
+
terms of the GNU General Public License as published by the Free Software
|
7
|
+
Foundation, either version 3 of the License, or (at your option) any later
|
8
|
+
version.
|
8
9
|
|
9
10
|
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
10
11
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
11
12
|
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
12
13
|
|
13
14
|
You should have received a copy of the GNU General Public License along with
|
14
|
-
CPEE (file COPYING in the main directory).
|
15
|
+
CPEE (file COPYING in the main directory). If not, see
|
15
16
|
<http://www.gnu.org/licenses/>.
|
16
17
|
-->
|
17
18
|
|
18
|
-
<properties xmlns="http://
|
19
|
-
<
|
20
|
-
|
21
|
-
<
|
22
|
-
<
|
23
|
-
</
|
24
|
-
<state>ready</state>
|
19
|
+
<properties xmlns="http://cpee.org/ns/properties/2.0">
|
20
|
+
<state changed="1970-01-01T00:00:00+00:00">ready</state>
|
21
|
+
<status>
|
22
|
+
<id>0</id>
|
23
|
+
<message>undefined</message>
|
24
|
+
</status>
|
25
25
|
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
26
26
|
<positions/>
|
27
27
|
<dataelements/>
|
28
28
|
<endpoints>
|
29
29
|
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
30
30
|
</endpoints>
|
31
|
+
<attributes>
|
32
|
+
<info/>
|
33
|
+
<modeltype>CPEE</modeltype>
|
34
|
+
<theme>preset</theme>
|
35
|
+
</attributes>
|
31
36
|
<dsl/>
|
32
37
|
<dslx>
|
33
38
|
<description xmlns="http://cpee.org/ns/description/1.0"/>
|
34
39
|
</dslx>
|
35
|
-
<status>
|
36
|
-
<id>0</id>
|
37
|
-
<message>undefined</message>
|
38
|
-
</status>
|
39
40
|
<description>
|
40
41
|
<description xmlns="http://cpee.org/ns/description/1.0"/>
|
41
42
|
</description>
|
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.0.
|
4
|
+
version: 2.0.7
|
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: 2020-10-
|
13
|
+
date: 2020-10-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -508,9 +508,6 @@ files:
|
|
508
508
|
- server/routing/persist.rb
|
509
509
|
- server/server.rb
|
510
510
|
- tools/cpee
|
511
|
-
- tools/instantiation/instantiation
|
512
|
-
- tools/server/resources/notifications/logging/consumer-secret
|
513
|
-
- tools/server/resources/notifications/logging/producer-secret
|
514
511
|
- tools/server/resources/notifications/logging/subscription.xml
|
515
512
|
- tools/server/resources/properties.init
|
516
513
|
- tools/server/server.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
require 'rubygems'
|
3
|
-
require 'cpee/instantiation'
|
4
|
-
|
5
|
-
options = {
|
6
|
-
:host => 'localhost',
|
7
|
-
:port => 9296,
|
8
|
-
:secure => false
|
9
|
-
# :secure_options => {
|
10
|
-
# :private_key_file => '',
|
11
|
-
# :cert_chain_file => '',
|
12
|
-
# :verify_peer => false
|
13
|
-
# }
|
14
|
-
}
|
15
|
-
|
16
|
-
Riddl::Server.new(CPEE::Instantiation::SERVER, options) do
|
17
|
-
accessible_description true
|
18
|
-
cross_site_xhr true
|
19
|
-
|
20
|
-
@riddl_opts[:cpee] ||= 'http://localhost:8298/'
|
21
|
-
|
22
|
-
use CPEE::Instantiation::implementation(@riddl_opts)
|
23
|
-
end.loop!
|
@@ -1 +0,0 @@
|
|
1
|
-
f7c77861ac613eeac8fb9829c9a545a2
|
@@ -1 +0,0 @@
|
|
1
|
-
2a24d172b1aeb05fe94fdc5e095dec32
|