Class: Eso::Workflow::History

Inherits:
Eso::Workflow show all
Defined in:
lib/eso/workflow.rb

Instance Attribute Summary collapse

Attributes inherited from Eso::Workflow

#id, #name, #steps, #timeCreated

Instance Method Summary collapse

Methods inherited from Eso::Workflow

#get_step, load, #to_hash, #to_json, #trigger

Constructor Details

#initialize(id:, name:, time_created:, steps:, state:, message:, history:) ⇒ History

Constructor for the WorkflowHistory

Parameters:

  • id (String) —

    ID of the workflow.

  • name (String) —

    Name of the workflow.

  • steps (Array) —

    Array of the steps that this workflow takes.

  • time_created (Fixnum) —

    The time the workflow was created in millis since epoch

  • state (Eso::Workflow::State) —

    The current state of the workflow

  • message (String) —

    The most recent message



141
142
143
144
145
146
# File 'lib/eso/workflow.rb', line 141

def initialize(id:, name:, time_created:, steps:, state:, message:, history:)
  super(id: id, name: name, timeCreated: time_created, steps: steps)
  @state = state
  @message = message
  @state_histories = history
end

Instance Attribute Details

#message ⇒ Object

The most recent message



128
129
130
# File 'lib/eso/workflow.rb', line 128

def message
  @message
end

#state ⇒ Object

The current state of the workflow



125
126
127
# File 'lib/eso/workflow.rb', line 125

def state
  @state
end

#state_histories ⇒ Object

An array of Eso::Workflow::StateHistory



131
132
133
# File 'lib/eso/workflow.rb', line 131

def state_histories
  @state_histories
end