This chapter provides an overview of the batch processes of Oracle Retail Allocation. It also provides information about the functions of the batch processes, the java packages associated with the batches, and how to execute the java-based batches.
Allocation contains two batch processes that are run in Java. One of the batch process - purge.java deletes allocation records that have been marked as 'delete' in the database. Another batch process - AllocationAutoScheduleBatch.java creates the child allocations for parent allocations that are scheduled for the day.
Note the following general characteristics of Oracle Retail Allocation's Java batch process:
It is not accessible through a graphical user interface (GUI).
It is scheduled by the retailer.
It is designed to process large volumes of data, depending on the circumstances and process.
Note: The purge.java should only be executed during 'off-hours' (that is, during a time when users are not in the system such as nights). |
The following table describes Oracle Retail Allocation's batch processes and its associated Java packages:
The following table includes a description of Oracle Retail Allocation's batch processes:
Table 8-2 Allocation's Batch Process
Batch Processes | Details |
---|---|
Batch purge | |
(Purge.java) | The batch purging process deletes Oracle Retail Allocation records that have been marked as 'delete' in the database. This Oracle Retail Allocation deletion process must be run only during 'off-hours' (that is, during a time when users are not using the online Oracle Retail Allocation application system such as nights). |
Scheduler Batch |
|
AllocationAutoScheduleBatch.java |
The Allocation Auto Scheduler creates child allocations on pre-defined days of the week set by the Allocation user within the user interface. These allocations are created from an existing parent allocation. The auto creation of the child allocations must be called daily via a batch process at a scheduled time, set by the system administrator. Batches are run with an alias name rather than with a user name/password combination. The alias name is mapped to the user credentials inside a password store called a wallet. At run time the batches access the wallet and retrieves the user ID and password for authentication purposes. |
To run a Java-based batch process, Oracle Retail provides sample shell scripts (.sh files) and batch files (.bat files). These sample shell scripts must be modified according to the retailer's installation. They perform the following internally:
Set up the Java runtime environment before the Java process is run.
Trigger the Java batch process.
If the retailer uses a scheduler, arguments are placed into the scheduler.
If the retailer does not use a scheduler, arguments must be passed in at the command line.
For Unix systems, the Java process is scheduled through an executable shell script (.sh file).
Note: The AllocScheduleBatch.ksh batch can be run by an external scheduling system such as APPWORX or a simple UNIX CRON job. |
Installation and build scripts create the required user for running the batch in the wallet. There is no way you can cross check if the user is created inside the wallet other than running the batch scripts. However, you can see if the wallet is present in the environment by checking the wallet location. The wallet location is present in allocation.properties file. The wallet will be created with a user_id, password and an Alias name (dsAlias).
Make sure that the default_user from the allocation.properties file is set up fully as a valid application user. This is necessary because while running the batches, the Allocation application code itself is used. The default user must be set up in the following tables:
alc_users
alc_user_depts
alc_flexible_column
You can verify that the user set up is correct by logging into the Allocation application to create and calculate an allocation
Login to the application server machine using alcbatch/alcalc1. Once logged in, the default folder is /home/alcbatch.
Before running the batch, make sure that all the corresponding profile properties are set. For that run the profile file first. Go to the Profiles folder inside alcbatch.
If there are multiple environments, there are separate profile files for every machine (for example, QA, DEV, TEST). Make sure to identify the right profile file here. Most likely it will be the name of the environment, run the profile file -./alc132Linuxdev (for example, Dev 13.2 Env)
After running the profile successfully, go back to alcbatch. There are separate folders for every machine's batch under the alcbatch folder. Go to the current machine's folder. (Most likely the folder name would be same as your profile filename, in this case alc132Linuxdev)
Navigate to the batch folder. If the batch folder is not found it means the batch installation did not occur properly. In the batch folder, verify that theAllocScheduleBatch.ksh file is present.
Run the AllocScheduleBatch.ksh batch using the following command:
ksh AllocScheduleBatch.ksh dsAlias
The batch will run by taking the batch user from wallet.