class Temporalio::Client::WorkflowExecution

Info for a single workflow execution run.

def close_time

Returns:
  • (Time, nil) - When the workflow was closed if closed.
def close_time
  Internal::ProtoUtils.timestamp_to_time(@raw_info.close_time)
end

def execution_time

Returns:
  • (Time, nil) - When this workflow run started or should start.
def execution_time
  Internal::ProtoUtils.timestamp_to_time(@raw_info.execution_time)
end

def history_length

Returns:
  • (Integer) - Number of events in the history.
def history_length
  @raw_info.history_length
end

def id

Returns:
  • (String) - ID for the workflow.
def id
  @raw_info.execution.workflow_id
end

def initialize(raw_info, data_converter)

@!visibility private
def initialize(raw_info, data_converter)
  @raw_info = raw_info
  @memo = Internal::ProtoUtils::LazyMemo.new(raw_info.memo, data_converter)
  @search_attributes = Internal::ProtoUtils::LazySearchAttributes.new(raw_info.search_attributes)
end

def memo

Returns:
  • (Hash, nil) - Memo for the workflow.
def memo
  @memo.get
end

def parent_id

Returns:
  • (String, nil) - ID for the parent workflow if this was started as a child.
def parent_id
  @raw_info.parent_execution&.workflow_id
end

def parent_run_id

Returns:
  • (String, nil) - Run ID for the parent workflow if this was started as a child.
def parent_run_id
  @raw_info.parent_execution&.run_id
end

def run_id

Returns:
  • (String) - Run ID for this workflow run.
def run_id
  @raw_info.execution.run_id
end

def search_attributes

Returns:
  • (SearchAttributes, nil) - Current set of search attributes if any.
def search_attributes
  @search_attributes.get
end

def start_time

Returns:
  • (Time) - When the workflow was created.
def start_time
  Internal::ProtoUtils.timestamp_to_time(@raw_info.start_time) || raise # Never nil
end

def status

Returns:
  • (WorkflowExecutionStatus) - Status for the workflow.
def status
  Internal::ProtoUtils.enum_to_int(Api::Enums::V1::WorkflowExecutionStatus, @raw_info.status)
end

def task_queue

Returns:
  • (String) - Task queue for the workflow.
def task_queue
  @raw_info.task_queue
end

def workflow_type

Returns:
  • (String) - Type name for the workflow.
def workflow_type
  @raw_info.type.name
end