Action
- Last UpdatedMay 17, 2023
- 1 minute read
In this case, when a new UOM is added from the MES Client application or by using a System Platform script to add the UOM, the middleware executes the stored procedure sp_I_Uom_Log, and evaluates the result before actually processing the standard middleware call sp_I_Uom to create a new unit of measurement in the MES database. Since the Middleware Flow parameter is set to Stop after executing the custom (pre-hook) stored procedure, the sequence of execution stops and returns the following error to the client:
Error message from the custom hook stored procedure - sp_I_Uom_Log
Note that even if there are no errors in the custom hook stored procedure, the normal middleware call will never be processed in this case, because the the Middleware Flow parameter is set to Stop after executing the pre-hook call. That is, in this case, the middleware never adds the unit of measurement.