Fix for Broker crash with SLM error in the error viewer
Date: 29-08-05
Problem description
At Paccar it has been observed that Broker sometimes crashes and in the Event Viewer there is an error from SLM reported, with no readable message.
On one occasion when this happened on 25th of August, we observed it was related to a “ping” call that failed, which caused the PullingPurchaseOrders script to go into an error handling catch block.
In this block, we used to stop the periodic processes (from the parallel run). However, the pulling orders scripts have been changed by commenting out the line that stops the periodic process. The changes were on 04-07-05, commented with Tech03.
Below there is an explanation why this causes a crash of Broker when that piece of script is executed.
This is how the script looks like now:
//If one of the BaanIV buscomponents is not running, stop the periodic process
|
|
Number n = BaanIV_WMS4000PeriodicProcessespDPullPurchaseOrders.queryState();
|
|
if (n & PERIODIC_RUNNING) |
ß the if line is NOT commented out |
// BaanIV_WMS4000PeriodicProcessespDPullPurchaseOrders.stop(); |
ß this line is commented out in fix Tech03
|
String Message = “Periodic process \BaanIV_WMS4000\PeriodicProcesses\pDPullPurchaseOrders stopped.”; |
ß the if applies now for this line, so this will never be executed when parallel processes are not running
|
Number logged = BaanIV_WMS4000CommonScriptsLogToFile.run(Message); |
ß this is the first line executed after if, which will fail because the variable Message is not known.
|
Solution description
The problem described above appears in the following scripts:
BaanIV_WMS4000ManualProcessesPullingProductionOrders{}
BaanIV_WMS4000ManualProcessesPullingPurchaseOrders{}
BaanIV_WMS4000ManualProcessesPullingReplenishmentOrders{}
BaanIV_WMS4000ManualProcessesPullingSalesOrders{}
BaanIV_WMS4000ManualProcessesPullingWarehouseTransfersOrders{}
The fix consists of commenting out the lines:
// Number n = BaanIV_WMS4000PeriodicProcessespDPullPurchaseOrders.queryState();
// if (n & PERIODIC_RUNNING)
The changes are marked with the comment //CC250805.n
This allows the script to execute from the lines:
String Message = “Periodic process \BaanIV_WMS4000\PeriodicProcesses\pDPullPurchaseOrders stopped.”;
Number logged = BaanIV_WMS4000CommonScriptsLogToFile.run(Message);
The attached ofa, called UAT3_fix_SLMError.ofa is generated from the system leyleyw01450, based on the scripts from the ManualProcesses folder that were the same as the scripts on the live server.
No script dependencies are affected by this fix, therefore only the scripts from the manual processes are delivered.
The UAT3_fix_SLMError.ofa contains the following objects:
BaanIV_WMS4000ManualProcessesPullingProductionOrders{}
BaanIV_WMS4000ManualProcessesPullingPurchaseOrders{}
BaanIV_WMS4000ManualProcessesPullingReplenishmentOrders{}
BaanIV_WMS4000ManualProcessesPullingSalesOrders{}
BaanIV_WMS4000ManualProcessesPullingWarehouseTransfersOrders{}
BaanIV_WMS4000ManualProcessesPulshingAllEvents{}
NOTE: the script PushingAllEvents is unchanged, but it is delivered because it is part f the Tech03 solution.
Installation instructions
1) stop or disable the periodic process PeriodicRun on the Broker service
2) import the six objects from the ofa file Delivery_310805_fix_SLMError.ofa; choose to overwrite when prompted
3) Execute Archive.reparse() on the folder BaanIV_WMS4000ManualProcesses and Customizations_BaanIV_WMS4000SequentialPeriodicPocesses
4) Restart the periodic process PeriodicRun