cpee 1.4.20 → 1.4.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 +4 -4
- data/cpee.gemspec +1 -1
- data/lib/cpee/instantiation.rb +27 -13
- data/lib/instantiation.xml +1 -1
- data/log/logs/0a499c6f-397b-4ead-9528-8ce4190d5e8c.xes.yaml +138 -0
- data/log/logs/0eec6f24-d5f5-4f07-9125-b1985854e96c.xes.yaml +191 -0
- data/log/logs/17532e92-8e6e-4c91-bfa9-28817e42faee.xes.yaml +138 -0
- data/log/logs/30811b7d-3df6-40db-a284-31518fadce0d.xes.yaml +171 -0
- data/log/logs/453d4ae8-cf7c-4377-8ef3-5f47f7d6801e.xes.yaml +138 -0
- data/log/logs/49197119-b437-4bc0-8c57-b7e065945dd1.xes.yaml +171 -0
- data/log/logs/4ae75f71-e8ef-4a31-8fa6-3692267d8def.xes.yaml +130 -0
- data/log/logs/53d4ff20-041f-4255-a424-085848ebcad6.xes.yaml +211 -0
- data/log/logs/5d775fd6-fef7-46a9-94e4-139a2ea133ad.xes.yaml +171 -0
- data/log/logs/726f0d7b-7aa6-4281-89c6-6f233c28e09f.xes.yaml +195 -0
- data/log/logs/802f619e-d8de-4ff8-8ae5-bffe585179e9.xes.yaml +130 -0
- data/log/logs/83f11c93-40b1-4cbd-846e-57dc20b91e2d.xes.yaml +130 -0
- data/log/logs/93b6290b-4915-42a2-9857-0a791ad3b5e3.xes.yaml +179 -0
- data/log/logs/9945e0ce-f02b-4e38-8fe7-25c573f29fb7.xes.yaml +138 -0
- data/log/logs/9e32e3e9-fbef-45d4-90e2-61138d4eb88b.xes.yaml +171 -0
- data/log/logs/9f32c451-e05d-43a0-bb6d-515f1168d3ee.xes.yaml +179 -0
- data/log/logs/a6bbd56f-96d6-4ed4-928d-f4980b80e107.xes.yaml +130 -0
- data/log/logs/a7b9a45d-ae4b-4b2b-b9a0-5212d5d360d0.xes.yaml +138 -0
- data/log/logs/ad9f1f9c-b727-44cc-afce-e6c98815b639.xes.yaml +171 -0
- data/log/logs/b27668d3-e39b-490f-9137-76c59eb6e00b.xes.yaml +171 -0
- data/log/logs/bf9cab2c-9e55-49b5-8f70-5f0611d71ec0.xes.yaml +171 -0
- data/log/logs/d1d2e9ce-7806-47cc-a9f3-569f3d9cad90.xes.yaml +130 -0
- data/log/logs/d8624a1e-11de-4b1c-806a-9cdd5f808043.xes.yaml +130 -0
- data/log/logs/ed8d4536-6b41-4252-bad5-bf4a7d9df4f1.xes.yaml +130 -0
- data/log/logs/f2d4ab8e-edc4-4fd7-980a-95562fb90466.xes.yaml +130 -0
- data/log/logs/feb3c50b-a8db-4641-bbfd-8a081f59f16a.xes.yaml +179 -0
- data/log/sic.rb +45 -35
- data/log/template.xes_yaml +1 -1
- data/log/xes_yaml.pid +1 -1
- data/log/xes_yaml.rb +18 -18
- data/server/handlerwrappers/default.rb +4 -4
- data/server/instances/15/notifications/logging/consumer-secret +1 -0
- data/server/instances/15/notifications/logging/producer-secret +1 -0
- data/server/instances/15/notifications/logging/subscription.xml +16 -0
- data/server/instances/15/properties.xml +97 -0
- data/server/instances/16/notifications/51f2da0a2b51743cd8f434eada2428c6/consumer-secret +1 -0
- data/server/instances/16/notifications/51f2da0a2b51743cd8f434eada2428c6/producer-secret +1 -0
- data/server/instances/16/notifications/51f2da0a2b51743cd8f434eada2428c6/subscription.xml +5 -0
- data/server/instances/16/notifications/logging/consumer-secret +1 -0
- data/server/instances/16/notifications/logging/producer-secret +1 -0
- data/server/instances/16/notifications/logging/subscription.xml +16 -0
- data/server/instances/16/properties.xml +80 -0
- data/server/instances/17/notifications/logging/consumer-secret +1 -0
- data/server/instances/17/notifications/logging/producer-secret +1 -0
- data/server/instances/17/notifications/logging/subscription.xml +16 -0
- data/server/instances/17/properties.xml +97 -0
- data/server/instances/18/notifications/75330e9851bd351c8ae656a9b83c6465/consumer-secret +1 -0
- data/server/instances/18/notifications/75330e9851bd351c8ae656a9b83c6465/producer-secret +1 -0
- data/server/instances/18/notifications/75330e9851bd351c8ae656a9b83c6465/subscription.xml +5 -0
- data/server/instances/18/notifications/logging/consumer-secret +1 -0
- data/server/instances/18/notifications/logging/producer-secret +1 -0
- data/server/instances/18/notifications/logging/subscription.xml +16 -0
- data/server/instances/18/properties.xml +78 -0
- data/server/instances/19/notifications/aaef45f88e70f4036f1753a69229665b/consumer-secret +1 -0
- data/server/instances/19/notifications/aaef45f88e70f4036f1753a69229665b/producer-secret +1 -0
- data/server/instances/19/notifications/aaef45f88e70f4036f1753a69229665b/subscription.xml +5 -0
- data/server/instances/19/notifications/logging/consumer-secret +1 -0
- data/server/instances/19/notifications/logging/producer-secret +1 -0
- data/server/instances/19/notifications/logging/subscription.xml +16 -0
- data/server/instances/19/properties.xml +78 -0
- data/server/instances/20/notifications/5773d11316827873826f7e749a037709/consumer-secret +1 -0
- data/server/instances/20/notifications/5773d11316827873826f7e749a037709/producer-secret +1 -0
- data/server/instances/20/notifications/5773d11316827873826f7e749a037709/subscription.xml +5 -0
- data/server/instances/20/notifications/logging/consumer-secret +1 -0
- data/server/instances/20/notifications/logging/producer-secret +1 -0
- data/server/instances/20/notifications/logging/subscription.xml +16 -0
- data/server/instances/20/properties.xml +80 -0
- data/server/instances/21/notifications/logging/consumer-secret +1 -0
- data/server/instances/21/notifications/logging/producer-secret +1 -0
- data/server/instances/21/notifications/logging/subscription.xml +16 -0
- data/server/instances/21/properties.xml +97 -0
- data/server/instances/22/notifications/30d677fd9e2842193d276833377b9fba/consumer-secret +1 -0
- data/server/instances/22/notifications/30d677fd9e2842193d276833377b9fba/producer-secret +1 -0
- data/server/instances/22/notifications/30d677fd9e2842193d276833377b9fba/subscription.xml +5 -0
- data/server/instances/22/notifications/logging/consumer-secret +1 -0
- data/server/instances/22/notifications/logging/producer-secret +1 -0
- data/server/instances/22/notifications/logging/subscription.xml +16 -0
- data/server/instances/22/properties.xml +80 -0
- data/server/instances/23/notifications/logging/consumer-secret +1 -0
- data/server/instances/23/notifications/logging/producer-secret +1 -0
- data/server/instances/23/notifications/logging/subscription.xml +16 -0
- data/server/instances/23/properties.xml +97 -0
- data/server/instances/24/notifications/28f2189ca56cd2427efdfc57eb905e5f/consumer-secret +1 -0
- data/server/instances/24/notifications/28f2189ca56cd2427efdfc57eb905e5f/producer-secret +1 -0
- data/server/instances/24/notifications/28f2189ca56cd2427efdfc57eb905e5f/subscription.xml +5 -0
- data/server/instances/24/notifications/logging/consumer-secret +1 -0
- data/server/instances/24/notifications/logging/producer-secret +1 -0
- data/server/instances/24/notifications/logging/subscription.xml +16 -0
- data/server/instances/24/properties.xml +80 -0
- data/server/instances/25/notifications/logging/consumer-secret +1 -0
- data/server/instances/25/notifications/logging/producer-secret +1 -0
- data/server/instances/25/notifications/logging/subscription.xml +19 -0
- data/server/instances/25/properties.xml +97 -0
- data/server/instances/26/notifications/9a21be44b099502673e1cd8af3dba479/consumer-secret +1 -0
- data/server/instances/26/notifications/9a21be44b099502673e1cd8af3dba479/producer-secret +1 -0
- data/server/instances/26/notifications/9a21be44b099502673e1cd8af3dba479/subscription.xml +5 -0
- data/server/instances/26/notifications/logging/consumer-secret +1 -0
- data/server/instances/26/notifications/logging/producer-secret +1 -0
- data/server/instances/26/notifications/logging/subscription.xml +19 -0
- data/server/instances/26/properties.xml +80 -0
- data/server/instances/27/notifications/logging/consumer-secret +1 -0
- data/server/instances/27/notifications/logging/producer-secret +1 -0
- data/server/instances/27/notifications/logging/subscription.xml +19 -0
- data/server/instances/27/properties.xml +97 -0
- data/server/instances/28/notifications/bd82af4386830cdad3e253de3ee5e516/consumer-secret +1 -0
- data/server/instances/28/notifications/bd82af4386830cdad3e253de3ee5e516/producer-secret +1 -0
- data/server/instances/28/notifications/bd82af4386830cdad3e253de3ee5e516/subscription.xml +5 -0
- data/server/instances/28/notifications/logging/consumer-secret +1 -0
- data/server/instances/28/notifications/logging/producer-secret +1 -0
- data/server/instances/28/notifications/logging/subscription.xml +19 -0
- data/server/instances/28/properties.xml +80 -0
- data/server/instances/29/notifications/logging/consumer-secret +1 -0
- data/server/instances/29/notifications/logging/producer-secret +1 -0
- data/server/instances/29/notifications/logging/subscription.xml +19 -0
- data/server/instances/29/properties.xml +97 -0
- data/server/instances/30/notifications/74684c7d5ea89b47200503597c6a8d3c/consumer-secret +1 -0
- data/server/instances/30/notifications/74684c7d5ea89b47200503597c6a8d3c/producer-secret +1 -0
- data/server/instances/30/notifications/74684c7d5ea89b47200503597c6a8d3c/subscription.xml +5 -0
- data/server/instances/30/notifications/logging/consumer-secret +1 -0
- data/server/instances/30/notifications/logging/producer-secret +1 -0
- data/server/instances/30/notifications/logging/subscription.xml +19 -0
- data/server/instances/30/properties.xml +80 -0
- data/server/instances/31/notifications/logging/consumer-secret +1 -0
- data/server/instances/31/notifications/logging/producer-secret +1 -0
- data/server/instances/31/notifications/logging/subscription.xml +19 -0
- data/server/instances/31/properties.xml +97 -0
- data/server/instances/32/notifications/4e9c27a373f77e02b36be6cc2164a1f8/consumer-secret +1 -0
- data/server/instances/32/notifications/4e9c27a373f77e02b36be6cc2164a1f8/producer-secret +1 -0
- data/server/instances/32/notifications/4e9c27a373f77e02b36be6cc2164a1f8/subscription.xml +5 -0
- data/server/instances/32/notifications/logging/consumer-secret +1 -0
- data/server/instances/32/notifications/logging/producer-secret +1 -0
- data/server/instances/32/notifications/logging/subscription.xml +19 -0
- data/server/instances/32/properties.xml +80 -0
- data/server/instances/33/notifications/logging/consumer-secret +1 -0
- data/server/instances/33/notifications/logging/producer-secret +1 -0
- data/server/instances/33/notifications/logging/subscription.xml +19 -0
- data/server/instances/33/properties.xml +97 -0
- data/server/instances/34/notifications/76ac875c4d221cd3492e481a81182e94/consumer-secret +1 -0
- data/server/instances/34/notifications/76ac875c4d221cd3492e481a81182e94/producer-secret +1 -0
- data/server/instances/34/notifications/76ac875c4d221cd3492e481a81182e94/subscription.xml +5 -0
- data/server/instances/34/notifications/logging/consumer-secret +1 -0
- data/server/instances/34/notifications/logging/producer-secret +1 -0
- data/server/instances/34/notifications/logging/subscription.xml +19 -0
- data/server/instances/34/properties.xml +80 -0
- data/server/instances/35/notifications/logging/consumer-secret +1 -0
- data/server/instances/35/notifications/logging/producer-secret +1 -0
- data/server/instances/35/notifications/logging/subscription.xml +19 -0
- data/server/instances/35/properties.xml +94 -0
- data/server/instances/36/notifications/7c50d7013f5632adb8b32689620c3213/consumer-secret +1 -0
- data/server/instances/36/notifications/7c50d7013f5632adb8b32689620c3213/producer-secret +1 -0
- data/server/instances/36/notifications/7c50d7013f5632adb8b32689620c3213/subscription.xml +5 -0
- data/server/instances/36/notifications/logging/consumer-secret +1 -0
- data/server/instances/36/notifications/logging/producer-secret +1 -0
- data/server/instances/36/notifications/logging/subscription.xml +19 -0
- data/server/instances/36/properties.xml +80 -0
- data/server/instances/37/notifications/logging/consumer-secret +1 -0
- data/server/instances/37/notifications/logging/producer-secret +1 -0
- data/server/instances/37/notifications/logging/subscription.xml +19 -0
- data/server/instances/37/properties.xml +97 -0
- data/server/instances/38/notifications/a9d9ef3e82d5f1864534198e12f8ca05/consumer-secret +1 -0
- data/server/instances/38/notifications/a9d9ef3e82d5f1864534198e12f8ca05/producer-secret +1 -0
- data/server/instances/38/notifications/a9d9ef3e82d5f1864534198e12f8ca05/subscription.xml +5 -0
- data/server/instances/38/notifications/logging/consumer-secret +1 -0
- data/server/instances/38/notifications/logging/producer-secret +1 -0
- data/server/instances/38/notifications/logging/subscription.xml +19 -0
- data/server/instances/38/properties.xml +80 -0
- data/server/instances/39/notifications/logging/consumer-secret +1 -0
- data/server/instances/39/notifications/logging/producer-secret +1 -0
- data/server/instances/39/notifications/logging/subscription.xml +19 -0
- data/server/instances/39/properties.xml +97 -0
- data/server/instances/40/notifications/08a43a729b46ae851f586a0db118a4b3/consumer-secret +1 -0
- data/server/instances/40/notifications/08a43a729b46ae851f586a0db118a4b3/producer-secret +1 -0
- data/server/instances/40/notifications/08a43a729b46ae851f586a0db118a4b3/subscription.xml +5 -0
- data/server/instances/40/notifications/logging/consumer-secret +1 -0
- data/server/instances/40/notifications/logging/producer-secret +1 -0
- data/server/instances/40/notifications/logging/subscription.xml +19 -0
- data/server/instances/40/properties.xml +80 -0
- data/server/instances/41/notifications/logging/consumer-secret +1 -0
- data/server/instances/41/notifications/logging/producer-secret +1 -0
- data/server/instances/41/notifications/logging/subscription.xml +19 -0
- data/server/instances/41/properties.xml +97 -0
- data/server/instances/42/notifications/c5602688252fb056a3b7a6dd803d74b4/consumer-secret +1 -0
- data/server/instances/42/notifications/c5602688252fb056a3b7a6dd803d74b4/producer-secret +1 -0
- data/server/instances/42/notifications/c5602688252fb056a3b7a6dd803d74b4/subscription.xml +5 -0
- data/server/instances/42/notifications/logging/consumer-secret +1 -0
- data/server/instances/42/notifications/logging/producer-secret +1 -0
- data/server/instances/42/notifications/logging/subscription.xml +19 -0
- data/server/instances/42/properties.xml +80 -0
- data/server/instances/43/notifications/d8166e6e1c8500ac36978bbb7fa8f48f/consumer-secret +1 -0
- data/server/instances/43/notifications/d8166e6e1c8500ac36978bbb7fa8f48f/producer-secret +1 -0
- data/server/instances/{13/notifications/90d34985542a88c3071d176f6400efe7 → 43/notifications/d8166e6e1c8500ac36978bbb7fa8f48f}/subscription.xml +0 -0
- data/server/instances/43/notifications/logging/consumer-secret +1 -0
- data/server/instances/43/notifications/logging/producer-secret +1 -0
- data/server/instances/43/notifications/logging/subscription.xml +19 -0
- data/server/instances/43/properties.xml +97 -0
- data/server/instances/44/notifications/d03545ffb17a6eddf84fd4cd88423295/consumer-secret +1 -0
- data/server/instances/44/notifications/d03545ffb17a6eddf84fd4cd88423295/producer-secret +1 -0
- data/server/instances/44/notifications/d03545ffb17a6eddf84fd4cd88423295/subscription.xml +5 -0
- data/server/instances/44/notifications/logging/consumer-secret +1 -0
- data/server/instances/44/notifications/logging/producer-secret +1 -0
- data/server/instances/44/notifications/logging/subscription.xml +19 -0
- data/server/instances/44/properties.xml +80 -0
- data/server/resources/notifications/logging/subscription.xml +3 -0
- metadata +199 -10
- data/log/display.rb +0 -46
- data/server/instances/13/notifications/90d34985542a88c3071d176f6400efe7/consumer-secret +0 -1
- data/server/instances/13/notifications/90d34985542a88c3071d176f6400efe7/producer-secret +0 -1
- data/server/instances/9/notifications/e242ccf30f3878511aaf390e20e42d5d/consumer-secret +0 -1
- data/server/instances/9/notifications/e242ccf30f3878511aaf390e20e42d5d/producer-secret +0 -1
- data/server/instances/9/notifications/e242ccf30f3878511aaf390e20e42d5d/subscription.xml +0 -38
- data/server/server.pid +0 -1
data/log/sic.rb
CHANGED
|
@@ -1,51 +1,61 @@
|
|
|
1
1
|
#!/usr/bin/ruby
|
|
2
2
|
require 'yaml'
|
|
3
3
|
require 'typhoeus'
|
|
4
|
+
require 'stringio'
|
|
4
5
|
require 'xml/smart'
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# list:
|
|
12
|
-
# data_receiver:
|
|
13
|
-
# - name: dataelements
|
|
14
|
-
# mimetype: application/json
|
|
15
|
-
# data:
|
|
16
|
-
# CPEE-INSTANCE: https://centurio.work/flow/engine/547
|
|
17
|
-
# qr: "*269MFA466*TZHZE 000"
|
|
18
|
-
# queue: ''
|
|
19
|
-
# machine: MaxxTurn45
|
|
20
|
-
# program: _N_LOWERHOUSING2_MPF
|
|
21
|
-
# label: Lowerhousing Turn 2
|
|
22
|
-
# finished: no good
|
|
23
|
-
# time:timestamp: '2019-01-16T11:24:41.162+01:00'
|
|
24
|
-
|
|
25
|
-
def follow(fname,deep=0)
|
|
26
|
-
io = File.open(fname)
|
|
7
|
+
def follow(fname,io,deep=0)
|
|
8
|
+
if ARGV[1] == 'copy'
|
|
9
|
+
File.write(File.basename(fname,'.xes.yaml') + '.xes.yaml',io.read)
|
|
10
|
+
io.rewind
|
|
11
|
+
end
|
|
27
12
|
YAML.load_stream(io) do |e|
|
|
28
13
|
if name = e.dig('log','trace','cpee:name')
|
|
29
|
-
|
|
30
|
-
puts " " * deep + name + " (#{File.basename(fname,'.xes.yaml')})"
|
|
14
|
+
puts " " * deep + name + " (#{File.basename(fname,'.xes.yaml')}) - #{e.dig('log','trace','concept:name')}"
|
|
31
15
|
end
|
|
32
16
|
if e.dig('event','concept:endpoint') == 'https://centurio.work/flow/start/url/' && e.dig('event','cpee:lifecycle:transition') == 'activity/receiving'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
base = e.dig('event','list','data_receiver',0,'data')
|
|
18
|
+
val = base.dig('CPEE-INSTANCE') rescue nil
|
|
19
|
+
if val.nil?
|
|
20
|
+
val = File.basename(base)
|
|
21
|
+
end
|
|
22
|
+
uuid = base.dig('CPEE-INSTANCE-UUID') rescue nil
|
|
23
|
+
unless uuid
|
|
24
|
+
res = Typhoeus.get(File.join('https://centurio.work/flow/engine/',val,'/properties/values/attributes/uuid/'))
|
|
25
|
+
if res.success?
|
|
26
|
+
uuid = XML::Smart.string(res.body).find('string(/*)')
|
|
27
|
+
end
|
|
38
28
|
end
|
|
29
|
+
next unless ((base.dig('CPEE-STATE') == 'running' || (base.dig('CPEE-FORKED') == 'true')) rescue true)
|
|
30
|
+
|
|
31
|
+
react File.dirname(fname) + "/#{uuid}.xes.yaml",deep + 2
|
|
39
32
|
end
|
|
40
33
|
end
|
|
41
34
|
end
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
if
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
def react(name,deep=0)
|
|
37
|
+
if name =~ /^https?:\/\//
|
|
38
|
+
res = Typhoeus.get(name)
|
|
39
|
+
if res.success?
|
|
40
|
+
file = Tempfile.new('sic')
|
|
41
|
+
file.write(res.body)
|
|
42
|
+
file.rewind
|
|
43
|
+
follow name, file, deep
|
|
44
|
+
file.close
|
|
45
|
+
file.unlink
|
|
46
|
+
end
|
|
47
|
+
elsif File.exists? name
|
|
48
|
+
follow name, File.open(name), deep
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def help
|
|
53
|
+
puts 'Views or copies log file trees to current directory.'
|
|
48
54
|
puts
|
|
49
|
-
puts '
|
|
50
|
-
puts '
|
|
55
|
+
puts ' View: sic.rb https://centurio.work/log/865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml'
|
|
56
|
+
puts ' Copy: sic.rb https://centurio.work/log/865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml copy'
|
|
57
|
+
puts ' Copy: sic.rb ~/Projects/cpee/log/logs/865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml copy'
|
|
58
|
+
puts ' View: sic.rb 865916c6-2b18-4e9d-81d4-0fab0df248f4.xes.yaml'
|
|
51
59
|
end
|
|
60
|
+
|
|
61
|
+
react(ARGV[0]) || help
|
data/log/template.xes_yaml
CHANGED
data/log/xes_yaml.pid
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7611
|
data/log/xes_yaml.rb
CHANGED
|
@@ -22,7 +22,7 @@ class Logging < Riddl::Implementation #{{{
|
|
|
22
22
|
log["log"]["trace"]["cpee:uuid"] ||= notification['instance_uuid'] if notification["instance_uuid"]
|
|
23
23
|
File.open(File.join(log_dir,uuid+'.xes.yaml'),'w'){|f| f.puts log.to_yaml} unless File.exists? File.join(log_dir,uuid+'.xes.yaml')
|
|
24
24
|
event = {}
|
|
25
|
-
event["
|
|
25
|
+
event["concept:instance"] = instancenr
|
|
26
26
|
event["concept:name"] = notification["label"] if notification["label"]
|
|
27
27
|
if notification["endpoint"]
|
|
28
28
|
event["concept:endpoint"] = notification["endpoint"]
|
|
@@ -39,26 +39,26 @@ class Logging < Riddl::Implementation #{{{
|
|
|
39
39
|
end
|
|
40
40
|
event["cpee:lifecycle:transition"] = "#{topic}/#{event_name}"
|
|
41
41
|
data_send = ((parameters["arguments"].nil? ? [] : parameters["arguments"]) rescue [])
|
|
42
|
-
event["
|
|
42
|
+
event["data"] = {"data_send" => data_send} unless data_send.empty?
|
|
43
43
|
if notification['changed']&.any?
|
|
44
|
-
if event.has_key? "
|
|
45
|
-
event["
|
|
44
|
+
if event.has_key? "data"
|
|
45
|
+
event["data"]["data_changed"] ||= notification['changed']
|
|
46
46
|
else
|
|
47
|
-
event["
|
|
47
|
+
event["data"] = {"data_changer" => notification['changed']}
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
if notification['values']&.any?
|
|
51
|
-
if event.has_key? "
|
|
52
|
-
event["
|
|
51
|
+
if event.has_key? "data"
|
|
52
|
+
event["data"]["data_values"] ||= notification['values']
|
|
53
53
|
else
|
|
54
|
-
event["
|
|
54
|
+
event["data"] = {"data_values" => notification['values']}
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
|
-
|
|
58
|
-
if event.has_key? "
|
|
59
|
-
event["
|
|
57
|
+
unless receiving&.empty?
|
|
58
|
+
if event.has_key? "data"
|
|
59
|
+
event["data"]["data_received"] ||= receiving
|
|
60
60
|
else
|
|
61
|
-
event["
|
|
61
|
+
event["data"] = {"data_receiver" => receiving}
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
event["time:timestamp"]= event['cpee:timestamp'] || Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z")
|
|
@@ -69,12 +69,12 @@ class Logging < Riddl::Implementation #{{{
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def response
|
|
72
|
-
topic
|
|
73
|
-
event_name
|
|
74
|
-
log_dir
|
|
75
|
-
template
|
|
76
|
-
instancenr
|
|
77
|
-
notification
|
|
72
|
+
topic = @p[1].value
|
|
73
|
+
event_name = @p[2].value
|
|
74
|
+
log_dir = @a[0]
|
|
75
|
+
template = @a[1]
|
|
76
|
+
instancenr = @h['CPEE_INSTANCE_URL'].split('/').last
|
|
77
|
+
notification = JSON.parse(@p[3].value)
|
|
78
78
|
doc topic, event_name, log_dir, template, instancenr, notification
|
|
79
79
|
end
|
|
80
80
|
end #}}}
|
|
@@ -87,7 +87,10 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
87
87
|
|
|
88
88
|
raise "Could not #{parameters[:method] || 'post'} #{@handler_endpoint} - status: #{status}: #{result&.dig(0)&.value&.read}" if status < 200 || status >= 300
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
if headers['CPEE_INSTANTIATION']
|
|
91
|
+
@controller.notify("task/instantiation", :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
|
92
|
+
end
|
|
93
|
+
unless headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true'
|
|
91
94
|
callback result
|
|
92
95
|
end
|
|
93
96
|
else
|
|
@@ -208,9 +211,6 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
208
211
|
def callback(result=nil,options={})
|
|
209
212
|
@controller.notify("activity/receiving", :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated, :sensors => @sensors)
|
|
210
213
|
result = simplify_result(result)
|
|
211
|
-
if options['CPEE_INSTANTIATION']
|
|
212
|
-
@controller.notify("task/instantiation", :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
|
213
|
-
end
|
|
214
214
|
if options['CPEE_UPDATE']
|
|
215
215
|
@handler_returnValue = result
|
|
216
216
|
if options['CPEE_UPDATE_STATUS']
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f7c77861ac613eeac8fb9829c9a545a2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a24d172b1aeb05fe94fdc5e095dec32
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://localhost:9299/">
|
|
2
|
+
<topic id="activity">
|
|
3
|
+
<event>calling</event>
|
|
4
|
+
<event>receiving</event>
|
|
5
|
+
<event>done</event>
|
|
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
|
+
</subscription>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
|
2
|
+
<attributes>
|
|
3
|
+
<uuid>ad9f1f9c-b727-44cc-afce-e6c98815b639</uuid>
|
|
4
|
+
<info>Subprocess</info>
|
|
5
|
+
<modeltype>CPEE</modeltype>
|
|
6
|
+
<theme>default</theme>
|
|
7
|
+
<customer>pilotfabrik</customer>
|
|
8
|
+
<status>development</status>
|
|
9
|
+
</attributes>
|
|
10
|
+
<state changed="2019-02-13T16:33:09+01:00">finished</state>
|
|
11
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
|
12
|
+
<positions/>
|
|
13
|
+
<dataelements>
|
|
14
|
+
<instance>16</instance>
|
|
15
|
+
<res>{"CPEE-INSTANCE":"16","CPEE-INSTANCE-URL":"http://localhost:8298/16","CPEE-INSTANCE-UUID":"83f11c93-40b1-4cbd-846e-57dc20b91e2d","CPEE-STATE":"finished","a":17}</res>
|
|
16
|
+
</dataelements>
|
|
17
|
+
<endpoints>
|
|
18
|
+
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
|
19
|
+
<instantiate>http://localhost:9296/url/</instantiate>
|
|
20
|
+
</endpoints>
|
|
21
|
+
<dsl>call :a1, :instantiate, parameters: { :label => "Take 5", :method => :post, :arguments => [⭐(:name => :info, :value => "Take Time"), ⭐(:name => :behavior, :value => "wait_running"), ⭐(:name => :url, :value => "http://localhost/testsets/Take_5.xml"), ⭐(:name => :init, :value => "{ \"a\": 3 }")] }, finalize: <<-END
|
|
22
|
+
data.instance = result['CPEE-INSTANCE']
|
|
23
|
+
data.res = result
|
|
24
|
+
END
|
|
25
|
+
</dsl>
|
|
26
|
+
<dslx>
|
|
27
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
28
|
+
<call id="a1" endpoint="instantiate">
|
|
29
|
+
<parameters>
|
|
30
|
+
<label>Take 5</label>
|
|
31
|
+
<method>:post</method>
|
|
32
|
+
<arguments>
|
|
33
|
+
<info>Take Time</info>
|
|
34
|
+
<behavior>wait_running</behavior>
|
|
35
|
+
<url>http://localhost/testsets/Take_5.xml</url>
|
|
36
|
+
<init>
|
|
37
|
+
<a>3</a>
|
|
38
|
+
</init>
|
|
39
|
+
</arguments>
|
|
40
|
+
</parameters>
|
|
41
|
+
<finalize output="result">data.instance = result['CPEE-INSTANCE']
|
|
42
|
+
data.res = result</finalize>
|
|
43
|
+
<update output="result"/>
|
|
44
|
+
<_timing>
|
|
45
|
+
<_timing_min/>
|
|
46
|
+
<_timing_max/>
|
|
47
|
+
<_timing_avg/>
|
|
48
|
+
</_timing>
|
|
49
|
+
<_notes>
|
|
50
|
+
<_notes_general/>
|
|
51
|
+
<_notes_output/>
|
|
52
|
+
<_attachments/>
|
|
53
|
+
</_notes>
|
|
54
|
+
</call>
|
|
55
|
+
</description>
|
|
56
|
+
</dslx>
|
|
57
|
+
<status>
|
|
58
|
+
<id>0</id>
|
|
59
|
+
<message>undefined</message>
|
|
60
|
+
</status>
|
|
61
|
+
<description>
|
|
62
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
63
|
+
<call id="a1" endpoint="instantiate">
|
|
64
|
+
<parameters>
|
|
65
|
+
<label>Take 5</label>
|
|
66
|
+
<method>:post</method>
|
|
67
|
+
<arguments>
|
|
68
|
+
<info>Take Time</info>
|
|
69
|
+
<behavior>wait_running</behavior>
|
|
70
|
+
<url>http://localhost/testsets/Take_5.xml</url>
|
|
71
|
+
<init>
|
|
72
|
+
<a>3</a>
|
|
73
|
+
</init>
|
|
74
|
+
</arguments>
|
|
75
|
+
</parameters>
|
|
76
|
+
<finalize output="result">data.instance = result['CPEE-INSTANCE']
|
|
77
|
+
data.res = result</finalize>
|
|
78
|
+
<update output="result"/>
|
|
79
|
+
<_timing>
|
|
80
|
+
<_timing_min/>
|
|
81
|
+
<_timing_max/>
|
|
82
|
+
<_timing_avg/>
|
|
83
|
+
</_timing>
|
|
84
|
+
<_notes>
|
|
85
|
+
<_notes_general/>
|
|
86
|
+
<_notes_output/>
|
|
87
|
+
<_attachments/>
|
|
88
|
+
</_notes>
|
|
89
|
+
</call>
|
|
90
|
+
</description>
|
|
91
|
+
</description>
|
|
92
|
+
<transformation>
|
|
93
|
+
<description type="copy"/>
|
|
94
|
+
<dataelements type="none"/>
|
|
95
|
+
<endpoints type="none"/>
|
|
96
|
+
</transformation>
|
|
97
|
+
</properties>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0dcbe562b94bc1e86c3c6089acbf1815
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d54bd85058400d7d3bd9b1709052b91c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f7c77861ac613eeac8fb9829c9a545a2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a24d172b1aeb05fe94fdc5e095dec32
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://localhost:9299/">
|
|
2
|
+
<topic id="activity">
|
|
3
|
+
<event>calling</event>
|
|
4
|
+
<event>receiving</event>
|
|
5
|
+
<event>done</event>
|
|
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
|
+
</subscription>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
|
2
|
+
<attributes>
|
|
3
|
+
<uuid>83f11c93-40b1-4cbd-846e-57dc20b91e2d</uuid>
|
|
4
|
+
<info>Take Time</info>
|
|
5
|
+
<modeltype>CPEE</modeltype>
|
|
6
|
+
<theme>default</theme>
|
|
7
|
+
<customer>pilotfabrik</customer>
|
|
8
|
+
<status>development</status>
|
|
9
|
+
</attributes>
|
|
10
|
+
<state changed="2019-02-13T16:33:09+01:00">finished</state>
|
|
11
|
+
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
|
12
|
+
<positions/>
|
|
13
|
+
<dataelements>
|
|
14
|
+
<a>17</a>
|
|
15
|
+
</dataelements>
|
|
16
|
+
<endpoints>
|
|
17
|
+
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
|
18
|
+
</endpoints>
|
|
19
|
+
<dsl>call :a1, :timeout, parameters: { :label => "", :method => :post, :arguments => [⭐(:name => :timeout, :value => "5")] }, finalize: <<-END
|
|
20
|
+
data.a = 17
|
|
21
|
+
END
|
|
22
|
+
</dsl>
|
|
23
|
+
<dslx>
|
|
24
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
25
|
+
<call id="a1" endpoint="timeout">
|
|
26
|
+
<parameters>
|
|
27
|
+
<label/>
|
|
28
|
+
<method>:post</method>
|
|
29
|
+
<arguments>
|
|
30
|
+
<timeout>5</timeout>
|
|
31
|
+
</arguments>
|
|
32
|
+
</parameters>
|
|
33
|
+
<finalize output="result">data.a = 17</finalize>
|
|
34
|
+
<update output="result"/>
|
|
35
|
+
<_timing>
|
|
36
|
+
<_timing_min/>
|
|
37
|
+
<_timing_max/>
|
|
38
|
+
<_timing_avg/>
|
|
39
|
+
</_timing>
|
|
40
|
+
<_notes>
|
|
41
|
+
<_notes_general/>
|
|
42
|
+
<_attachments/>
|
|
43
|
+
</_notes>
|
|
44
|
+
</call>
|
|
45
|
+
</description>
|
|
46
|
+
</dslx>
|
|
47
|
+
<status>
|
|
48
|
+
<id>0</id>
|
|
49
|
+
<message>undefined</message>
|
|
50
|
+
</status>
|
|
51
|
+
<description>
|
|
52
|
+
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
53
|
+
<call id="a1" endpoint="timeout">
|
|
54
|
+
<parameters>
|
|
55
|
+
<label/>
|
|
56
|
+
<method>:post</method>
|
|
57
|
+
<arguments>
|
|
58
|
+
<timeout>5</timeout>
|
|
59
|
+
</arguments>
|
|
60
|
+
</parameters>
|
|
61
|
+
<finalize output="result">data.a = 17</finalize>
|
|
62
|
+
<update output="result"/>
|
|
63
|
+
<_timing>
|
|
64
|
+
<_timing_min/>
|
|
65
|
+
<_timing_max/>
|
|
66
|
+
<_timing_avg/>
|
|
67
|
+
</_timing>
|
|
68
|
+
<_notes>
|
|
69
|
+
<_notes_general/>
|
|
70
|
+
<_attachments/>
|
|
71
|
+
</_notes>
|
|
72
|
+
</call>
|
|
73
|
+
</description>
|
|
74
|
+
</description>
|
|
75
|
+
<transformation>
|
|
76
|
+
<description type="copy"/>
|
|
77
|
+
<dataelements type="none"/>
|
|
78
|
+
<endpoints type="none"/>
|
|
79
|
+
</transformation>
|
|
80
|
+
</properties>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f7c77861ac613eeac8fb9829c9a545a2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a24d172b1aeb05fe94fdc5e095dec32
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0" url="http://localhost:9299/">
|
|
2
|
+
<topic id="activity">
|
|
3
|
+
<event>calling</event>
|
|
4
|
+
<event>receiving</event>
|
|
5
|
+
<event>done</event>
|
|
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
|
+
</subscription>
|