cpee-worklist 1.0.18 → 1.0.19
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/cpee-worklist.gemspec +2 -2
- data/lib/cpee-worklist/implementation.rb +7 -3
- data/lib/cpee-worklist/routing/end.rb +1 -1
- data/lib/cpee-worklist/routing/forward-events.rb +1 -1
- data/lib/cpee-worklist/routing/forward-votes.rb +1 -1
- data/tools/cpee-worklist +14 -0
- data/ui/container.html +45 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06b0d5dfd91cdcb6096eb347897b655c2aaabc38401e90d3df063ef52c26f8dd
|
4
|
+
data.tar.gz: dbdb4b029ba6efe558f402518058e605cc556f1a19f46e519f495c7961029174
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bdee2fb8c40d77622c5c5d08845b51f7e7e4bb659ff2384447c5807baa48504605ed788bdac675b1281b17cc79c1537aba8c603fe82b601c0b38f94b34ebe51
|
7
|
+
data.tar.gz: e234e10ea4a283d5806006d43c284c65be71665c5497588db430b07d852228407af8a139e47e807d88fb92d4c8e4c86936da8337b00a463fc0fed0c103710fb4
|
data/cpee-worklist.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee-worklist"
|
3
|
-
s.version = "1.0.
|
3
|
+
s.version = "1.0.19"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3.0-or-later"
|
6
6
|
s.summary = "Worklist for the cloud process execution engine (cpee.org)"
|
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
|
23
23
|
s.add_runtime_dependency 'riddl', '~> 1.0'
|
24
24
|
s.add_runtime_dependency 'json', '~> 2.1'
|
25
|
-
s.add_runtime_dependency 'cpee', '~> 2.1', '>= 2.1.
|
25
|
+
s.add_runtime_dependency 'cpee', '~> 2.1', '>= 2.1.88'
|
26
26
|
s.add_runtime_dependency 'chronic_duration', '~> 0.10', '>= 0.10.6'
|
27
27
|
end
|
@@ -25,6 +25,7 @@ require 'riddl/utils/fileserve'
|
|
25
25
|
require 'cpee/redis'
|
26
26
|
require 'cpee/message'
|
27
27
|
require 'cpee/persistence'
|
28
|
+
require 'cpee/statemachine'
|
28
29
|
require 'cpee/attributes_helper'
|
29
30
|
require 'cpee/implementation_notifications'
|
30
31
|
require 'cpee/implementation_callbacks'
|
@@ -91,7 +92,7 @@ module CPEE
|
|
91
92
|
activity['deadline'] = @p.first.name == 'deadline' ? ((Time.now + ChronicDuration.parse(@p.shift.value)) rescue nil): nil
|
92
93
|
activity['restrictions'] = []
|
93
94
|
rests = JSON::parse(@p.shift.value) rescue nil
|
94
|
-
activity['restrictions']
|
95
|
+
activity['restrictions'] += rests unless rests.nil?
|
95
96
|
if @p.first.name == 'prioritization'
|
96
97
|
val = @p.shift.value
|
97
98
|
activity['prioritization'] = (JSON::parse(val) rescue val.gsub(/[\[\]()<>"']/,'').split(/\s*[,;]\s*/))
|
@@ -163,7 +164,7 @@ module CPEE
|
|
163
164
|
activity = @a[0].activities[index]
|
164
165
|
if !force && activity['collected'] && (activity['collected'] + 1) < activity['collect_max']
|
165
166
|
activity['collected'] += 1
|
166
|
-
activity['restrictions'] << { "
|
167
|
+
activity['restrictions'] << { "mode" => "prohibit", "id" => @r[-3] }
|
167
168
|
@a[0].activities.serialize
|
168
169
|
@a[0].notify('user/finish', :callback_id => activity['id'], :user => @r[-3], :role => activity['role'], :instance_uuid => activity['uuid'], :cpee_callback => activity['url'], :cpee_instance => activity['cpee_instance'], :cpee_base => activity['cpee_base'], :cpee_label => activity['label'], :cpee_activity => activity['cpee_activity_id'], :orgmodel => activity['orgmodel'])
|
169
170
|
elsif !force && activity['handling'] == 'always'
|
@@ -237,7 +238,8 @@ module CPEE
|
|
237
238
|
@a[0].activities.each do |activity|
|
238
239
|
restrict = false
|
239
240
|
activity['restrictions'].each do |restriction|
|
240
|
-
|
241
|
+
restriction = restriction[0] if restriction.is_a? Array
|
242
|
+
restrict = true if restriction['mode'] == 'prohibit' && restriction['id'] == @r[-2]
|
241
243
|
end
|
242
244
|
if (
|
243
245
|
activity['role']=='*' ||
|
@@ -381,6 +383,8 @@ module CPEE
|
|
381
383
|
opts[:sse_keepalive_frequency] ||= 10
|
382
384
|
opts[:sse_connections] = {}
|
383
385
|
|
386
|
+
opts[:statemachine] = CPEE::DummyStateMachine.new
|
387
|
+
|
384
388
|
opts[:finalize_frequency] ||= 10
|
385
389
|
|
386
390
|
CPEE::Message::set_workers(1)
|
@@ -41,7 +41,7 @@ Daemonite.new do |opts|
|
|
41
41
|
on.pmessage do |pat, what, message|
|
42
42
|
_, worker, key = what.split(':',3)
|
43
43
|
index = message.index(' ')
|
44
|
-
instance = message[0...index]
|
44
|
+
instance, uuid = message[0...index].split(',')
|
45
45
|
opts[:redis].multi do |multi|
|
46
46
|
multi.srem("worklist:#{instance}/callbacks",key)
|
47
47
|
multi.del("worklist:#{instance}/callback/#{key}/uuid")
|
@@ -41,7 +41,7 @@ Daemonite.new do |opts|
|
|
41
41
|
on.pmessage do |pat, what, message|
|
42
42
|
index = message.index(' ')
|
43
43
|
mess = message[index+1..-1]
|
44
|
-
instance = message[0...index]
|
44
|
+
instance, uuid = message[0...index].split(',')
|
45
45
|
type, worker, event = what.split(':',3)
|
46
46
|
topic = ::File::dirname(event)
|
47
47
|
name = ::File::basename(event)
|
@@ -67,7 +67,7 @@ Daemonite.new do |opts|
|
|
67
67
|
on.pmessage do |pat, what, message|
|
68
68
|
index = message.index(' ')
|
69
69
|
mess = message[index+1..-1]
|
70
|
-
instance = message[0...index]
|
70
|
+
instance, uuid = message[0...index].split(',')
|
71
71
|
type, worker, event = what.split(':',3)
|
72
72
|
topic = ::File::dirname(event)
|
73
73
|
name = ::File::basename(event)
|
data/tools/cpee-worklist
CHANGED
@@ -101,6 +101,20 @@ elsif command == 'filter'
|
|
101
101
|
puts "#{ele.attributes['callback_id']}; #{ele.attributes['cpee_label']}; #{ele.attributes['cpee_instance']}"
|
102
102
|
end
|
103
103
|
end
|
104
|
+
elsif command == 'delete_f'
|
105
|
+
if p1 !~ /^http/ || ARGV[2] !~ /^\w+=/
|
106
|
+
puts ARGV.options
|
107
|
+
exit
|
108
|
+
end
|
109
|
+
wl = File.join(p1,'/')
|
110
|
+
res = Typhoeus.get(wl)
|
111
|
+
pname, pkey = ARGV[2].split('=',2)
|
112
|
+
if res.success?
|
113
|
+
doc = XML::Smart.string(res.body)
|
114
|
+
doc.find("/tasks/task[@#{pname}=\"#{pkey}\"]").each do |ele|
|
115
|
+
Typhoeus.delete File.join(wl,'tasks',ele.attributes['callback_id'])
|
116
|
+
end
|
117
|
+
end
|
104
118
|
elsif command == 'filter_a'
|
105
119
|
if p1 !~ /^http/
|
106
120
|
puts ARGV.options
|
data/ui/container.html
CHANGED
@@ -35,6 +35,51 @@
|
|
35
35
|
<script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
|
36
36
|
<script type="text/javascript" src="/js_libs/marked.min.js"></script>
|
37
37
|
|
38
|
+
<script>
|
39
|
+
function load_script(src) {
|
40
|
+
// Initialize scripts queue
|
41
|
+
if (load_script.scripts === undefined) {
|
42
|
+
load_script.scripts = [];
|
43
|
+
load_script.index = -1;
|
44
|
+
load_script.loading = false;
|
45
|
+
load_script.next = function() {
|
46
|
+
if (load_script.loading) return;
|
47
|
+
|
48
|
+
// Load the next queue item
|
49
|
+
load_script.loading = true;
|
50
|
+
var item = load_script.scripts[++load_script.index];
|
51
|
+
var head = document.getElementsByTagName('head')[0];
|
52
|
+
var script = document.createElement('script');
|
53
|
+
script.type = 'text/javascript';
|
54
|
+
script.src = item.src;
|
55
|
+
// When complete, start next item in queue and resolve this item's promise
|
56
|
+
script.onload = () => {
|
57
|
+
load_script.loading = false;
|
58
|
+
if( load_script.index < load_script.scripts.length - 1 ) load_script.next();
|
59
|
+
item.resolve();
|
60
|
+
};
|
61
|
+
head.appendChild(script);
|
62
|
+
};
|
63
|
+
};
|
64
|
+
|
65
|
+
// Adding a script to the queue
|
66
|
+
if (src) {
|
67
|
+
// Check if already added
|
68
|
+
for (var i=0; i < load_script.scripts.length; i++) {
|
69
|
+
if( load_script.scripts[i].src == src ) return load_script.scripts[i].promise;
|
70
|
+
}
|
71
|
+
// Add to the queue
|
72
|
+
var item = { src: src };
|
73
|
+
item.promise = new Promise(resolve => {item.resolve = resolve;});
|
74
|
+
load_script.scripts.push(item);
|
75
|
+
load_script.next();
|
76
|
+
}
|
77
|
+
|
78
|
+
// Return the promise of the last queue item
|
79
|
+
return load_script.scripts[ load_script.scripts.length - 1 ].promise;
|
80
|
+
};
|
81
|
+
</script>
|
82
|
+
|
38
83
|
<link rel="stylesheet" href="css/container.css" type="text/css"/>
|
39
84
|
</head>
|
40
85
|
<body is='x-ui-'></body>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee-worklist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
- Nataliia Klievtsova
|
11
11
|
bindir: tools
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-07-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: riddl
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '2.1'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 2.1.
|
52
|
+
version: 2.1.88
|
53
53
|
type: :runtime
|
54
54
|
prerelease: false
|
55
55
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '2.1'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 2.1.
|
62
|
+
version: 2.1.88
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: chronic_duration
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|