Method: Temporal::Workflow::ExecutionInfo.generate_from

Defined in:
lib/temporal/workflow/execution_info.rb

.generate_from(response) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/temporal/workflow/execution_info.rb', line 32

def self.generate_from(response)
  new(
    workflow: response.type.name,
    workflow_id: response.execution.workflow_id,
    run_id: response.execution.run_id,
    start_time: response.start_time&.to_time,
    close_time: response.close_time&.to_time,
    status: API_STATUS_MAP.fetch(response.status),
    history_length: response.history_length,
  ).freeze
end