I have a workflow that does two things, (a) checks for errors in source data and if any are found, saves them to an Errors DB, and (b) checks the Errors DB to see if any previously identified errors are no longer present in the source data. So, scenario (a) or scenario (b) may be empty record sets depending on what has happened in the source system since the previous run.
The challenge I'm having is to prevent processing on just the branch corresponding to (a = right) or (b = left) coming out of the join without terminating the entire workflow - in case the other branch still has processing to do. I've read a few posts on this, and set up what I thought would be the solution using a Count and then an Append Fields node, followed by a Filter node that checks for the value of Count.
I know that the Filter node is acting correctly, evaluating to TRUE in either instance of zero records. It's actually a bit mystifying how the branch off of the FALSE output is getting processed - but I get errors back from my DB when it tries to write or update a record without a primary key value so I know this is happening.
So - how do I terminate just one branch when Count = 0 and allow the other branch to continue independently?
Hi @PaulFields2 - If you want to bypass a branch in a workflow you may want to use a Detour tool. Here are a couple of useful links for you with examples:
You may also want to look at a sample workflow:
Thanks for the reply but I'm not sure this will solve my issue, since (a) there's not user input involved in my workflow, and (b) there's no way that I can see to set a condition (eg. count=0) for the detour taking effect.
Maybe I'm not reading the reference materials correctly though. Any input would be most appreciated.
Also there's sort of the fundamental question still, if the test in the filter is running correctly . . . then why would the nodes along the non-chosen path (count != 0) be executing anyway? That's sort of baffling.
Looking forward to seeing more responses to this post.
Thanks!