Planning Manager
The Planning Manager periodically performs many tasks, such as forecast consumption and master production schedule consumption, that require processing rows in an interface table.
Program Requirements
The Planning Manager has been designed to:
- Process the work itself, if there are only a few rows to process, rather than incurring the overhead of launching a new concurrent program.
- Divide the work across one or more Planning Manager Worker processes if there are many rows to process.
- Launch more Planning Manager Workers when there are more rows to process, and fewer workers when there are fewer rows to process.
- Avoid delaying the processing of one task due to another task. For example, relief of the master production schedule should not be delayed because the Planning Manager is busy processing rows for forecast consumption.
- Allow the user to configure the Planning Manager.
Configuration of Planning Manager
You can configure the Planning Manager to control how it divides the rows to be processed, and across how many processes those rows are divided. You can define the following profile options:
See: Profile Options.
Program Logic
The Planning Manager and Planning Manager Workers perform the following tasks:
- consume the master production schedule when work orders or purchase orders are created
- consume the master demand schedule when sales orders have shipped
- consume the forecast when sales orders are entered
- load forecasts from outside systems when rows are inserted into the interface table from an outside system
- load master schedules from outside systems when rows are inserted into the interface table from an outside system
The Planning Manager and the Planning Manager Workers perform the following logic for each task performed:
The above diagram illustrates the Planning Manager Worker Process logic. Below is a detailed explanation of the logic.
1. Update rows in the interface table where the status indicates that they are waiting to be processed. Update at most X rows, where X is the value of the profile option MRP:Planning Manager Batch Size.
2. Check to see if any rows were updated in Step 1. If not, there are no rows waiting to be processed.
3. Were the number of rows updated in Step 1 equal to the batch size? If not, all the remaining rows in the interface table can be processed by this process. If the number of rows updated equals the batch size, there could be more rows to process. Go to Step 4 to try to launch a Snapshot Worker.
4. The number of rows updated never exceeds the batch size, because we have limited the update in Step 1 to be less than or equal to the batch size number of rows.
5. It is possible that occasionally Oracle Master Scheduling/MRP launches a Snapshot Worker unnecessarily if the number of rows processed exactly matches the batch size. This is not a serious problem, however, as that extra worker simply wakes up, sees there is nothing to process, and exits.
6. Is the number of Planning Manager Workers running or pending less than the maximum number of workers? If yes, launch a Planning Manager Worker. Otherwise, do not launch a new Planning Manager Worker.
7. Process the rows that were updated in Step 1 according to the type of task being performed. If any errors occur during processing, update the status of the row to "Error". Otherwise, update the status of the row to "Processed".
8. Is this process the Planning Manager or a Planning Manager Worker? If this is the Planning Manager Worker, loop back to Step 1 and try to grab another set of rows to process. If this is the Planning Manager itself that is running, there should be no more rows to process. Do not grab more rows, as that may cause a delay in processing other tasks.
9. If this is the Planning Manager, move on to the next task to process. If there are no other tasks to process this cycle, resubmit the Planning Manager to wake up again after the interval of time set in the profile option. If this is a Planning Manager Worker, terminate the program.
See Also
Starting the Planning Manager