InboundAdapter - Skipping previously processed file

HealthShare

I have a scenario where I'm using a EnsLib.File.InboundAdapter to collect files from an external file system.  The files require to meet a certain criteria before they are moved to another remote file system.  If they don't, I would like them to stay where they are so that they can be collected again when the criteria has changed.    I have set the adaptor property DeleteFromServer to false - which is fine - the file stays put in its original location, but the file is never collected again as I receive a  "Skipping previously processed file  " info message.   I'm presuming the file name is stored in a table, which I've yet to find.  I'm thinking I can delete the file name from that table so that it is eligible to be picked up again.  Anybody have any ideas please on where these file names are stored or have any better suggestions how to implement this.  Thanks. 

  • 0
  • 0
  • 60
  • 3
  • 0

Comments

Having looked at the inbound Adaptor code, I'm guessing it's the $$$DoneFileTable macro that needs to be defined and the logic overridden.  So it looks like I'm going to have to create a sub-class of the adaptor and change the behavior.

Hi. It depends on what you mean by "certain criteria". If it's a special file name then you could amend the FileSpec  property to skip the ones you don't want yet. If it's in the content, then maybe you should be reading in the file (creating a copy or allowing archive so the original continues to exist) and sending it as a message into Ensemble that can then  be held up in a business process until ready to send out to an Operation that creates an output file. That is the way ensemble is supposed to work, so you get a full record of what happened, etc.

(Otherwise, I'm pretty certain that there are actions that reset the list of processed files - maybe resetting that file path or restarting the job - but I cannot find the documentation about it at the moment. )

Hello Rick,

You might need to explain more about your criteria. The Business Service should be checking if filename and time modified match to determine if the file is the same. You may be able to just change the timestamp when you want to recheck.

Alternatively, you may be able to code some logic to have the files be moved to an archive path and then brought back over into the file path when you want to retry.

Settings for the File Inbound Adapter

There might be a way to modify the "already processed" status of a file, but I'm not sure if that's a great idea and you may want to discuss it with your InterSystems representative.