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.
87 88 89 90 91 |
# File 'lib/aws/decider/activity_definition.rb', line 87 def initialize(service, domain, task) @service = service @domain = domain @task = task end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
86 87 88 |
# File 'lib/aws/decider/activity_definition.rb', line 86 def domain @domain end |
#service ⇒ Object
Returns the value of attribute service.
86 87 88 |
# File 'lib/aws/decider/activity_definition.rb', line 86 def service @service end |
#task ⇒ Object
Returns the value of attribute task.
86 87 88 |
# File 'lib/aws/decider/activity_definition.rb', line 86 def task @task end |
Instance Method Details
#record_activity_heartbeat(details) ⇒ Object
100 101 102 103 104 105 106 |
# File 'lib/aws/decider/activity_definition.rb', line 100 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
92 93 94 |
# File 'lib/aws/decider/activity_definition.rb', line 92 def task_token @task.task_token end |
#workflow_execution ⇒ Object
96 97 98 |
# File 'lib/aws/decider/activity_definition.rb', line 96 def workflow_execution @task.workflow_execution end |