Announcement

Collapse
No announcement yet.

File reader File locking problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File reader File locking problems

    I've been having a few issues with a very simple channel (currently running under version 3.4) that has a file reader, and file writer destination. Very simply it scans directories for suitable named PDF files and moves them by ftp to another server before deleting them from the original.

    Sometimes a file is deposited in the inbound directory but left locked open by the user. This results in a delete error:

    Code:
    [2016-04-26 10:13:11,814]  ERROR (com.mirth.connect.connectors.file.FileReceiver:435): Error processing file in channel: 79048042-c80d-44d7-8884-cbe318422faa  com.mirth.connect.connectors.file.FileConnectorException: Error deleting file from [smb://t-fs01/StHGroup/PATH/PDFs for Import into TelePath/Microbiology//M,16.0671138.C.pdf]   at com.mirth.connect.connectors.file.FileReceiver.processFile(FileReceiver.java:425)   at com.mirth.connect.connectors.file.FileReceiver.processFiles(FileReceiver.java:247)   at com.mirth.connect.connectors.file.FileReceiver.poll(FileReceiver.java:200)   at com.mirth.connect.donkey.server.channel.PollConnectorJob.execute(PollConnectorJob.java:49)   at org.quartz.core.JobRunShell.run(JobRunShell.java:213)   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
    The problem is that the file has already been dispatched to the receiving server, cannot be deleted, and so is picked up again on the next poll.

    Can anyone suggest a method that I can use to check whether the file is locked before sending it? Ideally I do not want the file reader to pick up the file if it cannot delete it.

    I have attached the channel in question.

    I have a second query on this channel, but this time it is about attachments. I was wondering if it is possible to read the whole file and use the attachment handler to save the whole thing as an attachment so that it could be viewed in the administrator? I'm not clear how I would implement this using a file reader set to binary mode.
    Attached Files
Working...
X