class Temporalio::Client::Schedule::Action::StartWorkflow

@return [Hash<String, Object>, nil] Headers for the workflow.
@!attribute headers
@return [SearchAttributes, nil] Search attributes for the workflow.
@!attribute search_attributes
@return [Hash<String, Object>, nil] Memo for the workflow.
@!attribute memo
@return [RetryPolicy, nil] Retry policy for the workflow.
@!attribute retry_policy
@return [Float, nil] Timeout of a single workflow task in seconds.
@!attribute task_timeout
@return [Float, nil] Timeout of a single workflow run in seconds.
@!attribute run_timeout
@return [Float, nil] Total workflow execution timeout in seconds including retries and continue as new.
@!attribute execution_timeout
@return [String] Task queue to run the workflow on.
@!attribute task_queue
@return [String] Unique identifier for the workflow execution.
@!attribute id
@return [Array<Object>] Arguments to the workflow.
@!attribute args
@return [String] Workflow.
@!attribute workflow
Schedule action to start a workflow.

def self._from_proto(raw_info, data_converter)

@!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

def _to_proto(data_converter)

@!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

def new(

Parameters:
  • headers (Hash, nil) -- Headers for the workflow.
  • search_attributes (SearchAttributes, nil) -- Search attributes for the workflow.
  • memo (Hash, nil) -- Memo for the workflow.
  • retry_policy (RetryPolicy, nil) -- Retry policy for the workflow.
  • task_timeout (Float, nil) -- Timeout of a single workflow task in seconds.
  • run_timeout (Float, nil) -- Timeout of a single workflow run in seconds.
  • execution_timeout (Float, nil) -- Total workflow execution timeout in seconds including retries and
  • task_queue (String) -- Task queue to run the workflow on.
  • id (String) -- Unique identifier for the workflow execution.
  • args (Array) -- Arguments to the workflow.
  • workflow (Class, Symbol, String) -- 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