Sha256: 877dd1ed2d1290672bbf6b20c6bd33e4774d98f877b899523e1260ee0102bc90

Contents?: true

Size: 622 Bytes

Versions: 2

Compression:

Stored size: 622 Bytes

Contents

require 'rubygems'
require 'cli/command'

module Factor
  module CLI
    class WorkflowTask < Command
  
      desc "call WORKFLOW","start a workflow"
      method_option :parameters, :type=>:hash, :default=>{}, :required=>false
      def call(workflow_name)
        puts "starting workflow #{workflow_name} with options #{options.parameters.to_s}"
    
        engine = Factor::Engine.new
        id = engine.launch(workflow_name,options.parameters)
    
        puts "workflow executed with id #{id}"
      end
  
      desc "list", "list all available workflows"
      def list
      
      
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
factor-0.0.5 lib/cli/workflow_task.rb
factor-0.0.4 lib/cli/workflow_task.rb