Class: AWS::Flow::Templates::ResultActivityTemplate Private
- Inherits:
-
ActivityTemplate
- Object
- TemplateBase
- ActivityTemplate
- AWS::Flow::Templates::ResultActivityTemplate
- Defined in:
- lib/aws/templates/activity.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This template represents a Result Activity in SWF.
Instance Attribute Summary collapse
- #key ⇒ Object readonly private
Attributes inherited from ActivityTemplate
Instance Method Summary collapse
-
#initialize(key, opts = {}) ⇒ ResultActivityTemplate
constructor
private
A new instance of ResultActivityTemplate.
-
#run(input, context) ⇒ Object
private
Wraps the input into a result hash and calls the ActivityTemplate#run method to report the result.
Constructor Details
#initialize(key, opts = {}) ⇒ ResultActivityTemplate
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ResultActivityTemplate.
71 72 73 74 75 76 77 78 79 |
# File 'lib/aws/templates/activity.rb', line 71 def initialize(key, opts = {}) @key = key # Get the name of the result activity name = "#{FlowConstants.defaults[:result_activity_prefix]}."\ "#{FlowConstants.defaults[:result_activity_method]}" super(name, opts) end |
Instance Attribute Details
#key ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 |
# File 'lib/aws/templates/activity.rb', line 69 def key @key end |
Instance Method Details
#run(input, context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Wraps the input into a result hash and calls the ActivityTemplate#run method to report the result
83 84 85 86 87 88 |
# File 'lib/aws/templates/activity.rb', line 83 def run(input, context) result = {} result[:key] = @key result[:result] = input super(result, context) end |