web stats
File reader File locking problems - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2016, 03:29 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default 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
File Type: xml PROD TelePath PDF Importer.xml (14.1 KB, 5 views)
Reply With Quote
Reply

Tags
delete, file, lock, reader

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 09:54 AM.


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