Harriet_Kim_1764

[Oracle Retail] Relation between the execute/restart job window entry parameters

Discussion created by Harriet_Kim_1764 on Aug 19, 2016
Question:
What is the relation between the execute/restart job window entry parameters vs. the entry parameters of the pl/sql function aw_retail_restart_recovery?

Please illustrate this by showing some examples.  For instance,
1. when launching a job X with 6 threads, which parameters configuration should be entered?
2. if restarting the job X after 2 threads aborted, which parameters configuration should be entered?

Answer:

First a quick explanation of threads in Oracle Retail.  Every program has a number of threads setting in the oracle retail database (most are 1). For each thread a status record is maintained for the current days activity.  These parameters work with these status records.

1. When launching a job X with 6 threads, which parameters configuration should be entered?

 zi4pr7d6pn0e.jpg

2. If restarting the job X after 2 threads aborted, which parameters configuration should be entered?

Example:  Let's assume threads 2 and 4 failed.

w0bnq1aqaqd9.jpg

The key parameters are Number of threads, Restart Recover Flag, and Threads to restart.
  • Number of threads: this is the total number of threads for the program to spawn.  This number is the same for initial run and restarts
  • Restart Recovery Flag: this allows a process’s Oracle Retail status to be switched to ‘ready for start’.  Program threads with a status other ‘ready for start’ cannot be executed.  For the initial run this could be ‘Y’ or ‘N’ (‘Y’ recommended); for restarts this value must be ‘Y’
  • Threads to restart: space separated list of thread numbers to restart.  For the initial run this should always be empty.  For restarts, enter the thread numbers to restart; leave blank to restart all threads.
Starting Extension Number appears to be something you might need to use for these cases, but not so.  There are actually two types of multi-threaded processes in Oracle Retail:
  • One program is submitted that spawns multiple threads.  If any of the threads fail, then the program files.  The example above is this type.
  • A program that can be run in multiple parallel instances.  This type has an allocated max number of “threads” (number of instances of the program).  
In the latter case, the Number of threads is always 1 because these types of programs don’t spawn threads.  
Threads to restart is always blank.  
Starting Extension Number is then the thread number that will be used to track this “threads” status - it will be the same on initial run and restart. Usually the Starting Extension Number is determined dynamical by way of process included in the Oracle Retail template that dynamically builds a workflow of these Jobs at runtime.

Request:  It is uncertain how these map to the pl/sql procedure, but if anyone can chime in and provide that information - it will be most appreciated!


Source of Reference:
Ray Dooley (Professional Service Sr. Consultant)

Outcomes