Skip to main content
Previous section   Next section

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

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

images/ebus_status_pass.png The message met the rule constraints and triggered a When or Otherwise clause.
images/ebus_status_nomatch.jpg The message met the rule constraints but did not trigger one of the When or Otherwise clauses.
images/ebus_status_fail.png 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)
images/ebus_debug_a.png
Solving Problems with Routing Rules (Drawing B)
images/ebus_debug_b.png
Solving Problems with Routing Rules (Drawing C)
images/ebus_debug_c.png
Solving Problems with Routing Rules (Drawing D)
images/ebus_debug_d.png
Previous section   Next section