Class: AWS::Flow::WorkflowFactory
- Inherits:
-
Object
- Object
- AWS::Flow::WorkflowFactory
- Defined in:
- lib/aws/decider/workflow_client.rb
Overview
Instances of WorkflowFactory are generated by #workflow_factory.
Instance Method Summary collapse
-
#get_client ⇒ WorkflowClient
Get a WorkflowClient with the parameters used in the construction of this WorkflowFactory.
-
#initialize(service, domain, block) ⇒ WorkflowFactory
constructor
Creates a new WorkflowFactory with the provided parameters.
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.
350 351 352 353 354 355 356 357 358 359 |
# File 'lib/aws/decider/workflow_client.rb', line 350 def initialize(service, domain, block) @service = service @domain = domain @options = Utilities::(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_client ⇒ WorkflowClient
Get a AWS::Flow::WorkflowClient with the parameters used in the construction of this AWS::Flow::WorkflowFactory.
367 368 369 |
# File 'lib/aws/decider/workflow_client.rb', line 367 def get_client WorkflowClient.new(@service, @domain, @workflow_class, @options) end |