Oracle® Retail Advanced Inventory Planning Implementation Guide Release 14.1 E64951-02 |
|
![]() Previous |
![]() Next |
This chapter describes the configuration that must be completed for AIP and includes these topics:
After AIP is installed, you must define the environment variables for the domain paths, integration directory paths, message logging levels, and so forth. These variables define the environment in which batch scripts are run. These settings do not affect the way in which the business uses AIP to replenish the supply-chain.
The scripts run as part of the nightly batch on both of the AIP platforms, RPAS and Oracle. Both platforms have defined environment variables for configuration.
The following aspects of the RPAS-side batch must be configured so that the controller scripts-aip_batch.sh, aip_export_to_ro.sh, and aip_import_from_ro.sh, and each batch step script can be run from the command line or from a job scheduler.
The position level security for RPAS needs to be modified. Position Level Security allows access control for dimensions on a position-by-position basis. Refer to the Oracle Retail Predictive Application Server Administration Guide for detailed information about this feature. To specify the security dimension for a hierarchy, use the RPAS Configuration Tools or hierarchyMgr utility. Refer to the Oracle Retail Predictive Application Server Configuration Tools User Guide for more information.
The variables listed in Table 4-1 must be defined properly within aip_env_rpas.sh
.
Note that the values of the environment variables can be variables themselves, depending on the business needs. Such variables can add flexibility for environment maintenance and patch testing and are used at the discretion of the business.
Example:
If aip_env_rpas.sh
contains
RPAS_INTEGRATION_HOME="${TEST_RPAS_INTEGRATION_HOME}"
TEST_RPAS_INTEGRATION_HOME
is a client-specific environment variable whose value is the correct path to the root integration directory. This and all other such variables must also be defined in order to run the batch.
Finally, the variables in Table 4-1, which correspond to directory paths, must not contain white space. For example, AIPDOMAIN can be defined as ”/files1/aip/AIP1
” but cannot be defined as ”/files1/aip/AIP-RPAS Domain
”.
Table 4-1 Environment Variables for aip_env_rpas.sh
Environment Variable | Description |
---|---|
AIP_SCHEMA_DIR |
Fully qualified path to directory that contains RETL schema files depicting the transformed RMS output data. |
AIPDOMAIN |
Fully qualified path of the AIP-RPAS global domain. The default value (TEST_AIPDOMAIN) provided at the time of installation is a variable that must also be defined as part of aip_env_rpas.sh if it is to be retained as the value. |
AUTOMATIC_PEND_DERANGE_DISCONTINUE_PS |
This environment variable is used to logic for pending deranging of discontinued pack sizes. |
AUTOMATIC_STORE_SOURCE_ASSIGNMENT |
This environment variable controls the AIP-RPAS Automation of store source. |
BSA_ARCHIVE_DIR |
Fully qualified path to directory to which BSA file processing operations will archive files. Valid definition of this variable is required by the BSA common scripts. |
BSA_CONFIG_DIR |
Fully qualified path to directory that contains the BSA configuration file bsa_prep_files.config. Valid definition of this variable is required by the BSA common scripts. |
BSA_LOG_HOME |
Fully qualified path of readable/writeable directory where script logs will be rooted. Script logs are written into a hierarchy that parallels the script call tree, rooted in a date-stamped directory located in this specified directory. Valid definition of this variable is required by the BSA common scripts. |
BSA_LOG_LEVEL |
Script logging threshold severity. Only log entries at this or higher severity levels will be written to the script logs. Must be one of { PROFILE | DEBUG | INFORMATION | WARNING | ERROR }. Valid definition of this variable is required by the BSA common scripts. |
BSA_LOG_TYPE |
Integer parameter that specifies the type of script log files to be written. Must equal one of { 0 | 1 | 2 | 3 }. These values are defined as follows: 0 = No logging 1 = Text ”.log” files; 2 = XML structured ”.xml” file; 3 = Text and XML log files. Valid definition of this variable is required by the BSA common scripts. |
BSA_MAX_PARALLEL |
Script parallel process fan-out maximum. The number of processes that any given process (script instance) can spawn. Valid definition of this variable is required by the BSA common scripts. |
BSA_SCREEN_LEVEL |
Script screen output threshold severity. Only display entries at this or higher severity levels will be displayed to the screen. Must be one of PROFILE | DEBUG | INFORMATION | WARNING | ERROR }. Valid definition of this variable is required by the BSA common scripts. |
BSA_TEMP_DIR |
Fully qualified path of readable/writeable directory where scripts can store temporary files. Valid definition of this variable is required by the BSA common scripts. Note: This should not be set to /tmp. Failures can occur due to insufficient temporary workspace. |
DEFAULT_DOMAIN |
Fully qualified path of the AIP-RPAS local domain into which any new subclass will be added. |
LIMIT_OF_SKPS_LOCAL_DOMAIN |
Maximum number of SKU-Pack Sizes allowed in a local domain when considering where to add a new subclass received from Merchandising System. |
ORACLE_AIP_PERISHABLE_ON |
This UNIX variable is set to yes (ORACLE_AIP_PERISHABLE_ON=yes) when AIP is replenishing perishable products. This setting is case sensitive. |
RAW_RMS_DATA_DIR |
Fully qualified path to directory that contains untransformed RMS output data. |
RMS_SCHEMA_DIR |
Fully qualified path to the directory that contains the RETL schema files corresponding to the untransformed RMS output data. |
RPAS_INTEGRATION_HOME |
Fully qualified path of a readable/writeable directory that serves mainly as a base for other path definitions later in aip_env_rpas.sh. Commonly set equal to AIPDOMAIN. The default value (TEST_RPAS_INTEGRATION_HOME) provided at the time of installation is a variable that must also be defined as part of aip_env_rpas.sh if it is to be retained as the value. |
RPAS_LOG_LEVEL |
RPAS binary logging threshold severity. Only log entries at this or higher severity levels will be written to the script logs from binaries that accept a -loglevel argument. Must be one of: { PROFILE | DEBUG | INFORMATION | WARNING | ERROR }. |
RPAS_PAGE_SPLIT_PERCENTAGE |
This variable is used to optimize AIP performance. Do not alter this setting without consulting AIP Technical Management. |
Note: aip_env_rpas.sh also includes some Implementation Parameters. See Chapter 6, "AIP-RPAS Configurations" for details on these parameters. |
The variables listed in Table 4-2 must be defined properly in order for the Oracle Retail Replenishment Optimization (RO) integration controller scripts to execute.
Installations not integrating with a replenishment optimization solution can disregard these settings.
Table 4-2 Environment Variables for aip_ro_common.sh
Environment Variable | Description |
---|---|
RO_INPUT |
The location of input data copied or transferred from the RO server. |
RO_OUTPUT |
The location of output data to be copied or transferred to RO. |
RO_CONFIG |
The location of RO integration configuration files. |
RO_FILE_TYPE |
The file type for data exchange between AIP and RO. Must be either csv or txt. |
This value defines TODAY for the AIP-RPAS environment. It is used to ensure that the replenishment batch can be run for a single calendar day, independent of the actual server date. During a normal production run of the batch, this value should be set by the VDATE (virtual date) value exported from AIP Online. This variable can be set for ad hoc procedures, but it should be cleared after the procedure has completed, as this can have an adverse affect on the user workbooks.
Prior to AIP batch execution, the System Administrator should ensure that the limit of available file handles (ulimit -n <number>) is above 2000 file handles per process. Setting ulimit to less than the recommended value can cause the AIP batch process to fail. Exercise caution while setting this system variable. Do not set this too high, as it can seriously impact performance system-wide.
This section describes how to configure the AIP online environment variables.
The aip_env_online.sh variables in the following table must be configured for your environment. This information can also be found in the README file provided with the online integration files.
Note that the values of the environment variables can be variables themselves, depending on the needs of the client. Such variables can add flexibility for environment maintenance and patch testing and are used at the discretion of the business.
Table 4-3 Environment Variables for aip_env_online.sh
Environment Variable | Description |
---|---|
INTEGRATION_HOME |
Fully qualified path to the interface home directory. The default value references TEST_ONL_INTEGRATION_HOME, an externally defined variable. You can assign a hardcoded path to this value. |
ONL_OUTBOUND_DIR |
The default is |
ONL_INBOUND_DIR |
The default is |
BSA_ARCHIVE_DIR |
The default is |
BSA_LOG_HOME |
Fully qualified path of readable/writeable directory where script logs will be rooted. Script logs are written into a hierarchy that parallels the script call tree, rooted in a date-stamped directory located in this specified directory. Valid definition of this variable is required by the BSA common scripts. This variable is initially set to |
BSA_CONFIG_DIR |
Fully qualified path to directory that contains the BSA configuration file bsa_prep_files.config. Valid definition of this variable is required by the BSA common scripts. This variable is initially set to |
BSA_TEMP_DIR |
Fully qualified path of readable/writeable directory where scripts can store temporary files. Valid definition of this variable is required by the BSA common scripts. |
BSA_LOG_LEVEL |
Logging severity threshold for batch scripts. Only log entries at this or higher severity levels will be written to the script logs from procedures that accept the -loglevel argument. Listed in increasing order of severity, one of the following levels must be selected { PROFILE | DEBUG | INFORMATION | WARNING | ERROR }. |
BSA_LOG_TYPE |
Integer parameter that specifies the type of script log files to be written. Must equal one of { 0 | 1 | 2 | 3 }. These values are defined as follows: 0 = No logging 1 = Text ”.log” files 2 = XML structured ”.xml” file 3 = Text and XML log files Valid definition of this variable is required by the BSA common scripts. |
BSA_MAX_PARALLEL |
Script parallel process fan-out maximum. The number of processes that any given process (script instance) can spawn. Valid definition of this variable is required by the BSA common scripts. |
DEFAULT_BSA_SQL_CRED_APP |
The default is DATABASE. It is used by bsa_sql.sh script to perform a lookup from the config.xml file to connect to the AIP Online database. |
RETL_MAX_HEAP_SIZE |
The default value is 700M. Raise this limit to improve performance on production systems. |
RETL_CONFIG_FILE |
File name containing database connection information. This variable is used by RETL scripts. The default value references TEST_RETL_CONFIG_FILE, an externally defined variable. The client can assign a hardcoded value. In either case, the variable should ultimately point to the fully-qualified path of a RETL configuration file. An example config.xml file is included with AIP. |
AIPDOMAIN |
Fully qualified path of the AIP-RPAS global domain. The default value references TEST_AIPDOMAIN, an externally defined variable. The client can assign a hardcoded path to this value. |
ONL_DB_ALIAS |
This variable holds the alias of the AIP database credentials in the Oracle Wallet. This alias is used by AIP shell scripts to access the Oracle Database. |
ONL_SCHEMA_OWNER |
This variable sets the database schema owner. It is used by the store_source extract. For example, if you are running AIP online extracts as aipdev131user but the schema owner is aipdev131, then regardless of the running database user, ONL_SCHEMA_OWNER should be set to aipdev131. |
NLS_LANG |
This variable defines the character encoding of the RETL import files. |
ONL_VDATE_DIR |
The directory location of the vdate.int file. |
ONL_DATA_DIR |
This variable defines the location of data directory that contains the compressed and zipped orders from AIP-RPAS (Such as, location where srp.tar.Z is placed for cron_import_order). |
RETL_INIT_HEAP_SIZE |
The default value is 200M. Raise this limit to improve performance on production systems. |
ONL_IMPORT_DIR |
This variable defines the location of all lower-level script files that are used for importing data into AIP Online. Default value of this variable is: ${INTEGRATION_HOME}/scripts/import. |
ONL_EXPORT_DIR |
This variable defines the location of all lower-level script files that are used for exporting data from AIP Online. Default value of this variable is: ${INTEGRATION_HOME}/scripts/export. |
ONL_SCHEMA_DIR |
This variable defines the location of all lower-level XML schema files that are used for importing and exporting data from AIP Online. This variable is internally used by lower-level importing and exporting scripts. |
Note: RETL runs within a Java Virtual Machine (JVM). Errors concerning the JVM stack size can be encountered when executing AIP Oracle batch processes. This value represents the amount of memory allocated to a single JVM thread and is defaulted by the JVM. You can override it by setting the RETL_THREAD_STACK_SIZE variable in aip_env_online.sh or in your user profile.Example:
It can also be set in rfx.conf, the configuration file for RETL itself. However, modifying rfx.conf will affect all users accessing the RETL installation, not just those using AIP. When manipulating the JVM stack size, extreme care must be taken to prevent RETL from using an inordinate amount of the available physical memory. |
Once RETL is installed, the environment variables listed in Table 4-4 should be defined. Verify that these environment variables are properly defined.
When you invoke online shell scripts, the PATH must include the following directories:
$INTEGRATION_HOME
$INTEGRATION_HOME/bsa
$INTEGRATION_HOME/config
$INTEGRATION_HOME/scripts
$RFX_HOME
$RFX_TMP
$ORACLE_HOME
Example:
If aip_env_online.sh contains:
INTEGRATION_HOME= "${TEST_ONL_INTEGRATION_HOME}
"
TEST_ONL_INTEGRATION_HOME
is an environment variable whose value is the correct path to the root integration directory. The path that is defined for
TEST_ONL_INTEGRATION_HOME
must be in the your PATH.
This topic provides information about using the Scheduler to run the AIP on RPAS and AIP on Oracle overnight batch processes. The overnight batch processes span both platforms and depend on inputs from the merchandising, forecasting, and optimization systems.
Note: For details on scheduling the Intra-day batch processes, refer to these chapters in the Oracle Retail Advanced Inventory Planning Operations Guide:
|
The following control scripts can be used to execute AIP batch:
aip_batch.sh | cron_purge.sh |
aip_export_to_ro.sh | cron_release.sh |
aip_import_from_ro.sh | merge_order.sh |
aip_t_master.ksh | post_scale.sh |
batch_lock.sh | pre_scale.sh |
cron_export.sh | purge_log.sh |
cron_import.sh | scale_order.sh |
cron_import_order.sh | smooth_order.sh |
cron_post_release.sh | vdate.sh |
If the Oracle Retail Integration Bus (RIB) is not used to communicate the purchase orders and transfers released by the overnight batch, the following script should also be used:
tsf_po_export.sh
Also, once a week or once a month, the data purging script can be run to delete invalid or ineffective data from Oracle tables by executing following script:
scripts/aip_purge.sh
This script should be followed by executing purging_aip_batch.sh. to make corresponding changes in AIP-RPAS database
Many of these control scripts accept or require parameters to indicate the specific logic to execute. Therefore, you will notice that the control script can be called multiple times with different parameters. Where restart/recovery at the control script level is not sufficiently granular, the sub-scripts, called by the top level control script, can be scheduled instead. However the scheduled tasks must carefully consider all tasks run by the control script, including common environment control.
Figure 4-1 outlines the AIP script/step execution and dependencies. Note that the shaded boxes of the pre-critical, critical, and post-critical diagrams represent the executable steps of aip_batch.sh
. The aip_batch.sh
step name, in bold, can be passed into the script as a parameter, or the subscript, listed below the step name, can be scheduled.
Note: AIP does not move data between platforms internally or retrieve files that were generated external to AIP. All data that is input to AIP must be transferred by FTP or copied to the appropriate inbound directory on the AIP server. |
Figure 4-1 and Table 4-5 provide information about the pre-critical path steps that must be performed.
Table 4-5 provides information about the script or action performed in the Pre-Critical Tasks process flow diagram. These steps include the scaling module scripts that are only required by those retailers who are supplier scaling and/or container scaling.
Table 4-5 Pre-Critical Tasks Process Scripts or Actions
Script or Action | Parameters | Platform Location |
---|---|---|
Bring down the domain daemon to lockout users before the start of overnight batch. |
not applicable |
RPAS |
batch_lock.sh |
-l -1 |
Oracle |
vdate.sh |
inc export |
Oracle |
cron_export.sh |
not applicable |
Oracle |
Copy/FTP vdate.int file from:
|
not applicable |
RPAS |
Copy/FTP AIP Online export files from:
|
not applicable |
RPAS |
Copy/FTP RMS data files to: |
not applicable |
RPAS |
aip_t_master.ksh |
not applicable |
RPAS |
Copy/FTP all external/custom data files to: |
not applicable |
RPAS |
aip_batch.sh |
check_process_external_data |
RPAS |
aip_batch.sh |
prep_onl_data |
RPAS |
aip_batch.sh |
merge_hierarchies |
RPAS |
aip_batch.sh |
convert_hierarchies_for_loading |
RPAS |
aip_batch.sh |
reconfig_domain_partitions |
RPAS |
aip_batch.sh |
load_all_hierarchies |
RPAS |
aip_batch.sh |
load_onl_data |
RPAS |
aip_batch.sh |
load_rms_dm_data |
RPAS |
aip_batch.sh |
create_alerts |
RPAS |
aip_batch.sh |
load_non_rms_external |
RPAS |
aip_batch.sh |
auto_commit_wkbooks_batch |
RPAS |
aip_batch.sh |
run_dm_batch |
RPAS |
aip_batch.sh |
export_dm_data |
RPAS |
Copy/FTP RPAS export files from: |
not applicable |
Oracle |
aip_batch.sh |
check_import_online_schedule |
RPAS |
aip_batch.sh |
dmb_master_post |
RPAS |
cron_import.sh |
dm |
Oracle |
cron_import.sh |
dm_external |
Oracle |
process_pack_change_events.sh |
not applicable |
Oracle |
process_sku_change_events.sh |
not applicable |
Oracle |
generate_sched.sh 0 |
not applicable |
Oracle |
cron_export_sched.sh |
not applicable |
Oracle |
Copy/FTP SKU dimension export files to: |
not applicable |
Oracle |
cron_import.sh |
sku-attributes |
Oracle |
pre_scale.sh |
not applicable |
Oracle |
Copy or FTP the RDF forecast files to: |
not applicable |
RPAS |
aip_batch.sh |
check_load_forecast_data |
RPAS |
aip_batch.sh |
purge_low_variability_advance |
RPAS |
aip_batch.sh |
purge_truncate_history |
RPAS |
aip_batch.sh |
copy_sister_data |
RPAS |
Copy/FTP RMS and custom OM data files to: |
not applicable |
Oracle |
cron_import.sh |
om |
Oracle |
Figure 4-2 displays the Critical Path Tasks process flow diagram.
Note: The release of Purchase Orders can be run before the release of Transfers; however, the release of Transfers and Purchase Orders must not run in parallel when using thetsf_po_export.sh script to extract the Transfers and/or POs to a flat file. |
Note: cron_release must not be run for a second time until tsf_po_export.sh has completed for the previous set. |
Table 4-6 provides information about the critical path steps that must be performed.
Table 4-6 Critical Path Tasks Process Scripts or Actions
Script or Action | Parameters | Platform Location |
---|---|---|
Copy/FTP the RMS inventory position files to |
not applicable |
RPAS |
aip_batch.sh |
check_process_inventory_data |
RPAS |
aip_batch.sh |
load_replenishment_data |
RPAS |
aip_batch.sh |
run_replenishment |
RPAS |
aip_batch.sh |
export_replenishment_data |
RPAS |
aip_batch.sh |
send_replenishment_to_online |
RPAS |
Copy/FTP RPAS export files from |
not applicable |
Oracle |
cron_import_order.sh |
-o transfer -d all |
Oracle |
cron_release.sh |
-o transfer -d all |
Oracle |
tsf_po_export.sh (for RIB bypass) |
-o transfer -d all |
Oracle |
cron_import_order.sh |
-o purchase -d all |
Oracle |
smooth_order.sh |
not applicable |
Oracle |
scale_order.sh |
releasing_today |
Oracle |
merge_order.sh |
releasing_today |
Oracle |
cron_release.sh |
-o purchase -d all |
Oracle |
generate_cross_dock_dcrp.sh |
not applicable |
Oracle |
generate_pre_alloc_dcrp.sh |
not applicable |
Oracle |
cron_export_dcrp.sh |
not applicable |
Oracle |
tsf_po_export.sh (for RIB bypass) |
-o purchase -d all |
Oracle |
When bypassing the RIB, copy/FTP the AIP purchase order and transfer files from |
not applicable |
Oracle |
Figure 4-3 displays the Post Critical Path Tasks process flow diagram.
Table 4-7 provides information about the post-critical path steps that must be performed. These steps include the scaling module scripts that are only required by those retailers who are supplier scaling and/or container scaling.
Table 4-7 Post Critical Path Tasks Process Scripts or Actions
Script or Action | Parameters | Platform Location |
---|---|---|
scale_order.sh |
releasing_in_future |
Oracle |
merge_order.sh |
releasing_in_future |
Oracle |
aip_batch.sh |
post_dcrp_import |
RPAS |
aip_batch.sh |
post_ocs_import |
RPAS |
aip_batch.sh |
run_replenishment_post_processing |
RPAS |
aip_batch.sh |
run_dm_alerts |
RPAS |
aip_batch.sh |
export_dm_alerts |
RPAS |
cron_import.sh |
alerts |
Oracle |
aip_batch.sh |
run_srp_alerts |
RPAS |
aip_batch.sh |
run_wrp_item_alerts |
RPAS |
aip_batch.sh |
run_wrp_network_alerts |
RPAS |
aip_batch.sh |
run_replenishment_alerts_post_processing |
RPAS |
aip_batch.sh |
auto_build_wkbooks_batch |
RPAS |
run_reports_calculation.sh |
run_reports_calculation |
RPAS |
run_dashboard.sh |
run_dashboard |
RPAS |
Start the AIP-RPAS domain daemon. |
RPAS |
|
cron_post_release.sh |
See the details of this script in the Oracle Retail Advanced Inventory Planning Operations Guide for the possible valid values of these two parameters. |
Oracle |
cron_purge.sh |
See the details of this script in the Oracle Retail Advanced Inventory Planning Operations Guide for the possible valid values of these two parameters. |
Oracle |
batch_lock.sh |
-u |
Oracle |
purge_log.sh |
Oracle |
The first opportunity that AIP will have to apply new replenishment settings to the plan is the next replenishment batch run that occurs after the data is loaded from RO. AIP assumes that RO or the legacy system that is providing the optimized replenishment settings has set the appropriate effective date for the data.
The following examples in Figure 4-4 and Figure 4-5 illustrate when the data is applied to the AIP replenishment plan.
For a particular virtual date, the replenishment batch run occurs after the loading of RO data into AIP. The loaded replenishment methods and thresholds will be used in the upcoming replenishment batch run.
This order of execution is only valid if RO RPAS_TODAY is set to Vdate + 1 before the data is extracted because the data loaded from RO will not be used in replenishment planning until the next replenishment batch run that occurs on vdate + 1. You must see the loaded data effective tomorrow, instead of today.
Figure 4-6 displays the export of data from AIP to RO.
Table 4-8 provides information about the export steps that must be performed. These steps assume that the data exported from AIP is limited by the RO Update Flag and that this information is specified by the RO User. It also assumes that the next set of sku/locations to be exported/optimized is not known until after the last import of replenishment data. Therefore, the file is not imported with the last set of optimized replenishment data files.
Figure 4-7 displays the import of replenishment optimization data from RO.
Table 4-9 provides information about the export steps that must be performed.
Purging data is important for maintaining database sizing as well as for improving the user experience. Purging data decreases the amount of data that a user has to sort through in order to get to the data that is desired.
Purging should be run on a routine basis, either weekly or monthly. Figure 4-8 and Table 4-10 provide information about purging data.
Table 4-10 Purging Script or Action
Script or Action | Parameters | Platform Location |
---|---|---|
aip_purge.sh |
RPAS |
|
Copy/FTP AIP Online purge_hierarchy.tar.Z file from: |
RPAS |
|
|
purging_prep_oracle_data |
RPAS |
|
purging_process_hierarchies |
RPAS |
Copy/FTP additional hierarchies to |
RPAS |
|
|
purging_load_hierarchies |
RPAS |
|
purging_process_measures |
RPAS |