Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Manufacturing Execution System

Frequently Asked Questions

  • Last UpdatedMay 17, 2023
  • 3 minute read

What are hooks? What is the purpose of having hooks configured in the MES middleware?

A hook represents a custom functionality implemented by the end user in the form of a stored procedure, assembly, workflow, and so on. The purpose of having a hook is to allow a custom functionality to be integrated as a part of standard MES event and execute that functionality as a part of standard MES event.

How do you determine the name of a stored procedure that corresponds to a specific middleware event?

In most cases, the name of the MES middleware event matches the name of the MES stored procedure. If not, they are configured in the MWDBMappings.xml file under the db_objects section. This XML file is in the Middleware folder of the MES application folder of a server on which the MES middleware was installed. It is recommended to first look in this file to find the name of the stored procedure that corresponds to the name of the middleware event.

The mappings in the MWDBMappings.xml file have the format

<object name=”object_name” value=”sp_name” />

Middleware events that correspond to Add, Delete, GetAll, GetSpecific, and Update actions on one table are not included in the MWDBMappings.xml file. These events are resolved automatically by the middleware without referring to that file. For information about the naming conventions for the MES stored procedures, see Stored Procedure Naming Conventions.

Yes, the stored procedures (names) configured in the custom database mappings can be used to configure the stored procedure hooks. The custom database mappings is a separate mechanism that allows to map a custom stored procedure created by an end user, and that allows an end user to call that custom stored procedure from the client applications using the standard XML structure used by the middleware.

Does the Middleware Server need to be restarted if a hook configuration is modified?

Yes, whenever a hook configuration is modified, the Middleware Server needs to be restarted to reload the changes in its memory. Otherwise, the changes are not effective until the Middleware Server is restarted.

If there is more than one Middleware Server, does the hook information need to be copied to more than one Middleware Server?

Yes. It is the responsibility of the end user to copy and synchronize the hooks configurations on all the Middleware Servers.

Does the pre-hook or the post-hook mechanism support the UpdateSpecific() method in the middleware to perform pre- or post-processing?

No. The UpdateSpecific() method in the middleware uses dynamic SQL (a SQL Update statement generated when needed and not pre-compiled) to update the data in the MES database. Since there are no stored procedures involved with the UpdateSpecific() method, pre- and post-hooks cannot be configured and executed against this method.

Under what user name is the custom (hook) assembly executed?

Like other the background tasks, the user account that is associated with the MES Middleware Host service that is running the middleware and processing the maintenance services will be the user associated with the custom (hook) assembly execution.

Do the extensibility hooks (i.e., custom stored procedures and custom DLLs) automatically upgrade when the standard MES product is upgraded?

No. The end user is responsible for upgrading the custom stored procedures and custom DLLs to synchronize the methods and parameters in the custom hooks with the methods and parameters in the standard MES product.

In This Topic
TitleResults for “How to create a CRG?”Also Available in