cpee-worklist 1.0.19 → 1.0.21

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06b0d5dfd91cdcb6096eb347897b655c2aaabc38401e90d3df063ef52c26f8dd
4
- data.tar.gz: dbdb4b029ba6efe558f402518058e605cc556f1a19f46e519f495c7961029174
3
+ metadata.gz: 829230e05700e3690314636b97718b8ce3f93d75e544efc5977dc5ec6e6a71c2
4
+ data.tar.gz: 1ef8e72be3ed60a2cf3b7ce9f2be8a41357bdf0509219552ca5fced72f51ba87
5
5
  SHA512:
6
- metadata.gz: 7bdee2fb8c40d77622c5c5d08845b51f7e7e4bb659ff2384447c5807baa48504605ed788bdac675b1281b17cc79c1537aba8c603fe82b601c0b38f94b34ebe51
7
- data.tar.gz: e234e10ea4a283d5806006d43c284c65be71665c5497588db430b07d852228407af8a139e47e807d88fb92d4c8e4c86936da8337b00a463fc0fed0c103710fb4
6
+ metadata.gz: 6bb1e150e8174ce17592093bda91b86d531711458aee10f31fc4b9ed2c2acb49461e82547064fd44389bc4897251e227893d7eb313074cd2081046c1b3ea8e3a
7
+ data.tar.gz: 7a4fd5d1dfc77f786e00eee33da828ed7a827f6bd19d4bb77b77968c20f4bfacd80391f0aee98620cc2ad0cc319bfd688f05e45b0684e4ee1036f14b7ea2d5b2
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-worklist"
3
- s.version = "1.0.19"
3
+ s.version = "1.0.21"
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)"
@@ -63,17 +63,32 @@ module CPEE
63
63
  controller = @a[0]
64
64
 
65
65
  activity = {}
66
- activity['process'] = @h.keys.include?('CPEE_ATTR_INFO') ? "#{@h['CPEE_ATTR_INFO']} (#{@h['CPEE_INSTANCE'].split('/').last})" : "DUMMY PROCESS (#{@h['CPEE_INSTANCE'].split('/').last})"
67
- activity['label'] = @h.keys.include?('CPEE_INSTANCE') ? "#{@h['CPEE_LABEL']}" : 'DUMMY LABEL'
68
- activity['user'] = []
69
- activity['url'] = @h['CPEE_CALLBACK']
70
- activity['id'] = @h['CPEE_CALLBACK_ID']
66
+ if @h.keys.include?('CPEE_INSTANCE')
67
+ activity['process'] = @h.keys.include?('CPEE_ATTR_INFO') ? "#{@h['CPEE_ATTR_INFO']} (#{@h['CPEE_INSTANCE'].split('/').last})" : "DUMMY PROCESS (#{@h['CPEE_INSTANCE'].split('/').last})"
68
+ activity['label'] = @h.keys.include?('CPEE_INSTANCE') ? "#{@h['CPEE_LABEL']}" : 'DUMMY LABEL'
69
+ activity['user'] = []
70
+ activity['url'] = @h['CPEE_CALLBACK']
71
+ activity['id'] = @h['CPEE_CALLBACK_ID']
72
+
73
+ activity['cpee_activity_id'] = @h['CPEE_ACTIVITY']
74
+ activity['cpee_base'] = @h['CPEE_BASE']
75
+ activity['cpee_instance'] = @h['CPEE_INSTANCE']
76
+
77
+ activity['uuid'] = @h['CPEE_ATTR_UUID']
78
+ else
79
+ activity['process'] = @h.keys.include?('P_NAME') ? "#{@h['P_NAME']} (#{@h['P_INSTANCE']})" : "DUMMY PROCESS (#{@h['P_INSTANCE']})"
80
+ activity['label'] = @h.keys.include?('A_LABEL') ? "#{@h['A_LABEL']}" : 'DUMMY LABEL'
81
+ activity['user'] = []
82
+ activity['id'] = @h['A_CALLBACK']
83
+ activity['id'] = SecureRandom.uuid if @h['A_CALLBACK'].nil? || @h['A_CALLBACK'].strip == ''
84
+ activity['url'] = "https://cpee.org/callbacks/#{activity['id']}/"
71
85
 
