Class | AWS::SimpleWorkflow::HistoryEvent |
In: |
lib/aws/simple_workflow/history_event.rb
|
Parent: | Object |
History events belong to workflow executions. You can get them from an execution two ways:
1) By enumerating events from the execution
workflow_execution.events.each do |event| # ... end
2) 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
All history events respond to the following 4 methods:
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.
event_id | -> | id |
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. |
@param [WorkflowExecution] workflow_execution
@param [Hash,String] details A hash or JSON string describing
the history event.