class EmassClient::WorkflowInstancesApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/emass_client/api/workflow_instances_api.rb, line 16
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_system_workflow_instances(system_id, opts = {}) click to toggle source

Get workflow instances in a system View detailed information on all active and historical workflows for a system ‘systemId` and filtered by provided parameters. @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :include_comments **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. (default to true) @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns true to not include transition comments. (default to 0) @option opts [String] :since_date Date: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. @option opts [String] :status Status: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. (default to all) @return [WorkflowInstancesResponseGet]

# File lib/emass_client/api/workflow_instances_api.rb, line 28
def get_system_workflow_instances(system_id, opts = {})
  data, _status_code, _headers = get_system_workflow_instances_with_http_info(system_id, opts)
  data
end
get_system_workflow_instances_by_workflow_instance_id(system_id, workflow_instance_id, opts = {}) click to toggle source

Get workflow instance by ID in a system View detailed information on all active and historical workflows for a system ‘systemId` and `workflowInstanceId`. @param system_id **System Id**: The unique system record identifier. @param workflow_instance_id **Workflow Instance Id**: The unique milestone record identifier. @param [Hash] opts the optional parameters @return [WorkflowInstancesResponseGet]

# File lib/emass_client/api/workflow_instances_api.rb, line 96
def get_system_workflow_instances_by_workflow_instance_id(system_id, workflow_instance_id, opts = {})
  data, _status_code, _headers = get_system_workflow_instances_by_workflow_instance_id_with_http_info(system_id, workflow_instance_id, opts)
  data
end
get_system_workflow_instances_by_workflow_instance_id_with_http_info(system_id, workflow_instance_id, opts = {}) click to toggle source

Get workflow instance by ID in a system View detailed information on all active and historical workflows for a system &#x60;systemId&#x60; and &#x60;workflowInstanceId&#x60;. @param system_id **System Id**: The unique system record identifier. @param workflow_instance_id **Workflow Instance Id**: The unique milestone record identifier. @param [Hash] opts the optional parameters @return [Array<(WorkflowInstancesResponseGet, Integer, Hash)>] WorkflowInstancesResponseGet data, response status code and response headers

# File lib/emass_client/api/workflow_instances_api.rb, line 107
def get_system_workflow_instances_by_workflow_instance_id_with_http_info(system_id, workflow_instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowInstancesApi.get_system_workflow_instances_by_workflow_instance_id ...'
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling WorkflowInstancesApi.get_system_workflow_instances_by_workflow_instance_id"
  end
  # verify the required parameter 'workflow_instance_id' is set
  if @api_client.config.client_side_validation && workflow_instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'workflow_instance_id' when calling WorkflowInstancesApi.get_system_workflow_instances_by_workflow_instance_id"
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/workflow-instances/{workflowInstanceId}'.sub('{' + 'systemId' + '}', system_id.to_s).sub('{' + 'workflowInstanceId' + '}', workflow_instance_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'WorkflowInstancesResponseGet' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowInstancesApi#get_system_workflow_instances_by_workflow_instance_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_system_workflow_instances_with_http_info(system_id, opts = {}) click to toggle source

Get workflow instances in a system View detailed information on all active and historical workflows for a system &#x60;systemId&#x60; and filtered by provided parameters. @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :include_comments **Include Comments**: If no value is specified, the default returns true to not include transition comments. Note: Corresponds to the Comments textbox that is required at most workflow transitions. Does not include other text input fields such as Terms / Conditions for Authorization. @option opts [Integer] :page_index **Page Index**: If no value is specified, the default returns true to not include transition comments. @option opts [String] :since_date Date: Filter on authorization/assessment date (Unix date format). Note: Filters off the lastEditedDate field. Note: The authorization/assessment decisions on completed workflows can be edited for up to 30 days after the initial decision is made. @option opts [String] :status Status: Filter by status. If no value is specified, the default returns all to include both active and inactive workflows. Note: Any workflows at a current stage of Complete or Cancelled are inactive. Ongoing workflows currently at other stages are active. @return [Array<(WorkflowInstancesResponseGet, Integer, Hash)>] WorkflowInstancesResponseGet data, response status code and response headers

# File lib/emass_client/api/workflow_instances_api.rb, line 42
def get_system_workflow_instances_with_http_info(system_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: WorkflowInstancesApi.get_system_workflow_instances ...'
  end
  # verify the required parameter 'system_id' is set
  if @api_client.config.client_side_validation && system_id.nil?
    fail ArgumentError, "Missing the required parameter 'system_id' when calling WorkflowInstancesApi.get_system_workflow_instances"
  end
  if @api_client.config.client_side_validation && opts[:'status'] && !['active', 'inactive', 'all'].include?(opts[:'status'])
    fail ArgumentError, 'invalid value for "status", must be one of active, inactive, all'
  end
  # resource path
  local_var_path = '/api/systems/{systemId}/workflow-instances'.sub('{' + 'systemId' + '}', system_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'includeComments'] = opts[:'include_comments'] if !opts[:'include_comments'].nil?
  query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil?
  query_params[:'sinceDate'] = opts[:'since_date'] if !opts[:'since_date'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'WorkflowInstancesResponseGet' 

  auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkflowInstancesApi#get_system_workflow_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end