How to send empty files

0 votes
asked Oct 6, 2020 by jeremy-c-6009 (300 points)
I have a vendor asking that we actually send the empty files created as the missing file triggers an alert on their end for a missed process.

I see notes on how to identify and generate an error for a empty file, but is there a way to get it to process  successfully?

Another thought, although not the ideal is if the empty file can be left in the folder, currently it disappears and QIE does not even log the existence of the file in the logs on that channel status

1 Answer

0 votes

Qvera does not pick up empty messages.


You can create a script source node with this script:


var directoryName = new'c:\\hl7\\in\\empty');

var directoryFiles = directoryName.listFiles();

// loop through each file
for (var j = 0; j < directoryFiles.length; j++) {
   var myFile = directoryFiles[j];
   // only work on files
   if (!myFile.isDirectory()) {
      var fileName = myFile.getName();
      var fileSize = myFile.length();
      qie.addInboundMessage(qie.readFile(myFile), fileName);

answered Oct 6, 2020 by michael-h-5027 (14,030 points)