Design Overview

This wrapper batch program is used to process all the requests present in the MERCHAPI_ASYNC_REQUEST table. This table captures requests at an API level for the following scenarios:

  • API Enablement - When the API is enabled through the UI when an entry is made into the MERCHAPI_ASYNC_REQUEST table. This wrapper will do the initial load of the respective merchapi cache table and set the enable flag in the merchapi_config table.

  • API Disablement - When an enabled API is disabled through the UI, an entry is made into the MERCHAPI_ASYNC_REQUEST table. This wrapper will clear the respective merchapi cache table and disable the API in merchapi_config table.

  • Data Refresh – The data refresh request can be submitted using merchapidatarebuildrequest.ksh, which makes an entry in the MERCHAPI_ASYNC_REQUEST table. Depending on the type of data refresh (truncate/load or rebuild) the merchapi cache table is rebuilt.

Each API has a separate cache table and respective PLSQL package for API enable, disable and rebuild, which is maintained in the MERCH_BATCH_PARAM table. This wrapper script scans through the MERCAPI_ASYNC_REQUEST table, picks the request ID, completes the processing, and continues with the subsequent request. Duplicate or Invalid requests are ignored during processing. If the API is multi-thread enabled in the merch_batch_param table, this wrapper will spawn multiple threads to process the data.