web stats
Any way to prevent Post-Process SQL from running if Source Transformer fails? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 01-09-2020, 06:16 AM
jridderhoff jridderhoff is offline
OBX.1 Kenobi
Join Date: Jan 2015
Posts: 42
jridderhoff is on a distinguished road
Question Any way to prevent Post-Process SQL from running if Source Transformer fails?

Ran into a bit of a frustrating issue with the Post-Process SQL portion of a Database Reader channel. In trying to find a solution, I came across http://www.mirthcorp.com/community/f...ad.php?t=15203 which seems to imply that there's not a way to do this directly, but thought I'd double-check since this is a slightly different issue to that described above.

In my case, I've got a Database Reader channel that polls from a table based on a column that flags unprocessed rows. It then runs some JavaScript transformers that call functions that do additional lookups via database queries, and then the Post-Process SQL sets the flag to mark the row processed.

The problem I've run into is that one of the database connections inside one of the functions called by the Source Transformer JavaScript step occasionally fails due to database connection issues. The destinations obviously aren't triggered because of the error. Unfortunately though, the Post-Process SQL still runs & marks the row as having been processed, despite the fact that the Source Transformer errored out.

Short of moving the SQL in the Post-Process SQL to a Database Writer destination, is there really no way to prevent Post-Process SQL from running if the Source Transformer fails? Seems like there should be in that case, but everything I've seen seems to indicate there's not.

Thanks for the help!
Reply With Quote
Old 01-09-2020, 06:52 AM
cory_cole cory_cole is offline
Mirth Guru
Join Date: Mar 2012
Posts: 1,360
cory_cole is on a distinguished road

There may be a flag built in that you can use or you can create your own in the Source Transformer. Then in the Post-Processor...


Reply With Quote

database reader, error, post process, sql

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 07:05 AM.

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