server/executionhandlers/ruby/connection.rb in cpee-2.1.56 vs server/executionhandlers/ruby/connection.rb in cpee-2.1.57

- old
+ new

@@ -140,12 +140,10 @@ client = Riddl::Client.new(tendpoint) @handler_passthrough = callback @controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position) - pp params - status, result, headers = client.request type => params @guard_files += result if status == 561 if @controller.attributes['twin_translate'] @@ -387,27 +385,26 @@ end end def callback(result=nil,options={}) recv = structurize_result(result) - if result.length > 0 - @controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv, :annotations => @anno) - end + @controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv, :annotations => @anno) + @guard_files += result - @handler_returnValue = simplify_result(result) - - @handler_returnOptions = options if options['CPEE_INSTANTIATION'] @controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(options['CPEE_INSTANTIATION'])) end if options['CPEE_EVENT'] @controller.notify("task/#{options['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => recv) + else + @handler_returnValue = simplify_result(result) + @handler_returnOptions = options end + if options['CPEE_STATUS'] + @controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_STATUS']) + end if options['CPEE_UPDATE'] - if options['CPEE_UPDATE_STATUS'] - @controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS']) - end @handler_continue.continue WEEL::Signal::Again else @controller.cancel_callback(@handler_passthrough) @handler_passthrough = nil if options['CPEE_SALVAGE']