class AWS::Flow::WorkflowFactory
Represents a workflow factory. Instances of ‘WorkflowFactory` are generated by {#workflow_factory}.
Public Class Methods
new(service, domain, block)
click to toggle source
Creates a new ‘WorkflowFactory` with the provided parameters. The construction parameters will be used for any workflow clients generated by this workflow factory.
@param service
The service to use for workflow clients generated by this workflow factory
@param domain
The Amazon SWF [Domain](http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/SimpleWorkflow/Domain.html) to use for workflow clients generated by this workflow factory.
@param block
A block of {StartWorkflowOptions} to use for clients generated by this workflow factory.
# File lib/aws/decider/workflow_client.rb, line 422 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
Public Instance Methods
get_client()
click to toggle source
Get a {WorkflowClient} with the parameters used in the construction of this {WorkflowFactory}.
@return [WorkflowClient]
A workflow client created with the parameters used when creating the {WorkflowFactory}.
# File lib/aws/decider/workflow_client.rb, line 439 def get_client WorkflowClient.new(@service, @domain, @workflow_class, @options) end