cpee 1.5.13 → 1.5.15
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/themes/extended/theme.js +1 -1
- data/cpee.gemspec +1 -1
- data/log/xes_yaml.rb +9 -7
- data/server/handlerwrappers/default.rb +9 -8
- data/server/resources/transformation_dslx.xsl +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9032110f699ad05cee7dfc9700945ae55cd13421989df985912f72ebe16330b
|
4
|
+
data.tar.gz: 66203da69e541f8339897c365ebeaae6824f51ea3d34bcb0de02a9fce6cc4b2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 339b3684647593c7159f4e3902f75eda6116c93f3ba8caed0321908f7d9c6063437f2d1c4aa511e1a9c26572866b3ff86866e6fbb720de86e37ed37ed09b0675
|
7
|
+
data.tar.gz: 9e664463869e9d18c10c54cc12265905fc79b26e050ea1662545811343a63c5d28ef4846632e6b785a4076662d53867dcf0da5862604db7d8efd6187c212fa01
|
@@ -1290,6 +1290,6 @@ function WFAdaptorManifestation(adaptor) {
|
|
1290
1290
|
}//}}}
|
1291
1291
|
}; /*}}}*/
|
1292
1292
|
this.elements.scripts = { /*{{{*/
|
1293
|
-
'description': [self.adaptor.theme_dir + 'rngs/
|
1293
|
+
'description': [self.adaptor.theme_dir + 'rngs/scripts.rng']
|
1294
1294
|
}; /*}}}*/
|
1295
1295
|
}
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "1.5.
|
3
|
+
s.version = "1.5.15"
|
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). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
|
data/log/xes_yaml.rb
CHANGED
@@ -9,8 +9,8 @@ require 'time'
|
|
9
9
|
|
10
10
|
class Logging < Riddl::Implementation #{{{
|
11
11
|
def doc(topic,event_name,log_dir,template,instancenr,notification)
|
12
|
-
|
13
|
-
return unless
|
12
|
+
instance = notification['instance_uuid']
|
13
|
+
return unless instance
|
14
14
|
|
15
15
|
activity = notification['activity']
|
16
16
|
parameters = notification['parameters']
|
@@ -18,9 +18,9 @@ class Logging < Riddl::Implementation #{{{
|
|
18
18
|
|
19
19
|
log = YAML::load(File.read(template))
|
20
20
|
log["log"]["trace"]["concept:name"] ||= instancenr
|
21
|
-
log["log"]["trace"]["cpee:name"] ||= notification['instance_name'] if notification[
|
22
|
-
log["log"]["trace"]["cpee:
|
23
|
-
File.open(File.join(log_dir,
|
21
|
+
log["log"]["trace"]["cpee:name"] ||= notification['instance_name'] if notification['instance_name']
|
22
|
+
log["log"]["trace"]["cpee:instance"] ||= instance
|
23
|
+
File.open(File.join(log_dir,instance+'.xes.yaml'),'w'){|f| f.puts log.to_yaml} unless File.exists? File.join(log_dir,instance+'.xes.yaml')
|
24
24
|
event = {}
|
25
25
|
event["concept:instance"] = instancenr
|
26
26
|
event["concept:name"] = notification["label"] if notification["label"]
|
@@ -28,7 +28,9 @@ class Logging < Riddl::Implementation #{{{
|
|
28
28
|
event["concept:endpoint"] = notification["endpoint"]
|
29
29
|
end
|
30
30
|
event["id:id"] = (activity.nil? || activity == "") ? 'external' : activity
|
31
|
-
event["cpee:
|
31
|
+
event["cpee:activity"] = event["id:id"]
|
32
|
+
event["cpee:activity_uuid"] = notification['activity_uuid'] if notification['activity_uuid']
|
33
|
+
event["cpee:instance"] = instance
|
32
34
|
case event_name
|
33
35
|
when 'receiving', 'change', 'instantiation'
|
34
36
|
event["lifecycle:transition"] = "unknown"
|
@@ -62,7 +64,7 @@ class Logging < Riddl::Implementation #{{{
|
|
62
64
|
end
|
63
65
|
end
|
64
66
|
event["time:timestamp"]= event['cpee:timestamp'] || Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z")
|
65
|
-
File.open(File.join(log_dir,
|
67
|
+
File.open(File.join(log_dir,instance+'.xes.yaml'),'a') do |f|
|
66
68
|
f << {'event' => event}.to_yaml
|
67
69
|
end
|
68
70
|
nil
|
@@ -43,6 +43,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
43
43
|
@handler_passthrough = nil
|
44
44
|
@handler_returnValue = nil
|
45
45
|
@handler_returnOptions = nil
|
46
|
+
@handler_activity_uuid = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
46
47
|
@label = ''
|
47
48
|
end # }}}
|
48
49
|
|
@@ -133,7 +134,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
133
134
|
@sensors = parameters.dig(:stream,:sensors)
|
134
135
|
@aggregators = parameters.dig(:stream,:aggregators)
|
135
136
|
@costs = parameters.dig(:stream,:costs)
|
136
|
-
@controller.notify("activity/calling", :instance => @controller.instance, :instance_uuid => @controller.uuid, :label => @label, :instance_name => @controller.info, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
137
|
+
@controller.notify("activity/calling", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :instance_uuid => @controller.uuid, :label => @label, :instance_name => @controller.info, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
137
138
|
if passthrough.to_s.empty?
|
138
139
|
proto_curl parameters
|
139
140
|
else
|
@@ -166,15 +167,15 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
166
167
|
end # }}}
|
167
168
|
|
168
169
|
def inform_activity_done # {{{
|
169
|
-
@controller.notify("activity/done", :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
170
|
+
@controller.notify("activity/done", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
170
171
|
end # }}}
|
171
172
|
def inform_activity_manipulate # {{{
|
172
|
-
@controller.notify("activity/manipulating", :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
173
|
+
@controller.notify("activity/manipulating", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
173
174
|
end # }}}
|
174
175
|
def inform_activity_failed(err) # {{{
|
175
176
|
puts err.message
|
176
177
|
puts err.backtrace
|
177
|
-
@controller.notify("activity/failed", :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
178
|
+
@controller.notify("activity/failed", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
178
179
|
end # }}}
|
179
180
|
def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
|
180
181
|
unless status.nil?
|
@@ -192,10 +193,10 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
192
193
|
end # }}}
|
193
194
|
|
194
195
|
def vote_sync_after # {{{
|
195
|
-
@controller.call_vote("activity/syncing_after", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
196
|
+
@controller.call_vote("activity/syncing_after", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
196
197
|
end # }}}
|
197
198
|
def vote_sync_before(parameters=nil) # {{{
|
198
|
-
@controller.call_vote("activity/syncing_before", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
199
|
+
@controller.call_vote("activity/syncing_before", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
199
200
|
end # }}}
|
200
201
|
|
201
202
|
def simplify_result(result)
|
@@ -254,13 +255,13 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
254
255
|
end
|
255
256
|
|
256
257
|
def callback(result=nil,options={})
|
257
|
-
@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, :aggregators => @aggregators, :costs => @costs)
|
258
|
+
@controller.notify("activity/receiving", :activity_uuid => @handler_activity_uuid, :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, :aggregators => @aggregators, :costs => @costs)
|
258
259
|
result = simplify_result(result)
|
259
260
|
@handler_returnValue = result
|
260
261
|
@handler_returnOptions = options
|
261
262
|
if options['CPEE_UPDATE']
|
262
263
|
if options['CPEE_UPDATE_STATUS']
|
263
|
-
@controller.notify("activity/status", :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
264
|
+
@controller.notify("activity/status", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
264
265
|
end
|
265
266
|
@handler_continue.continue WEEL::Signal::Again
|
266
267
|
else
|
@@ -384,7 +384,7 @@
|
|
384
384
|
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
385
385
|
<xsl:text>]</xsl:text>
|
386
386
|
</xsl:when>
|
387
|
-
<xsl:when test="count(*) > 0 and name()='
|
387
|
+
<xsl:when test="count(*) > 0 and name()='costs'">
|
388
388
|
<xsl:text>[</xsl:text>
|
389
389
|
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
390
390
|
<xsl:text>]</xsl:text>
|
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: 1.5.
|
4
|
+
version: 1.5.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: tools
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-11-
|
14
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: riddl
|