Class: Emasser::WorkflowDefinitions

Inherits:
SubCommandBase show all
Defined in:
lib/emasser/get.rb

Overview

The Workflow Definitions endpoint provides the ability to view all workflow schemas available on the eMASS instance. Every transition for each workflow stage is included.

Endpoints:

/api/workflow-definitions - Get workflow definitions in a site

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SubCommandBase

banner

Methods included from OutputConverters

#to_output_hash

Methods included from InputConverters

#to_input_hash

Methods included from OptionsParser

#optional_options, #required_options

Class Method Details

.exit_on_failure?Boolean



552
553
554
# File 'lib/emasser/get.rb', line 552

def self.exit_on_failure?
  true
end

Instance Method Details

#forSiteObject



564
565
566
567
568
569
570
571
572
573
# File 'lib/emasser/get.rb', line 564

def forSite
  optional_options_keys = optional_options(@_initializer).keys
  optional_options = to_input_hash(optional_options_keys, options)

  result = SwaggerClient::WorkflowDefinitionsApi.new.get_workflow_definitions(optional_options)
  puts to_output_hash(result).green
rescue SwaggerClient::ApiError => e
  puts 'Exception when calling ApprovalChainApi->get_workflow_definitions'.red
  puts to_output_hash(e)
end