I have a workflow that receives quite a few xml files, all named by a unique ISBN value. Occasionally, our customer sends in an ISBN that they've already sent us (in some case many, many times). I am archiving the files and adding a suffix to the file name so I know if we've received the file multiple times just by looking at the end of the file name (_2, _3, _4, etc.).
Unfortunately, when the file processes through the flow, it doesn't have this suffix that the archived copy does, so it flows through like normal. What I'd like to do is somehow get the flow to acknowledge that the file was received before (I don't' care how many times before), and then send it through a different path so I can send an email notification of a duplicate file. These files may be received a day or two apart, or a month apart, so the timing is a complete unknown. What would be the simplest way to accomplish this?
Sorting Duplicate Files
Re: Sorting Duplicate Files
If I interpret it correctly you could have multiple PDF files starting with for example ISBN number 9789401913119: 9789401913119.pdf, ..., 9789401913119_16.pdf. You then receive 9789401913119.xml.
With the "Inject wildcard" app you can inject the PDF that starts with 9789401913119 and that has the most recent modification date. That will inject the one with the highest version number. You can then build a condition that tests if the name of the injected PDF ends with _\d+ (as a regular expression). If it does, it means there are multiple versions.
With the "Inject wildcard" app you can inject the PDF that starts with 9789401913119 and that has the most recent modification date. That will inject the one with the highest version number. You can then build a condition that tests if the name of the injected PDF ends with _\d+ (as a regular expression). If it does, it means there are multiple versions.
Re: Sorting Duplicate Files
Scan Hierarchy app https://www0.enfocus.com/en/appstore/pr ... -hierarchy should work for that case; you can set it to check from a directory if a file containing the incoming file's name already exists and then route the incoming job based on that. This is not meant for this exact use case, but looking at the documentation you can check the <key>.ItemsFound private data and based on that decide what to do with the file.
edit. I didn't notice that Freddy had replied while I was typing mine, so now you have two alternatives
--patrik
edit. I didn't notice that Freddy had replied while I was typing mine, so now you have two alternatives
--patrik