web stats
Continue after NACK - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2014, 09:23 AM
mastone mastone is offline
Mirth Newb
 
Join Date: Feb 2007
Posts: 9
mastone
Default Continue after NACK

Using version 3.0.2.7140.
I have a TCP sender set to Queue always and Rotate =false so messages will be delivered in order. The top message retries until successful in the event connection outage etc.

When the receiver returns a NACK (AR) I'd like to put the message in Error and continue with the rest of the queue.

Any advice on how to enable this behaviour or an alternate approach?

Thanks
Reply With Quote
  #2  
Old 10-15-2014, 12:44 PM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

That already will happen with a default TCP Sender. If your response inbound data type is HL7 v2.x and "Process HL7 ACK" is enabled ("Validate Response" in 3.1), then NACKs will automatically be errored out and not be put back in the queue.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 12-13-2014, 06:36 PM
mastone mastone is offline
Mirth Newb
 
Join Date: Feb 2007
Posts: 9
mastone
Default

Would it be possible to only continue on an AR but keep retrying on AE. In my case when the destination DB is down it returns an AE until it comes back up.
Reply With Quote
  #4  
Old 12-15-2014, 07:30 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by mastone View Post
Would it be possible to only continue on an AR but keep retrying on AE. In my case when the destination DB is down it returns an AE until it comes back up.
Yes, that's very easy with a response transformer:

Code:
if (/[CA]E/.test(msg.MSA['MSA.1']['MSA.1.1'])) {
	responseStatus = QUEUED;
}
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 01-05-2016, 10:56 AM
lueckep lueckep is offline
OBX.2 Kenobi
 
Join Date: Jul 2011
Posts: 73
lueckep is on a distinguished road
Default

Nick ... I'm stealing this for a channel but wanted to ask. Your regex syntax there is saying to match on either CA or EA, is that right? I've never seen a CA response so I just wanted to make sure it's not some funky regex thing I don't know about. I'm not having any luck googling it...
Reply With Quote
  #6  
Old 01-05-2016, 11:09 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by lueckep View Post
Nick ... I'm stealing this for a channel but wanted to ask. Your regex syntax there is saying to match on either CA or EA, is that right? I've never seen a CA response so I just wanted to make sure it's not some funky regex thing I don't know about. I'm not having any luck googling it...
That particular regex matches on CE or AE, meaning "Commit Error" or "Application Error", the former being for the "enhanced" acknowledgement mode. If you have the specifications handy, it's detailed in section 2.14.8.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation