Skip to main content

Settings for Routing Processes (Virtual Documents)

Provides reference information for settings of EnsLib.MsgRouter.RoutingEngineOpens in a new tab business process, which you use to route most kinds of virtual documents.

Summary

EnsLib.MsgRouter.RoutingEngineOpens in a new tab has the following settings:

Group Settings
Basic Settings Validation, Business Rule Name
Additional Settings Act On Transform Error, Act On Validation Error, Alert On Bad Message, Bad Message Handler, Forward Generated Response To Target, Response From, Response Target Config Names, Response Timeout, Force Sync Send
Development and Debugging Rule Logging

The remaining settings are common to all business processes. See Settings for All Business Processes.

Act On Transform Error

If True, causes errors returned by a transformation to stop rule evaluation and the error to be handled by Reply Code Actions setting.

Act On Validation Error

If True, causes errors returned by validation to be handled by Reply Code Actions setting.

Alert On Bad Message

If True, any document that fails validation automatically triggers an alert.

Bad Message Handler

If the document fails validation, and if the routing process has a configured Bad Message Handler, it sends the bad document to this business operation instead of its usual target for documents that pass validation.

See Defining Bad Message Handlers.

Business Rule Name

The full name of the routing rule set for this routing process.

Force Sync Send

If True, make synchronous calls for all “send” actions from this routing process. If False, allow these calls to be made asynchronously. This setting is intended to ensure FIFO ordering in the following case: This routing process and its target business operations all have Pool Size set to 1, and ancillary business operations might be called asynchronously from within a data transformation or business operation called from this routing process.

If Force Sync Send is True, this can cause deadlock if another business process is called by a target that is called synchronously from this routing process.

Note that if there are multiple “send” targets, Force Sync Send means these targets will be called one after another in serial fashion, with the next being called after the previous call completes. Also note that synchronous calls are not subject to the Response Timeout setting.

Forward Generated Response To Target

Specifies whether to forward any response (generated by the routing engine) to the configuration items specified by the setting Response Target Config Names. The default is True.

Response Target Config Names

Specifies a comma-separated list of configuration items within the production to which the business service should relay any reply documents that it receives. Usually the list contains one item, but it can be longer. The list can include business processes or business operations, or a combination of both.

This setting takes effect if either of the following is true:

  • The Response From setting has a value.

  • The setting Forward Generated Response To Target is enabled and the router generates a response.

Response From

A comma-separated list of configured items within the production. This list identifies the targets from which a response may be forwarded back to the original caller, if the caller requested a response.

If a Response From string is specified, the response returned to the caller is the first response that arrives back from any target in the list. If there are no responses, an empty “OK” response header is returned.

The Response From string also allows special characters, as follows:

  • The * character by itself matches any target in the production, so the first response from any target is returned. If there are no responses, an empty “OK” response header is returned.

  • If the list of targets begins with a + character, the responses from all targets return together, as a list of document header IDs in the response header. If none of the targets responds, an empty OK response header is returned.

  • If the list of targets begins with a - character, only error responses will be returned, as a list of document header IDs in the response header. If none of the targets responds with an error, an empty OK response header is returned.

If this setting value is unspecified, nothing is returned.

Response Timeout

Maximum length of time to wait for asynchronous responses before returning a “timed-out error” response header. A value of -1 means to wait forever. Note that a value of 0 is not useful, because every response would time out. This setting takes effect only if the Response From field has a value.

Rule Logging

If logging is enabled controls the level of logging in rules. You can specify the following flags:

  • e—Log errors only. All errors will be logged irrespective of other flags, so setting the value to 'e' or leaving the value empty will only log errors.

  • r—Log return values. This is the default value for the setting, and is also automatic whenever the 'd' or 'c' flags are specified.

  • d—Log user-defined debug actions in the rule. For details on the debug action, see Adding Actions. This will also include 'r'.

  • c—Log details of the conditions that are evaluated in the rule. This will also include 'r'.

  • a—Log all available information. This is equivalent to 'rcd'.

The following table compares these options:

Setting Value Logs errors Logs return values Logs debug actions Logs condition details
empty YES no no no
e YES no no no
r YES YES no no
d YES YES YES no
c YES YES no YES
a YES YES YES YES

Note that if the setting is e or is set to an empty string, no log entries are generated except for errors.

Validation

For allowed values and basic information, see the Validation setting for business services.

If the document fails validation, the routing process forwards the document to its bad message handler, as specified by the Bad Message Handler setting. If there is no bad message handler, the routing process does not route the document, but logs an error. Also see Alert On Bad Message.

FeedbackOpens in a new tab