Class: AWS::Flow::WorkflowFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/decider/workflow_client.rb

Overview

Represents a workflow factory. Instances of WorkflowFactory are generated by #workflow_factory.

Instance Method Summary collapse

Constructor Details

#initialize(service, domain, block) ⇒ WorkflowFactory

Creates a new WorkflowFactory with the provided parameters. The construction parameters will be used for any workflow clients generated by this workflow factory.



417
418
419
420
421
422
423
424
425
426
# File 'lib/aws/decider/workflow_client.rb', line 417

def initialize(service, domain, block)
  @service = service
  @domain = domain
  @options = Utilities::interpret_block_for_options(StartWorkflowOptions, block)
  @workflow_class = get_const(@options.workflow_name) rescue nil
  if @workflow_class
    workflow_type = @workflow_class.workflows.delete_if {|wf_type| wf_type.version.nil? }.first
    @options.version = workflow_type.version
  end
end

Instance Method Details

#get_clientWorkflowClient

Get a AWS::Flow::WorkflowClient with the parameters used in the construction of this AWS::Flow::WorkflowFactory.



434
435
436
# File 'lib/aws/decider/workflow_client.rb', line 434

def get_client
  WorkflowClient.new(@service, @domain, @workflow_class, @options)
end