Class: AWS::SimpleWorkflow::HistoryEventCollection

Inherits:
Object
  • Object
show all
Includes:
Core::Collection::WithLimitAndNextToken
Defined in:
lib/aws/simple_workflow/history_event_collection.rb

Overview

This collection represents the history events (HistoryEvent) for a single workflow execution.

See Core::Collection for documentation on the standard enumerable methods and their options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Constructor Details

#initialize(workflow_execution, options = {}) ⇒ HistoryEventCollection

Returns a new instance of HistoryEventCollection.

Parameters:

  • workflow_execution (WorkflowExecution)

    The execution this history event belongs to.

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :reverse_order (Boolean) — default: false

    When true, history events are enumerated in reverse chronological order.



35
36
37
38
39
40
# File 'lib/aws/simple_workflow/history_event_collection.rb', line 35

def initialize workflow_execution, options = {}
  @workflow_execution = workflow_execution
  @reverse_order = options.key?(:reverse_order) ?
    !!options[:reverse_order] : false
  super
end

Instance Attribute Details

#workflow_executionWorkflowExecution (readonly)

Returns:



43
44
45
# File 'lib/aws/simple_workflow/history_event_collection.rb', line 43

def workflow_execution
  @workflow_execution
end

Instance Method Details

#reverse_orderWorkflowExecutionCollection

Returns a collection that enumerates workflow executions in reverse order.

Returns:



47
48
49
# File 'lib/aws/simple_workflow/history_event_collection.rb', line 47

def reverse_order
  self.class.new(workflow_execution, :reverse_order => true)
end