Class: AWS::Flow::ActivityExecutionContext
- Inherits:
-
Object
- Object
- AWS::Flow::ActivityExecutionContext
- Defined in:
- lib/aws/decider/activity_definition.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#service ⇒ Object
Returns the value of attribute service.
-
#task ⇒ Object
Returns the value of attribute task.
Instance Method Summary collapse
-
#initialize(service, domain, task) ⇒ ActivityExecutionContext
constructor
A new instance of ActivityExecutionContext.
- #record_activity_heartbeat(details) ⇒ Object
- #task_token ⇒ Object
- #workflow_execution ⇒ Object
Constructor Details
#initialize(service, domain, task) ⇒ ActivityExecutionContext
Returns a new instance of ActivityExecutionContext.
92 93 94 95 96 |
# File 'lib/aws/decider/activity_definition.rb', line 92 def initialize(service, domain, task) @service = service @domain = domain @task = task end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
91 92 93 |
# File 'lib/aws/decider/activity_definition.rb', line 91 def domain @domain end |
#service ⇒ Object
Returns the value of attribute service.
91 92 93 |
# File 'lib/aws/decider/activity_definition.rb', line 91 def service @service end |
#task ⇒ Object
Returns the value of attribute task.
91 92 93 |
# File 'lib/aws/decider/activity_definition.rb', line 91 def task @task end |
Instance Method Details
#record_activity_heartbeat(details) ⇒ Object
105 106 107 108 109 110 111 |
# File 'lib/aws/decider/activity_definition.rb', line 105 def record_activity_heartbeat(details) to_send = {:task_token => task_token.to_s, :details => details.to_s } response = @service.record_activity_task_heartbeat(to_send) # TODO See if cancel requested, throw exception if so raise CancellationException if response["cancelRequested"] end |
#task_token ⇒ Object
97 98 99 |
# File 'lib/aws/decider/activity_definition.rb', line 97 def task_token @task.task_token end |
#workflow_execution ⇒ Object
101 102 103 |
# File 'lib/aws/decider/activity_definition.rb', line 101 def workflow_execution @task.workflow_execution end |