Skip to main content

Debugging Routing Rules

This chapter 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

Important:

Currently, testing functionality is only available in the legacy version of the Rule Editor. To open a rule in the legacy Rule Editor, open the new Rule Editor, select the User Profile icon, and then select Open in Zen Rule Editor.

Using the Test tab 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 for test field to specify the business host in the production that is sending the message. You can click the Select button to choose the business host from a list.

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

  • Paste the raw text of a message into the test tool.

  • 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 for test 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

You can test a routing rule by pasting the raw text of a message into the test tool. To do so:

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

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

  3. Click the Data Form button.

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

  5. Enter any other constraints that you want to test by entering information in the HL7 document object properties fields.

  6. Click OK.

  7. Click Run Test.

Test Results

Symbol Description
Green circle The message met the rule constraints and triggered an if or else clause.
Orange triangle The message met the rule constraints but did not trigger one of the if or else clauses.
Gray circle The message did not meet the rule constraints.

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