Class: AWS::Flow::SignalDecisionStateMachine 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

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) ⇒ SignalDecisionStateMachine

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 SignalDecisionStateMachine.



262
263
264
265
# File 'lib/aws/decider/state_machines.rb', line 262

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

Instance Method Details

#create_signal_external_workflow_execution_decisonObject

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.



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/aws/decider/state_machines.rb', line 274

def create_signal_external_workflow_execution_decison
  extra_options = {}
  [:input, :control, :run_id].each do |type|
    extra_options[type] = @attributes.send(type) if @attributes.send(type)
  end
  result = {
    :decision_type => "SignalExternalWorkflowExecution",
    :signal_external_workflow_execution_decision_attributes =>
    {
      :signal_name => @attributes.signal_name,
      :workflow_id => @attributes.workflow_id
    }
  }
  if ! extra_options.empty?
    result[:signal_external_workflow_execution_decision_attributes].merge! extra_options
  end
  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.



267
268
269
270
271
272
# File 'lib/aws/decider/state_machines.rb', line 267

def get_decision
  case @current_state
  when :created
    return create_signal_external_workflow_execution_decison
  end
end