2

I'm attempting to create a channel designed to take a binary file from an sFTP site and transfer it to a second sFTP site. The source site updates their files on Friday, so I'm creating the channel to run every Sunday. The main issue is that I want to leave processed files in the source directory, and only process files that have been deposited between the weekly channel runs.

Is something like this doable in Mirth Connect, and what is the most efficient way to accomplish it?

michaelmccarthy404
  • 498
  • 1
  • 5
  • 19

1 Answers1

0

In the Source Map is a variable named fileLastModified, which holds the "last modified date of the file, as an epoch time in milliseconds". You should be able to use this as a condition for Destination Set filtering.

In the Source Transformer, add a Destination Set Filter step. Remove all destinations on the condition of fileLastModified being older than a week, or older than the time elapsed since the last time the channel ran. You can track the last time the channel ran by storing that value in the globalChannelMap, if you need to.

Redbeard011010
  • 954
  • 6
  • 20