Skip to main content

Debugging Routing Rules

This topic describes how to test routing rules without sending the message through the entire production. It also contains flow diagrams that can help you debug problems in routing rules defined for EDI messages in a production.

Testing Routing Rules

Using the Test button of the Rule Editor, you can see whether a message triggers any of the routing rules without having to send the message through the entire production. Running this test does not transform or send the message, but any functions in the condition are executed as if the message ran through the production.

If you want to test a rule’s constraint that is based on the source of the message, use the Production Source field to specify the business host in the production that is sending the message. You can use the drop down menu to choose the business host from a list.

You can use the Context field to specify the contents of the message in one of three ways:

  • Specify User Input and then click next to paste the raw text of a message.

  • Specify the Document Body ID of an existing message. You can find the Document Body ID for a message by looking at the <Object Id> field on the Body tab of the Message Viewer.

  • Specify the Message Header ID of an existing message. If the Production Source field is blank, the Source Config Name in the message header is used as the source. You can find the Message Header ID for a message by looking at the <Object Id> field on the Header tab of the Message Viewer.

Testing with Raw Text of a Message

For a virtual document message routing rule, you can test the rule with the raw text of a message. To do so:

  1. Optionally, in the Production Source field, enter the business host that is sending the message.

  2. Choose User Input from the Context drop-down list.

  3. Click the Next button.

  4. Paste the raw text of the message in the Content text field.

    This can be the text of an HL7 message or an X12 message.

  5. Enter any other constraints that you want to test by entering information in the DocType field or by selecting from the Category or Name drop downs.

  6. Click Submit.

Test Results

The test results will tell you whether the message met a rule’s constraint and whether an if or else clause was triggered.

Security Requirements

A user must have the correct security privileges to test routing rules. They must have USE permissions for %Ens_RuleLog and %Ens_TestingService . In addition, they must have Select SQL privileges on Ens_Rule.log and Ens_Rule.DebugLog tables.

Strategies for Debugging Routing Rules

This section describes strategies for debugging the routing rules in an EDI message routing production.

The primary symptom for problems in routing rules is that the message does not reach its destination. Perhaps the message reaches a point along the way, such as a business operation or routing process within the routing production, but it does not reach its target destination, which is generally an application server outside InterSystems IRIS®. In that case you can follow the problem-solving sequence captured in the next four drawings: “Solving Problems with Routing Rules,” Drawings A, B, C, and D.

Solving Problems with Routing Rules (Drawing A)
Flow chart that remind you to specify the correct DocType, Schema, and Operation when messages do not arrive
Solving Problems with Routing Rules (Drawing B)
Flow chart showing that when messages do not arrive at their destination the rule name may not be specified correctly
Solving Problems with Routing Rules (Drawing C)
Flow chart showing rule definition errors and transformation errors as likely causes for messages not arriving
Solving Problems with Routing Rules (Drawing D)
Flow chart showing logical errors and production configuration errors as likely causes for messages not arriving
FeedbackOpens in a new tab