Method: AWS::Flow::Workflows::InstanceMethods#continue_as_new
- Defined in:
- lib/aws/decider/decider.rb
#continue_as_new(*args, &block) ⇒ Object
Restarts the workflow as a new workflow execution.
497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 |
# File 'lib/aws/decider/decider.rb', line 497 def continue_as_new(*args, &block) = Utilities::(ContinueAsNewOptions, block) @data_converter ||= YAMLDataConverter.new if ! args.empty? input = @data_converter.dump args .input = input end known_workflows = self.class.workflows # If there is only one workflow, we can unambiguously say that we should use that one. if known_workflows.length == 1 .precursors << known_workflows.first. end # If we can find a name that matches, use that one. if .execution_method matching_option = self.class.workflows.map(&:options).find {|x| x.execution_method == .execution_method } .precursors << matching_option unless matching_option.nil? end self.decision_context.workflow_context. = end |