Customized Planning Integrations

Some implementations require additional custom data exports into Planning applications which supplement or entirely replace the standard integrations available between AIF and RPAS applications. The PL/SQL package RAF_INTF_SUPPORT_UTIL is available in Innovation Workbench (IW) to support this type of integration requirement. The process to publish data from IW to any existing interface will be similar to the example described here. For this example, the interface will be RDF_FCST_PARAM_CAL_EXP.

To review the interface configuration details for this interface, the following query can be executed:

SELECT * FROM rap_intf_cfg WHERE intf_name = 'RDF_FCST_PARM_CAL_EXP';

The PUBLISH_APP_CODE and CUSTOMER_PUBLISHABLE_FLG values are important to note from the result of this query. First, to publish data to an interface, the publishable flag must be Y for any interface that IW will be populating. If there is a need to publish data for an interface not configured for custom extensions, an SR is required that requests that the following update be made, which will allow publishing data for that interface:

UPDATE rap_intf_cfg 
   SET customer_publishable_flg='Y' 
 WHERE intf_name = 'RDF_FCST_PARM_CAL_EXP';
/
COMMIT;
/

Once the above has been done, the implementer can write code in IW that will publish data to this interface, so that the subscribing application modules can consume it. A sample of how to do this follows:

DECLARE
   --The following is used to capture the ID for a published interface dataset
   v_run_id    NUMBER; 
   -- The following is used to allow isolated writing to the interface
   v_partition_name    VARCHAR2(30);  

BEGIN
   rap_intf_support_util.prep_intf_run('PDS', 'RDF_FCST_PARM_CAL_EXP', v_run_id, v_partition_name);

   -- Use of Append ensures efficiency, and requires PARTITION ( partition_name ) 
-- syntax, to ensure the ability to concurrently write to the table
   EXECUTE IMMEDIATE 'INSERT /*+ append */ INTO RDF_FCST_PARM_CAL_EXP partition ( '||v_partition_name|| ') ....  ';

   --NOTE: the .... is to be replaced with the actual list of columns and an appropriate SELECT statement to provide the values to insert into the table.
   --Of importance, it should be noted that the run_id column must be populated with the value that was returned into the v_run_id variable above.
   --After the data has been populated into the above table, it can be made available for retrieval by consuming application modules by the following:
   --Note, the 'PDS' value that is shown below, is fixed according to what was obtained from the query of RAP_INTF_CFG.

   rap_intf_support_util.publish_data('PDS', v_run_id, 'RDF_FCST_PARM_CAL_EXP', 'Ready');

END;
/

Once the above steps have been completed, the data will be ready to be consumed by the application modules that use this interface.

Note:

If an attempt is made to call any of the routines inside RAP_INTF_SUPPORT_UTIL for an interface where theCUSTOMER_PUBLISHABLE_FLG is not set to Y, then an error will be provided indicating that "No Interfaces for [ <values they provided to the procedure> ] are allowed/available to be published from custom code." If this occurs, follow the instructions described above to submit an SR asking for permission to publish data to that interface.