MES Middleware Extensibility Hooks
- Last UpdatedMay 17, 2023
- 1 minute read
An MES Extensibility Hook is a mechanism for invoking an assembly or a stored procedure to perform custom actions before and/or after a specific middleware event is executed.
The topics in this section describe how the hooks function with the middleware, explain how to configure hooks, and provide configuration and execution examples.
Middleware Extensibility Hooks allow end users to execute custom functionalities, such as invoking a System Platform-based workflow, calling a custom stored procedure, or calling a method in an assembly, before or after processing the middleware event. This allows the end user to use their custom functionalities to check for specific conditions or perform certain processes beyond those supported by standard MES functionality.
The Extensibility Hooks configuration is stored in the middleware folder, and it is loaded into the MES middleware host’s memory to execute the hooks when a corresponding middleware event is made to the MES middleware.
The middleware can be configured for a set of one or more hooks against a single middleware event. That is, when the Extensibility Hooks are configured for a middleware event, the MES middleware executes the pre-hook before the middleware event is processed, processes the middleware event, and then executes the post-hook after the middleware event. The hook configurations provide an option to cancel the entire middleware event, including the executions of pre- and post-hook in case of an error. The pre-hook configuration also provides an option for an end user to stop processing the middleware event, if the standard middleware functionality is embedded inside the custom implementation.