Question
· Sep 19, 2019

Using Sleep/Halt in a Business Rule between sends

We have a case where we have 1 message coming in, but then sending two messages out to the same location. Even with FIFO sometimes the messages get out of sequence depending on what is need to be done to the message in the DTL before send. Is it possible to call sleep or Halt or write some kind of a function to put a pause in a routing rule between two sends?

Discussion (5)2
Log in or sign up to continue

To clarify, you have one inbound message from a service going to one process/routing rule with two sends in it. You've noticed that sometimes messages get sent not in the same order as they appear in the routing rule. 

If above is correct, try checking Force Sync Send in the process settings.

Generally, you'll likely have to write a BPL and use the delay action if you want to sleep/halt between sends. 

Here is the link to documentation https://irisdocs.intersystems.com/healthconnect20191/csp/docbook/DocBook...

Your BPL would look similar to this:

If you're going to write a BPL, a better solution would be to make those sends (<call> elements) synchronous. This way you don't have to guess how long to delay for. Checking Force Sync Send for regular HL7 processes does exactly that.