Class: AWS::Flow::ActivityDecisionStateMachine Private

Inherits:
DecisionStateMachineBase show all
Defined in:
lib/aws/decider/state_machines.rb

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.

Instance Attribute Summary collapse

Attributes inherited from DecisionStateMachineBase

#id

Attributes included from DecisionStateMachineDFA

#start_state, #states, #symbols, #transitions

Instance Method Summary collapse

Methods inherited from DecisionStateMachineBase

#done?, #handle_started_event

Methods included from DecisionStateMachineDFA

#add_transition, #add_transitions, #get_start_state, #get_transitions, #init, #self_transitions, #uncovered_transitions

Constructor Details

#initialize(decision_id, attributes) ⇒ ActivityDecisionStateMachine

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.

Creates a new ‘ActivityDecisionStateMachine`.

Parameters:



165
166
167
168
# File 'lib/aws/decider/state_machines.rb', line 165

def initialize(decision_id, attributes)
  @attributes = attributes
  super(decision_id)
end

Instance Attribute Details

#attributesObject (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.



158
159
160
# File 'lib/aws/decider/state_machines.rb', line 158

def attributes
  @attributes
end

Instance Method Details

#create_request_cancel_activity_task_decisionObject

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.



203
204
205
206
# File 'lib/aws/decider/state_machines.rb', line 203

def create_request_cancel_activity_task_decision
  { :decision_type => "RequestCancelActivityTask",
    :request_cancel_activity_task_decision_attributes => {:activity_id => @attributes[:decision_id]} }
end

#create_schedule_activity_task_decisionObject

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.



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/aws/decider/state_machines.rb', line 183

def create_schedule_activity_task_decision
  options = @attributes[:options]
  attribute_type = :schedule_activity_task_decision_attributes
  result = { :decision_type => "ScheduleActivityTask",
      attribute_type =>
      {
        :activity_type =>
        {
          :name => @attributes[:activity_type].name.to_s,
          :version => options.version.to_s
        },
        :activity_id => @attributes[:decision_id].to_s,
      }
  }
  task_list = options.task_list ? {:task_list => {:name => options.task_list}} : {}
  to_add = options.get_options([:heartbeat_timeout, :schedule_to_close_timeout, :task_priority, :schedule_to_start_timeout, :start_to_close_timeout, :input], task_list)
  result[attribute_type].merge!(to_add)
  result
end

#get_decisionObject

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.



174
175
176
177
178
179
180
181
# File 'lib/aws/decider/state_machines.rb', line 174

def get_decision
  case @current_state
  when :created
    return create_schedule_activity_task_decision
  when :cancelled_after_initiated
    return create_request_cancel_activity_task_decision
  end
end