No announcement yet.

File Reader - force a move to error directory

  • Filter
  • Time
  • Show
Clear All
new posts

  • File Reader - force a move to error directory


    I am using Mirth Connect Server

    Here is what I am trying to achieve:
    1. Pick up a file using File Reader
    2. Create batches of 50 lines using javascript in Data Types
    3. If any one entry of the batch is not processed, then mark the batch as ERROR
    4. Once all batches are complete, if anyone batch is in ERROR then move the file into error directory

    For point #3, I am putting following code in my transformer response:
    responseStatus = ERROR;
    I chose my destination name in Response drop down of source. However it is still moving files to processed folder.

    I want that out of 10 batch (for example), even if one batch is failed then the file should be moved to error folder.

    How can I achieve this?