Skip to content

Get Exception Type

Retrieve Exception Type information from IFS Planning & Scheduling Optimization (PSO).

It's possible to retrieve the output back in two ways, either in CLOB (character large object) format or in PL/SQL record format.

The method with CLOB output accepts the following parameters:

  • response_, out parameter of type CLOB, to which the response will be written.
  • exception_type_id_, required parameter to specify the Exception Type ID to query for.
  • language_id_, optional parameter to specify the language code for the Expense Type Description. If not specified 'en' (English) will be used.
  • scheduling_config_id_, optional parameter to specify the Configuration ID from Scheduling Optimization Configuration to use. If not specified the 'DEFAULT' configuration will be used.
  • response_format_, optional parameter to specify the response format. Possible values are 'XML', 'JSON' and 'IFS_MESSAGE'. If not specified 'IFS_MESSAGE' will be used as the default format.
DECLARE
   response_ CLOB;
BEGIN  
   Scheduling_Utility_API.Get_Exception_Type(
      response_             => response_, -- Clob parameter to accept response data.
      exception_type_id_    => 50,        -- Exception Type ID to query for.
      language_id_          => 'en',      -- Language code to use.
      scheduling_config_id_ => 'DEFAULT', -- Configuration ID to use.
      response_format_      => 'XML');    -- Response format ('XML' / 'JSON' / 'IFS_MESSAGE').
END;

For the above call, the response may look as following. The response may vary depending on the IFS Planning & Scheduling Optimization (PSO) version being used. For more details about retrieving Exception Type information please see the PSO Interface Guide.

<ExceptionType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ThreeSixty.Gateway.Library.ResponseObjects">
  <ActivationSetting>0</ActivationSetting>
  <Active>true</Active>
  <AttentionValue>50</AttentionValue>
  <Description>Planned Activity in Jeopardy</Description>
  <Id>50</Id>
</ExceptionType>

Tip: The IFS Message response format ('IFS_MESSAGE') allows using existing methods in Message_SYS package to handle the response which may be simpler to use in the PL/SQL code than 'XML' or 'JSON'.

The method with PL/SQL record output accepts the following parameters:

  • exception_type_rec_, out parameter of type record, to which the response will be written.
  • exception_type_id_, required parameter to specify the Exception Type ID to query for.
  • language_id_, optional parameter to specify the language code for the Expense Type Description. If not specified 'en' (English) will be used.
  • scheduling_config_id_, optional parameter to specify the Configuration ID from Scheduling Optimization Configuration to use. If not specified the 'DEFAULT' configuration will be used.
DECLARE
   response_rec_ Scheduling_Utility_API.Exception_Type_Rec;
BEGIN
   Scheduling_Utility_API.Get_Exception_Type(
      exception_type_rec_   => response_rec_, -- Record parameter to accept response data.
      exception_type_id_    => 50,            -- Exception Type ID to query for.
      language_id_          => 'en',          -- Language code to use.
      scheduling_config_id_ => 'DEFAULT');    -- Configuration ID to use.

   -- Example of handling response
   Dbms_Output.Put_Line('description = ' || response_rec_.description);
END;

The record type has the following format:

TYPE Exception_Type_Rec IS RECORD (
   id                      NUMBER,
   description             VARCHAR2(500),
   activation_setting      NUMBER,
   attention_value         NUMBER,
   active                  BOOLEAN);