server/handlerwrappers/default.rb in cpee-1.3.197 vs server/handlerwrappers/default.rb in cpee-1.3.198

- old
+ new

@@ -33,21 +33,19 @@ controller.notify("position/change", ipc) end # }}} def initialize(arguments,endpoint=nil,position=nil,continue=nil) # {{{ @controller = arguments[0] - @log_hash = {} @handler_continue = continue @handler_endpoint = endpoint @handler_position = position @handler_passthrough = nil @handler_returnValue = nil end # }}} def activity_handle(passthrough, parameters) # {{{ @controller.notify("activity/calling", :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters) - result = [] if passthrough.nil? params = [] callback = Digest::MD5.hexdigest(Kernel::rand().to_s) (parameters[:arguments] || {}).each do |k,v| if v.is_a?(Struct) @@ -61,10 +59,11 @@ end end params << Riddl::Header.new("CPEE_BASE",@controller.base_url) params << Riddl::Header.new("CPEE_INSTANCE",@controller.instance_url) params << Riddl::Header.new("CPEE_CALLBACK",@controller.instance_url + '/callbacks/' + callback) + params << Riddl::Header.new("CPEE_CALLBACK_ID",callback) params << Riddl::Header.new("CPEE_ACTIVITY",@handler_position) params << Riddl::Header.new("CPEE_LABEL",parameters[:label]) @controller.attributes.each do |key,value| params << Riddl::Header.new("CPEE_ATTR_#{key}",value) end @@ -136,10 +135,10 @@ def vote_sync_after # {{{ @controller.call_vote("activity/syncing_after", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position) end # }}} def vote_sync_before(parameters=nil) # {{{ - @controller.call_vote("activity/syncing_before", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position) + @controller.call_vote("activity/syncing_before", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :parameters => parameters) end # }}} def simplify_result(result) if result.length == 1 if result[0].is_a? Riddl::Parameter::Simple