Switch - Assembly "Watchdog" Condition
Posted: Fri Feb 16, 2018 6:01 pm
Hello, first post here...sorry for length!
A Switch challenge I run into often is trying to manage global values for assembly.
I have files coming in from multiple directories that need to be assembled into a certain folder structure based off a shared 5-digit job ID#. The challenge is trying to assemble an unknown number of files and directories, so I tried to use private data attached to counters and databases to keep track of how many came through and pass that total to the Assemble. As you may guess, each file gets private data for COUNT, but each one gets tagged differently (1, 2, 3, etc.), so the Assemble takes the value of the first one that gets there (COUNT=1), assembles and stops. With me so far?
I wondered if there was a way to monitor all Switch folders in the flow before the assemble, query them to see if they are empty, (then I know we are done processing), and then tell the Assemble module it's ok to release what it has. If not, is there anything you have used to tackle a similar issue?
I expect I explained this poorly, but I thank you for reading and for any help you're able to share. I'm happy to clarify if needed.
A Switch challenge I run into often is trying to manage global values for assembly.
I have files coming in from multiple directories that need to be assembled into a certain folder structure based off a shared 5-digit job ID#. The challenge is trying to assemble an unknown number of files and directories, so I tried to use private data attached to counters and databases to keep track of how many came through and pass that total to the Assemble. As you may guess, each file gets private data for COUNT, but each one gets tagged differently (1, 2, 3, etc.), so the Assemble takes the value of the first one that gets there (COUNT=1), assembles and stops. With me so far?
I wondered if there was a way to monitor all Switch folders in the flow before the assemble, query them to see if they are empty, (then I know we are done processing), and then tell the Assemble module it's ok to release what it has. If not, is there anything you have used to tackle a similar issue?
I expect I explained this poorly, but I thank you for reading and for any help you're able to share. I'm happy to clarify if needed.