@@ -42,6 +42,7 @@ def initialize(config)
4242 # @option options [Hash] :headers
4343 # @option options [Hash] :search_attributes
4444 # @option options [Integer] :start_delay determines the amount of seconds to wait before initiating a Workflow
45+ # @option options [Integer] :priority_key
4546 #
4647 # @return [String] workflow's run ID
4748 def start_workflow ( workflow , *input , options : { } , **args )
@@ -68,7 +69,8 @@ def start_workflow(workflow, *input, options: {}, **args)
6869 headers : config . header_propagator_chain . inject ( execution_options . headers ) ,
6970 memo : execution_options . memo ,
7071 search_attributes : Workflow ::Context ::Helpers . process_search_attributes ( execution_options . search_attributes ) ,
71- start_delay : execution_options . start_delay
72+ start_delay : execution_options . start_delay ,
73+ priority_key : options [ :priority_key ]
7274 )
7375 else
7476 raise ArgumentError , 'If signal_input is provided, you must also provide signal_name' if signal_name . nil?
@@ -88,7 +90,8 @@ def start_workflow(workflow, *input, options: {}, **args)
8890 search_attributes : Workflow ::Context ::Helpers . process_search_attributes ( execution_options . search_attributes ) ,
8991 signal_name : signal_name ,
9092 signal_input : signal_input ,
91- start_delay : execution_options . start_delay
93+ start_delay : execution_options . start_delay ,
94+ priority_key : options [ :priority_key ]
9295 )
9396 end
9497
@@ -112,6 +115,7 @@ def start_workflow(workflow, *input, options: {}, **args)
112115 # @option options [Hash] :timeouts check Temporal::Configuration::DEFAULT_TIMEOUTS
113116 # @option options [Hash] :headers
114117 # @option options [Hash] :search_attributes
118+ # @option options [Integer] :priority_key
115119 #
116120 # @return [String] workflow's run ID
117121 def schedule_workflow ( workflow , cron_schedule , *input , options : { } , **args )
@@ -137,6 +141,7 @@ def schedule_workflow(workflow, cron_schedule, *input, options: {}, **args)
137141 cron_schedule : cron_schedule ,
138142 memo : execution_options . memo ,
139143 search_attributes : Workflow ::Context ::Helpers . process_search_attributes ( execution_options . search_attributes ) ,
144+ priority_key : options [ :priority_key ]
140145 )
141146
142147 response . run_id
0 commit comments