Question
· Feb 10, 2020

Process Response for HL7 Message Router

Hello,

I am playing around with an HL7 business rule set and a EnsLib.HL7.MsgRouter.RoutingEngine component. I'm wondering how I can get the routing engine to fire a rule when a response is received from a business operation.

I have a simple "debug" statement in my rule to log the "Source" value when a message is received. This debug statement only seems to fire when the message comes as a request from the business service (trace item #1 below). However, I want to fire a rule when a response is received from a specific business operation (item #6 below) - specifically, I  want to execute a DTL just on that response data. Is there a way to do this within the same routing engine?

One workaround I see with this is to add a new target to the "Response Target Config Names", but trying to  avoid using another business process here.

 

Discussion (6)1
Log in or sign up to continue

Thanks for the suggestion, Jeffrey.

I did try this out before, but this causes the messages to get caught in a loop. That is because after the router receives the response (#7 below), it will send a response to a new target specified by the rule set (new target = boHL7FileOut). But because Response From has some value, the router will generate a local response after some time and then send that response to itself...going on and on.

From the Response From property documentation: 

"If none of the listed targets gets called or the replying target does not return a document, this router will generate an ACK response if needed."

Is there some other way to control when the router should generate a local response?