Class: Temporalio::Client::Schedule::Action::StartWorkflow
- Inherits:
-
Object
- Object
- Temporalio::Client::Schedule::Action::StartWorkflow
- Includes:
- Temporalio::Client::Schedule::Action
- Defined in:
- lib/temporalio/client/schedule.rb
Overview
Schedule action to start a workflow.
Instance Attribute Summary collapse
-
#args ⇒ Array<Object>
Arguments to the workflow.
-
#execution_timeout ⇒ Float?
Total workflow execution timeout in seconds including retries and continue as new.
-
#headers ⇒ Hash<String, Object>?
Headers for the workflow.
-
#id ⇒ String
Unique identifier for the workflow execution.
-
#memo ⇒ Hash<String, Object>?
Memo for the workflow.
-
#retry_policy ⇒ RetryPolicy?
Retry policy for the workflow.
-
#run_timeout ⇒ Float?
Timeout of a single workflow run in seconds.
-
#search_attributes ⇒ SearchAttributes?
Search attributes for the workflow.
-
#task_queue ⇒ String
Task queue to run the workflow on.
-
#task_timeout ⇒ Float?
Timeout of a single workflow task in seconds.
-
#workflow ⇒ String
Workflow.
Class Method Summary collapse
- ._original_new ⇒ Object
-
.new(workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil) ⇒ Object
Create start-workflow schedule action.
Instance Attribute Details
#args ⇒ Array<Object>
Returns Arguments to the workflow.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#execution_timeout ⇒ Float?
Returns Total workflow execution timeout in seconds including retries and continue as new.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#headers ⇒ Hash<String, Object>?
Returns Headers for the workflow.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#id ⇒ String
Returns Unique identifier for the workflow execution.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#memo ⇒ Hash<String, Object>?
Returns Memo for the workflow.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#retry_policy ⇒ RetryPolicy?
Returns Retry policy for the workflow.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#run_timeout ⇒ Float?
Returns Timeout of a single workflow run in seconds.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#search_attributes ⇒ SearchAttributes?
Returns Search attributes for the workflow.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#task_queue ⇒ String
Returns Task queue to run the workflow on.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#task_timeout ⇒ Float?
Returns Timeout of a single workflow task in seconds.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
#workflow ⇒ String
Returns Workflow.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/temporalio/client/schedule.rb', line 203 class StartWorkflow include Action class << self alias _original_new new # Create start-workflow schedule action. # # @param workflow [Class<Workflow::Definition>, Symbol, String] Workflow. # @param args [Array<Object>] Arguments to the workflow. # @param id [String] Unique identifier for the workflow execution. # @param task_queue [String] Task queue to run the workflow on. # @param execution_timeout [Float, nil] Total workflow execution timeout in seconds including retries and # continue as new. # @param run_timeout [Float, nil] Timeout of a single workflow run in seconds. # @param task_timeout [Float, nil] Timeout of a single workflow task in seconds. # @param retry_policy [RetryPolicy, nil] Retry policy for the workflow. # @param memo [Hash<String, Object>, nil] Memo for the workflow. # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. # @param headers [Hash<String, Object>, nil] Headers for the workflow. def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end end # @!visibility private def self._from_proto(raw_info, data_converter) StartWorkflow.new( raw_info.workflow_type.name, *data_converter.from_payloads(raw_info.input), id: raw_info.workflow_id, task_queue: raw_info.task_queue.name, execution_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_execution_timeout), run_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_run_timeout), task_timeout: Internal::ProtoUtils.duration_to_seconds(raw_info.workflow_task_timeout), retry_policy: raw_info.retry_policy ? RetryPolicy._from_proto(raw_info.retry_policy) : nil, memo: Internal::ProtoUtils.memo_from_proto(raw_info.memo, data_converter), search_attributes: SearchAttributes._from_proto(raw_info.search_attributes), headers: Internal::ProtoUtils.headers_from_proto(raw_info.header, data_converter) ) end # @!visibility private def _to_proto(data_converter) Api::Schedule::V1::ScheduleAction.new( start_workflow: Api::Workflow::V1::NewWorkflowExecutionInfo.new( workflow_id: id, workflow_type: Api::Common::V1::WorkflowType.new(name: workflow), task_queue: Api::TaskQueue::V1::TaskQueue.new(name: task_queue), input: data_converter.to_payloads(args), workflow_execution_timeout: Internal::ProtoUtils.seconds_to_duration(execution_timeout), workflow_run_timeout: Internal::ProtoUtils.seconds_to_duration(run_timeout), workflow_task_timeout: Internal::ProtoUtils.seconds_to_duration(task_timeout), retry_policy: retry_policy&._to_proto, memo: Internal::ProtoUtils.memo_to_proto(memo, data_converter), search_attributes: search_attributes&._to_proto, header: Internal::ProtoUtils.headers_to_proto(headers, data_converter) ) ) end end |
Class Method Details
._original_new ⇒ Object
207 |
# File 'lib/temporalio/client/schedule.rb', line 207 alias _original_new new |
.new(workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil) ⇒ Object
Create start-workflow schedule action.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/temporalio/client/schedule.rb', line 223 def new( workflow, *args, id:, task_queue:, execution_timeout: nil, run_timeout: nil, task_timeout: nil, retry_policy: nil, memo: nil, search_attributes: nil, headers: nil ) _original_new( # steep:ignore workflow: Workflow::Definition._workflow_type_from_workflow_parameter(workflow), args:, id:, task_queue:, execution_timeout:, run_timeout:, task_timeout:, retry_policy:, memo:, search_attributes:, headers: ) end |