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?
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.
Thank you for your reply. If I want to use a delay action in the BPL, do you have an example that you can share? Thank you.
Here is the link to documentation https://irisdocs.intersystems.com/healthconnect20191/csp/docbook/DocBook...
Your BPL would look similar to this:
.png)
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.
Thank you Alex.
Hello,
Usually, when you have a BS calling a BP then to a BO, if all will have a "poll size" of 1 messages will go in-order.
Another option, if you do not want to work with "queues" you can work with "inproc".
https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EMONITOR_concepts_msg_invoc_style