Shutdown Ensemble Business Service upon Warning in the Event Log
Hello,
We have a scenario where a bad message(With control character in some fields) is coming frequently in our Standard HL7 Business Service.
I do see the process gets shut down because of E=D action code. I also see the service logging an "Warning" about the bad message. But service is not shutting down.
Is there a way to handle this error right at the service to avoid multiple processes going down? Not sure if we can create a task, which audits the service logs every few minutes. But that will involve some coding and checking of time when the errors happens.
Is there is a straight forward setting like action code we have for process in the business service?
Thanks,
Jimmy Christian.
Hi Jimmy,
One approach could be to define a FunctionSet method:
Then in your routing rule that is recieving bad messages from your service you could use the new function:
Assumes the characters are within the first 10,000 characters of HL7 message.
Hope this helped inspire some ideas.
Cheers,
Alex
Hello Alex,
Sorry for late response.
I see this approach is very interesting. So in the router, i am checking if it is a bad message. If yes, then i shutdown the service. Right?
Sounds very applicable. I will try and see. Just a question. When the router receives the message, if it is bad, the rawcontent has "BAD" in it?
Thanks,
Jimmy Christian.
Hi Jimmy,
Yes this is using the router context to test if a message has some invalid characters.
As an example I simply used the content "BAD" in the message to demonstrate.
If you want to identify specific characters by numeric code-point an additional FunctionSet method could be employed. For example:
Usage example:
Cheers,
Alex
Thank you Alex.
I just ran a HL7 Message with bad characters. But i do not see string "BAD" in the message which is sent to the HL7 Router.
I am looking for the Built map status, but it says nothing. But when i open the contents it gives an error.
If i can detect in some way that the sent message could not parse, then i can shutdown the service.