Class: AWS::Flow::Replayer::WorkflowReplayer
- Inherits:
-
Object
- Object
- AWS::Flow::Replayer::WorkflowReplayer
- Defined in:
- lib/aws/replayer.rb
Overview
An AWS Flow Framework utility used to replay a workflow history in the decider against the workflow implementation. Primarily used for debugging workflows.
## Usage
**Create an instance of the replayer with the required options:**
~~~~ replayer = AWS::Flow::Replayer::WorkflowReplayer.new(
domain: '<domain_name>',
execution: {
workflow_id: "<workflow_id",
run_id: "<run_id>"
},
workflow_class: WorkflowClass
) ~~~~
**Call the replay method (optionally) with the replay_upto event_id number**
~~~~ decision = replayer.replay(20) ~~~~
Instance Attribute Summary collapse
-
#task_handler ⇒ Object
readonly
Returns the value of attribute task_handler.
-
#task_provider ⇒ Object
readonly
Returns the value of attribute task_provider.
Instance Method Summary collapse
-
#initialize(options) ⇒ WorkflowReplayer
constructor
Initialize a new WorkflowReplayer.
-
#replay(replay_upto = nil) ⇒ Object
Performs a replay of workflow history.
Constructor Details
#initialize(options) ⇒ WorkflowReplayer
Initialize a new WorkflowReplayer.
218 219 220 221 222 223 224 225 226 |
# File 'lib/aws/replayer.rb', line 218 def initialize() raise ArgumentError.new("You must pass in an options hash") if .nil? raise ArgumentError.new("options hash must contain :workflow_class") if [:workflow_class].nil? # Create the service decision task helper to fetch and truncate the # history @task_provider = ServiceDecisionTaskProvider.new() @task_handler = DecisionTaskHandler.from_workflow_class([:workflow_class]) end |
Instance Attribute Details
#task_handler ⇒ Object (readonly)
Returns the value of attribute task_handler.
208 209 210 |
# File 'lib/aws/replayer.rb', line 208 def task_handler @task_handler end |
#task_provider ⇒ Object (readonly)
Returns the value of attribute task_provider.
208 209 210 |
# File 'lib/aws/replayer.rb', line 208 def task_provider @task_provider end |