Topic 9.1.1 Middleware Configuration editor
Middleware Configuration Editor
You can configure the custom mapping file that middleware uses while processing commands. The Middleware Configuration Editor allows you to edit the database and middleware communication configuration items. The Middleware Configuration Editor runs on the middleware server.
To open the Middleware Configuration Editor, click Start | All Programs | Wonderware | MES | Utilities | Middleware Configuration Editor.
The Middleware Configuration Editor allows you to modify custom middleware mappings and to change how messages are processed by the WCF Middleware.
The Middleware Configuration Editor allows you to configure the following settings:
- Middleware Settings
- Command (SP) Timeouts
- Custom DB SP Mappings
- Custom Batch SP Mappings
- Extensibility Hooks
You must restart the MES Middleware Host service if you change these settings. In some cases, you have to restart any running clients also.You can use this tab to configure the middleware settings. The middleware settings affect the communication of the MES Middleware Host with the clients and the MES database.
When any changes are made to the Client Settings, all running clients must be restarted before they detect the changes. Also, changes to the HTTP or TCP Ports requires all running clients to be restarted.
Timeout Command Values
You can configure a timeout command value in the Wonderware MES database. This is necessary for a procedure that runs longer than the default command time. If clients consistently get timeout errors from the database when calling a specific middleware method, they may have to increase the timeout for the specific method.
The Command (SP) Timeouts tab shows the stored procedures or methods and the corresponding timeout values under the Method Name and Timeout value columns respectively.
A method name is a two part object.command name that the middleware maps to a stored procedure name. The method name is derived from the Object/Cmd/MsgType elements in the XML message sent to the Middleware. If the MsgType is exec or getspec, then the method name is created by combining the Object and Cmd with a period, for example ent.add. If the MsgType is getall, getbykey, or some other value, then the method name is created by combining the Object and the MsgType with a period, for example ent.getbykey.
Custom Mapping
You can use the Middleware Settings tab to configure the custom mapping for a stored procedure in the Wonderware MES database. The Wonderware MES Middleware Service accepts the XML commands that have the Object/Command/MsgType identifier.
The middleware generates an automatic mapping between the Object/Command/MsgType identifiers and their associated stored procedures. You can configure the mappings between the Object/Command/MsgType identifiers and their associated stored procedures on this tab.
You can use this tab to configure the custom mapping for the custom batch-oriented stored procedures in the Wonderware MES database.
These custom stored procedures accept XML as their first parameter and process the XML internally. The stored procedures process the XML commands in batches.
The Custom DB SP Mappings tab shows the method names and the corresponding stored procedure names in the Custom Method Name and Custom Stored Procedure Name columns respectively.
The difference between this mapping and the mapping defined by the Custom DB SP Mapping tab is that the stored procedures that are defined here must have an input parameter named xml_source or in_xml_source. The stored parameter is passed for the entire XML command.
Extensibility Hooks
Extensibility Hooks allow for the execution of custom code or stored procedures prior to (pre-hook) or after (post-hook) the execution of a specific middleware method.