This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
The Detour Tool allows alternative workflow paths to be run accoring to its design-time configuration. However, there are some cases where it doesn't allow the amount of control you need. The first case is where you need to programatically change the path based on the data in the stream at runtime. The second is when you have workflow streams that you may not want to be connected into a stream within a Detour and Detour End (as in the case of Inputs and Outputs).
For these cases, a better solution may be a batch macro controlling enabled/disabled tool containers within the macro. Disabled tool containers disable any tools within them. Batch macros allow dynamic control of virtually all tool configurations, including the enabled/disabled state of tool containers. Together, these two features can enable full dynamic control of workflow sections.
A simple batch macro design would look like this:
The Tool Containers will alternately be enabled/disabled by the Actions being fed by the Control Parameter. The Union gathers together whatever streams are present, and sends to the Macro Output. (Note that you may need to configure your macro to allow changing output fields (via Interface Designer) if your schema changes by condition.) Please see attached functional example.