Sha256: 689e0cb9da6a4f0d5698b160ccbf52b9d6555e9a389dfb4349cf889039ec8e47

Contents?: true

Size: 884 Bytes

Versions: 6

Compression:

Stored size: 884 Bytes

Contents

# frozen_string_literal: true

module Floe
  class Workflow
    module States
      module InputOutputMixin
        def process_input(input)
          input = input_path.value(context, input)
          input = parameters.value(context, input) if parameters
          input
        end

        def process_output(input, results)
          return input if results.nil?
          return if output_path.nil?

          results = result_selector.value(context, results) if @result_selector
          if result_path.payload.start_with?("$.Credentials")
            credentials = result_path.set(workflow.credentials, results)["Credentials"]
            workflow.credentials.merge!(credentials)
            output = input
          else
            output = result_path.set(input, results)
          end

          output_path.value(context, output)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
floe-0.11.0 lib/floe/workflow/states/input_output_mixin.rb
floe-0.10.0 lib/floe/workflow/states/input_output_mixin.rb
floe-0.9.0 lib/floe/workflow/states/input_output_mixin.rb
floe-0.7.1 lib/floe/workflow/states/input_output_mixin.rb
floe-0.8.0 lib/floe/workflow/states/input_output_mixin.rb
floe-0.7.0 lib/floe/workflow/states/input_output_mixin.rb