web stats
Java Null Pointer Exception when polling DB - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 09-04-2019, 09:47 AM
agermano agermano is online now
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 964
agermano is on a distinguished road
Default

When using a db reader, the entire ResultSet from the query is returned, and each row becomes a new message. I believe they are processed in order on a single thread even when multiple source threads are enabled unless you also have the source queue turned on (at which point out-of-order processing is possible when using more than one thread.)

Are you saying the documentID may not be unique in the PatientendatenScancenter table, but you only want to process once per documentID per poll? If it is not unique, is there another unique record identifier for that table?

The usual way to use the Database Reader is to only place the select statement in your SQL section. The update statement would be placed in the "Run Post-Process SQL" section, and you can set it to run "After each message." The documentID for the current message will be available in the Post-Process section. This way you are not updating the record at the time of the query, but rather when processing of that record is complete.
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 06:35 PM.


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