cpee 2.0.18 → 2.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cpee.gemspec +1 -1
- data/server/handlerwrappers/default.rb +15 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e9b61672c390c5bcc5e5cf7a3e3629c7c2bc1cc03e59fe991d209e8648f3e64
|
4
|
+
data.tar.gz: 602b274ea26365cc8d6552be1fedd101cfe34de2cf38bf9659bc73f1856a51d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6773ee8826306305997f1d69bce0fda39bd187a12ebc9567d90de2fdb701dd7c3cbcde0e5756221dad60848b878ea6b97156ec1bf8e08985a0c5d193ab71dca6
|
7
|
+
data.tar.gz: d39b5fcb092cf98ad5034da936f2fa0bb5feffe95438e825385339147cbf89cf981255e97c3ea6634bfb04789b4039905f1f9b6909db3df09cdb04ab627f832c
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "2.0.
|
3
|
+
s.version = "2.0.19"
|
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."
|
@@ -109,7 +109,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
109
109
|
|
110
110
|
client = Riddl::Client.new(tendpoint)
|
111
111
|
|
112
|
-
@controller.callback(self,callback,:'
|
112
|
+
@controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
113
113
|
@handler_passthrough = callback
|
114
114
|
|
115
115
|
status, result, headers = client.request type => params
|
@@ -123,7 +123,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
123
123
|
@controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
|
124
124
|
end
|
125
125
|
if headers['CPEE_EVENT']
|
126
|
-
@controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'
|
126
|
+
@controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint)
|
127
127
|
end
|
128
128
|
if headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.any?
|
129
129
|
headers['CPEE_UPDATE'] = true
|
@@ -142,11 +142,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
142
142
|
@sensors = parameters.dig(:stream,:sensors)
|
143
143
|
@aggregators = parameters.dig(:stream,:aggregators)
|
144
144
|
@costs = parameters.dig(:stream,:costs)
|
145
|
-
@controller.notify("activity/calling", :'
|
145
|
+
@controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
|
146
146
|
if passthrough.to_s.empty?
|
147
147
|
proto_curl parameters
|
148
148
|
else
|
149
|
-
@controller.callback(self,passthrough,:'
|
149
|
+
@controller.callback(self,passthrough,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
|
150
150
|
@handler_passthrough = passthrough
|
151
151
|
end
|
152
152
|
end # }}}
|
@@ -175,33 +175,33 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
175
175
|
end # }}}
|
176
176
|
|
177
177
|
def inform_activity_done # {{{
|
178
|
-
@controller.notify("activity/done", :'
|
178
|
+
@controller.notify("activity/done", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
|
179
179
|
end # }}}
|
180
180
|
def inform_activity_manipulate # {{{
|
181
|
-
@controller.notify("activity/manipulating", :'
|
181
|
+
@controller.notify("activity/manipulating", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
|
182
182
|
end # }}}
|
183
183
|
def inform_activity_failed(err) # {{{
|
184
184
|
puts err.message
|
185
185
|
puts err.backtrace
|
186
|
-
@controller.notify("activity/failed", :'
|
186
|
+
@controller.notify("activity/failed", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
|
187
187
|
end # }}}
|
188
188
|
def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
|
189
189
|
unless status.nil?
|
190
|
-
@controller.notify("status/change", :'
|
190
|
+
@controller.notify("status/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
|
191
191
|
end
|
192
192
|
unless changed_dataelements.nil?
|
193
|
-
@controller.notify("dataelements/change", :'
|
193
|
+
@controller.notify("dataelements/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
|
194
194
|
end
|
195
195
|
unless changed_endpoints.nil?
|
196
|
-
@controller.notify("endpoints/change", :'
|
196
|
+
@controller.notify("endpoints/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
|
197
197
|
end
|
198
198
|
end # }}}
|
199
199
|
|
200
200
|
def vote_sync_after # {{{
|
201
|
-
@controller.vote("activity/syncing_after", :'
|
201
|
+
@controller.vote("activity/syncing_after", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
|
202
202
|
end # }}}
|
203
203
|
def vote_sync_before(parameters=nil) # {{{
|
204
|
-
@controller.vote("activity/syncing_before", :'
|
204
|
+
@controller.vote("activity/syncing_before", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
|
205
205
|
end # }}}
|
206
206
|
|
207
207
|
def simplify_result(result)
|
@@ -260,13 +260,13 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
260
260
|
end
|
261
261
|
|
262
262
|
def callback(result=nil,options={})
|
263
|
-
@controller.notify("activity/receiving", :'
|
263
|
+
@controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
|
264
264
|
result = simplify_result(result)
|
265
265
|
@handler_returnValue = result
|
266
266
|
@handler_returnOptions = options
|
267
267
|
if options['CPEE_UPDATE']
|
268
268
|
if options['CPEE_UPDATE_STATUS']
|
269
|
-
@controller.notify("activity/status", :'
|
269
|
+
@controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
|
270
270
|
end
|
271
271
|
@handler_continue.continue WEEL::Signal::Again
|
272
272
|
else
|
@@ -290,7 +290,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
290
290
|
pp "#{type} - #{nesting} - #{tid} - #{parent} - #{parameters.inspect}"
|
291
291
|
|
292
292
|
@controller.vote("simulating/step",
|
293
|
-
:'
|
293
|
+
:'activity-uuid' => @handler_activity_uuid,
|
294
294
|
:label => @label,
|
295
295
|
:activity => tid,
|
296
296
|
:endpoint => @handler_endpoint,
|