1.2k questions
1.4k answers
361 comments
339 users
You can setup your source node to read from a script that will look in the folder every five minutes or so and retry.
try { // read all files in C:\HL7\*.hl7 var incoming = new java.io.File("C:\\HL7\\"); var allFiles = incoming.listFiles(); if (allFiles !== null) { // skip folders and hidden files for (var i = 0; i < allFiles.length; i++) { var file = allFiles[i]; if (!file.isDirectory() && !file.isHidden() && file.getName().endsWith('.hl7') && file.length() > 0) { // this call adds a new inbound message qie.addInboundMessage(qie.readFile(file), file.getName()); // delete the file, now that we have processed it qie.deleteFile(file); } } } } catch (err) { qie.debug('Cannot read file: ' + err); }