Class: Emasser::WorkflowInstances
- Inherits:
-
SubCommandBase
- Object
- Thor
- SubCommandBase
- Emasser::WorkflowInstances
- Defined in:
- lib/emasser/get.rb
Overview
The Workflow Instances endpoint provides the ability to view detailed information on all active and historical workflows for a system.
Endpoints:
/api/systems/{systemId}/workflow-instances - Get workflow instances in a system
/api/systems/{systemId}/workflow-instances/{workflowInstanceId} - Get workflow instance by ID in a system
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SubCommandBase
Methods included from OutputConverters
#change_to_datetime, #to_output_hash
Methods included from InputConverters
Methods included from OptionsParser
#optional_options, #required_options
Class Method Details
.exit_on_failure? ⇒ Boolean
664 665 666 |
# File 'lib/emasser/get.rb', line 664 def self.exit_on_failure? true end |
Instance Method Details
#all ⇒ Object
676 677 678 679 680 681 682 683 684 685 |
# File 'lib/emasser/get.rb', line 676 def all = (@_initializer).keys = to_input_hash(, ) result = EmassClient::WorkflowInstancesApi.new.get_system_workflow_instances() puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances'.red puts to_output_hash(e) end |
#byInstanceId ⇒ Object
694 695 696 697 698 699 700 701 702 703 |
# File 'lib/emasser/get.rb', line 694 def byInstanceId # opts = Emasser::GET_WORKFLOWINSTANCES_RETURN_TYPE result = EmassClient::WorkflowInstancesApi .new.get_system_workflow_instances_by_workflow_instance_id([:workflowInstanceId]) puts to_output_hash(result).green rescue EmassClient::ApiError => e puts 'Exception when calling ApprovalChainApi->get_system_workflow_instances_by_workflow_instance_id'.red puts to_output_hash(e) end |