No announcement yet.

Mirth keep .jpg in use

  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirth keep .jpg in use

    Hi all

    Happy new year to all


    I have create a chanel that take a .jpg from a directory and create a pdf with this image in it. after it save the pdf to another directory.
    and to finish it move the original .jpg to a third dirctory.

    In the source tab I have put the connector type to File reader
    Method; File
    Dierctory = C:/HL7/Images
    Filname Filter Pattern :*.jpg

    Polling type = Interval
    Polling frequency = 10000
    Delete File after read = No
    Move to directory = C:/hl7/Org

    In the destination tab I got this

    Connector Type = Document Writer
    Directory = C:/HL7/PDF
    Filename = ${SYSTIME}
    Document Type = PDF
    Encrypted = No

    And in the template section i have wrote

    <img src= "/HL7/Images/${ORIGINALNAME}"/>

    Mirth can create the pdf with the good .jpg in it but it can't move the .jpg to the c:/hl7/Org directory
    In this situation it generate a lot of pdf from the same .jpg
    I a found that Mirth keep the .jpg in use In fact the only way fro me to free the .Jpg is to stop the server

    I have done a test with just one .jpg file and i got this error message

    [2011-01-04 14:00:57,696] ERROR (org.mule.impl.DefaultComponentExceptionStrategy:9 5): Caught exception in Exception Strategy for: ded9095c-b38e-4f05-8fca-d88e2ad816ae: org.mule.MuleException: Failed to move file "C:/HL7/Images/obx.jpg" to "C:/HL7/Org/obx.jpg". The file already exists.
    org.mule.MuleException: Failed to move file "C:/HL7/Images/obx.jpg" to "C:/HL7/Org/obx.jpg". The file already exists.
    at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(
    at .java:290)
    at eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at eadPoolExecutor$ :675)
    at Source)

    I have check and the obx.jpg file is not in the "C:/HL7/Org" directory

    Can some one help me with these ?
    It must be a better way to do this ?

    Last edited by Benzo; 01-04-2011, 10:06 AM. Reason: More information

  • #2
    Hi All
    Just to add information I have try to change the Incoming Data.
    The only type tha generate a pdf is the HL7 v2.x but it can't move or delete the file
    all the other type move the file in the good directory but d'ont create the Pdf file.

    I'm starting to think that i can't use Mirt for this kind of operation