I've been trying to get my head around blocking certain areas of the workflow to not be run based on certain criteria. I want the workflow to be able to run as fast as possible, so blocking code that just doesn't need to be run for a certain set of criteria seems like the logical design to take. I've tried different iterations of using Filter, but that does not work as both outputs are executed. I did some internet/community searching and found several instances of using Detour within a macro as an option. Conceptually, this seems to be like what I need to do. Unfortunately, none of the examples I found fit what I'm trying to accomplish. So I started trying different configurations, but I just can't get it to work. Below is what I have been working with. The error I'm currently receiving is listed on the right below, and the tools mentioned are reflected by the red arrows.
Actual files are attached.
Any suggestions?
Winston
Solved! Go to Solution.
@Winston as far as I know, it's not possible to set up the flow in this way and have your condition coming from within the data. The condition tools tend to act on user input from other interface tools where a question is offered i.e. has a certain box been ticked? If so, do X... etc
I'd say your best bet is to go down the route of filtering. If you're only expecting one 'Type' in your data then the data successfully passing through the relevant filter will be processed and the other output stream will have to deal with 0 records and therefore shouldn't impact performance.
Hey @Winston
As @DataNath has already mentioned, it is not possible to get the desired results with given configuration. Few things to note here.
Thus, I have re-designed your macro to get the desired outcome.
Hope it solves your issues. PFA for reference.
Regards,
Amol Telore
@DataNath Based on the tools we have available, that makes sense. Thanks
@Amol_Telore This is what I have implemented. Not how I had envisioned it, but it works. Thanks
@Winston Wow.
Love your original question/challenge.
I am trying to edit my macro to ignore a off-shoot of a workflow when a field to be parsed is not present.
A Filter tool does not prevent the unused off-shoot from generating an error that prevents any output from the marco.
I tried using CReW Ensure fields, but then you have to brute force the solution with a multiple Ensure Fields tool for every parse tool in the off-shoot stream.
@hellyars did you find a good solution?