Muhammad Waseem · Oct 9

How to check repeating segment value in business rule?


In the business rule I want to send a message to the business operation if any of OBX:8 (Abnormal Flag) is set.

I tried foreach but could not found desire results. Below is the sample message:


2 0 4 97
Log in or sign up to continue

Are you correctly specifying the propertypath for the Document Type of the message? This works as expected for me, where the DocType is 2.5:ORU_R01:

I will add that I am very grateful to ISC for finally adding this foreach feature to the routing rule functionality (it appears to have become available with 2020.4). I have one quibble, though ... it would be wonderful to be able to exit the loop without returning from the ruleset (i.e. "break"). The current mechanism forces you to loop through all repetitions regardless of the desired condition being met before the final loop iteration is reached.

A design pattern where I might wish to assign a value to a variable and exit the loop when the condition is met (rather than executing a send) is something I can envision doing regularly.