72
- activity['cpee_activity_id'] = @h['CPEE_ACTIVITY']
73
- activity['cpee_base'] = @h['CPEE_BASE']
74
- activity['cpee_instance'] = @h['CPEE_INSTANCE']
86
+ activity['cpee_activity_id'] = ''
87
+ activity['cpee_base'] = ''
88
+ activity['cpee_instance'] = ''
75
89
 
76
- activity['uuid'] = @h['CPEE_ATTR_UUID']
90
+ activity['uuid'] = @h['P_INSTANCE'] || SecureRandom.uuid
91
+ end
77
92
 
78
93
  omo = @p.shift.value
79
94
  activity['orgmodel'] = @h[ 'CPEE_ATTR_' + omo.upcase] || omo
@@ -92,7 +107,7 @@ module CPEE
92
107
  activity['deadline'] = @p.first.name == 'deadline' ? ((Time.now + ChronicDuration.parse(@p.shift.value)) rescue nil): nil
93
108
  activity['restrictions'] = []
94
109
  rests = JSON::parse(@p.shift.value) rescue nil
95
- activity['restrictions'] += rests unless rests.nil?
110
+ activity['restrictions'] += rests unless rests.nil? || rests.empty?
96
111
  if @p.first.name == 'prioritization'
97
112
  val = @p.shift.value
98
113
  activity['prioritization'] = (JSON::parse(val) rescue val.gsub(/[\[\]()<>"']/,'').split(/\s*[,;]\s*/))
@@ -368,11 +383,10 @@ module CPEE
368
383
 
369
384
  ### set redis_cmd to nil if you want to do global
370
385
  ### at least redis_path or redis_url and redis_db have to be set if you do global
371
- opts[:redis_path] ||= 'redis.sock' # use e.g. /tmp/redis.sock for global stuff. Look it up in your redis config
372
386
  opts[:redis_db] ||= 0
373
- ### optional redis stuff
374
- opts[:redis_url] ||= nil
375
- opts[:redis_cmd] ||= 'redis-server --port 0 --unixsocket #redis_path# --unixsocketperm 600 --pidfile #redis_pid# --dir #redis_db_dir# --dbfilename #redis_db_name# --databases 1 --save 900 1 --save 300 10 --save 60 10000 --rdbcompression yes --daemonize yes'
387
+ opts[:redis_url] ||= 'unix://redis.sock' # sadly we have to do this for now
388
+ opts[:redis_unixsocket] ||= true
389
+ opts[:redis_cmd] ||= 'redis-server --port #redis_port# --unixsocket #redis_path# --unixsocketperm 600 --pidfile #redis_pid# --dir #redis_db_dir# --dbfilename #redis_db_name# --databases 1 --save 900 1 --save 300 10 --save 60 10000 --rdbcompression yes --daemonize yes --protected-mode no'
376
390
  opts[:redis_pid] ||= 'redis.pid' # use e.g. /var/run/redis.pid if you do global. Look it up in your redis config
377
391
  opts[:redis_db_name] ||= 'redis.rdb' # use e.g. /var/lib/redis.rdb for global stuff. Look it up in your redis config
378
392
 
@@ -36,7 +36,9 @@
36
36
  <data type="string"/>
37
37
  </element>
38
38
  </zeroOrMore>
39
- <ref name="permissions"/>
39
+ <optional>
40
+ <ref name="permissions"/>
41
+ </optional>
40
42
  </define>
41
43
 
42
44
  <define name="subjects">
@@ -116,7 +116,7 @@
116
116
  </attribute>
117
117
  <data type="string"/>
118
118
  </element>
119
- </oneOrMore>
119
+ </zeroOrMore>
120
120
  </element>
121
121
  </zeroOrMore>
122
122
  </element>
data/ui/js/structured.js CHANGED
@@ -290,7 +290,7 @@ function do_work(taskid,taskidurl) { //{{{
290
290
  url: res.form,
291
291
  dataType: 'text',
292
292
  success: async (iform) => {
293
- let end = false;;
293
+ let end = false;
294
294
  let evaltext = '';
295
295
  let rel = res.form.match(/.*\//)[0];
296
296
 
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.19
4
+ version: 1.0.21
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-07-08 00:00:00.000000000 Z
13
+ date: 1980-01-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.6.2
139
+ rubygems_version: 3.6.9
140
140
  specification_version: 4
141
141
  summary: Worklist for the cloud process execution engine (cpee.org)
142
142
  test_files: []