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.
370 371 372 373 374 375 376 377 378 379 |
# File 'lib/aws/decider/workflow_client.rb', line 370 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.
387 388 389 |
# File 'lib/aws/decider/workflow_client.rb', line 387 def get_client WorkflowClient.new(@service, @domain, @workflow_class, @options) end |