Class AWS::SimpleWorkflow::HistoryEvent
In: lib/aws/simple_workflow/history_event.rb
Parent: Object

## Getting History Events

History events belong to workflow executions. You can get them from an execution two ways:

  • By enumerating events from the execution
        workflow_execution.events.each do |event|
          # ...
        end
    
  • By enumerating events from the context of a {DecisionTask}:
        workflow_execution.decision_tasks.poll do |decision_task|
          decision_task.events.each do |event|
          end
        end
    

## History Event Attributes

All history events respond to the following 4 methods:

  • {event_type}
  • {event_id}
  • {created_at}
  • {attributes}

For a complete list of event types and a complete list of attributes returned with each event type, see the service API documentation.

Because the service returns attributes with camelCase name the structure returned by {attributes} allows you to access attributes by their snake_case name or their camelCase name:

    event.attributes.workflow_type
    event.attributes['workflowType']

See {HistoryEvent::Attributes} for more information about working with the returned attributes.

Methods

inspect   new   to_h   to_json  

Included Modules

Core::Model

Classes and Modules

Class AWS::SimpleWorkflow::HistoryEvent::Attributes

External Aliases

event_id -> id

Attributes

attributes  [R]  @return [Attributes] Returns an object that provides hash-like
  access to the history event attributes.
created_at  [R]  @return [Time] When the event history was created.
event_id  [R]  @return [Integer] Returns the event id.
event_type  [R]  @return [String] Returns the name of the history event type.
workflow_execution  [R]  @return [WorkflowExecution] The workflow execution this history
  event belongs to.

Public Class methods

@param [WorkflowExecution] workflow_execution

@param [Hash,String] details A hash or JSON string describing

  the history event.

Public Instance methods

@api private

@return [Hash] Returns a hash representation of the event.

@return [String] Returns a JSON representation of this workflow

  execution.

[Validate]