@@ -280,7 +280,7 @@ def self.method_added(method_name)
280280 @workflow_update_validators ||= { }
281281 @defined_methods ||= [ ]
282282
283- defn , hash , other_hashes =
283+ defn , hash =
284284 case handler [ :type ]
285285 when :init
286286 raise "workflow_init was applied to #{ method_name } instead of initialize" if method_name != :initialize
@@ -306,7 +306,7 @@ def self.method_added(method_name)
306306 raw_args : handler [ :raw_args ] ,
307307 unfinished_policy : handler [ :unfinished_policy ] ,
308308 arg_hints : handler [ :arg_hints ]
309- ) , @workflow_signals , [ @workflow_queries , @workflow_updates ] ]
309+ ) , @workflow_signals ]
310310 when :query
311311 [ Query . new (
312312 name : handler [ :dynamic ] ? nil : ( handler [ :name ] || method_name ) . to_s ,
@@ -315,7 +315,7 @@ def self.method_added(method_name)
315315 raw_args : handler [ :raw_args ] ,
316316 arg_hints : handler [ :arg_hints ] ,
317317 result_hint : handler [ :result_hint ]
318- ) , @workflow_queries , [ @workflow_signals , @workflow_updates ] ]
318+ ) , @workflow_queries ]
319319 when :update
320320 [ Update . new (
321321 name : handler [ :dynamic ] ? nil : ( handler [ :name ] || method_name ) . to_s ,
@@ -325,7 +325,7 @@ def self.method_added(method_name)
325325 unfinished_policy : handler [ :unfinished_policy ] ,
326326 arg_hints : handler [ :arg_hints ] ,
327327 result_hint : handler [ :result_hint ]
328- ) , @workflow_updates , [ @workflow_signals , @workflow_queries ] ]
328+ ) , @workflow_updates ]
329329 when :dynamic_options
330330 raise 'Dynamic options method already set' if @dynamic_options_method
331331
@@ -341,8 +341,6 @@ def self.method_added(method_name)
341341 if other && other . to_invoke != method_name
342342 raise "Workflow #{ handler [ :type ] . name } #{ defn . name || '<dynamic>' } defined on " \
343343 "different methods #{ other . to_invoke } and #{ method_name } "
344- elsif defn . name && other_hashes . any? { |h | h . include? ( defn . name ) }
345- raise "Workflow signal #{ defn . name } already defined as a different handler type"
346344 end
347345 hash [ defn . name ] = defn
348346
0 commit comments