Go to primary content
Oracle® Retail Store Inventory Management Batch Operations Guide
Release 16.0
E76186-05
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

2 Batch Overview

The SIM batch programs are installed and configured by SIM Application Installer. See the "SIM Batch Scripts" in the Oracle Retail Store Inventory Management Installation Guide for batch install locations.

SIM batches are executed as Java batch processes. Most of the Java batch processes engage in some processing of their own. However, the majority of work is done by services running on the SIM server; the Java batch processes make remote calls to the server to access these services.


Note:

The following characteristics of SIM's Java batch processes:
  • They are not accessible through a graphical user interface (GUI).

  • They are scheduled by the retailer.

  • They are designed to process large volumes of data.


Running a Batch Process

SIM batch programs are run or scheduled through executable shell scripts (.sh files). Shell scripts for each SIM batch program are provided.

Batch program location is referred to as sim-batch-dir for the remainder of this chapter.

See the ”SIM Batch Scripts” in the Oracle Retail Store Inventory Management Installation Guide for batch install locations.

Each batch script performs the following internally:

  • Set up the class path before the Java process is run.

  • Start the Java batch process.

Do the following to configure a batch environment:

  1. Batch user logs in as valid batch user to the machine where SIM batch scripts are installed. The batch user must have permission to execute the SIM shell script.

  2. Set JAVA_HOME environment variable and add $JAVA_HOME/bin in the PATH environment variable. For example:

    JAVA_HOME=<jre location>
    PATH=$JAVA_HOME/bin:$PATH  
    export PATH JAVA_HOME
    

    Note:

    This command can be saved in a .profile file; the batch user can execute .profile before running SIM batches.

  3. Execute the batch script from <sim-batch-dir>/bin.

For more information about batch usage, see "Batch Details" in the ”"Batch Overview"” chapter.

Scheduler and the Command Line

Most SIM batches can be scheduled to run at any time (ad hoc) with no particular order, while some of batches might provide optimal results when run in a particular order. See Table 3-2 which provides some scheduling recommendations.

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.

Batch Job Exit Code

The following guidelines describe the function return values and the program return values that SIM's batch processes utilize:

  • 0 - Success

    The function completed without error, and processing should continue normally.

  • 1 - Failure

    Fatal error occurred (such as validation of an input record failed), the process terminates with exit code of 1.

  • 2 - Warning

    A non-fatal error occurred (such as validation of an input record failed), and the calling function should either pass this error up another level or handle the exception.

Batch Logging

Relevant progress messages are logged with regard to batch program runtime information.

The sim batch log location and logging levels can be configured in logback.xml file. The batch log configuration file logback.xml is located at <sim-batch-dir>/resources directory, see Oracle Retail Store Inventory Management Installation Guide for SIM batch directory location.

Changing Logging Levels

Sometimes it is useful to change the amount of information that the SIM batch process logs. There are two ways to change logging levels: editing the logback.xml file, or using the Oracle Enterprise Manager Application Server Control user interface.


Note:

After changing a log level in logback.xml the SIM server must be bounced before the change will take effect.

Transaction Timeout

This section describes how to change settings for transaction timeout.

A transaction timeout is the maximum duration, in seconds, for transactions on the application server. If the specified amount of time expires, the transaction is automatically rolled back.

The WebLogic Server EJB container automatically sets the transaction timeout if a timeout value is not defined in the deployment descriptor. The container uses the value of the Timeout Seconds configuration parameter which has default value of 30 seconds.

The default transaction timeout settings may not be sufficient for some of SIM's processes, especially batch processes.

To change the transaction timeout setting on SIM domain server, open the WebLogic Server Console, go to the JTA page for the domain SIM is installed in, and change the value in the Timeout Seconds field.