How to trigger a tool container based on condition?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have two independent work flows, First work flow will output true or false. If first work flow return true then i want to trigger the second workflow which is available in a tool container. is it possible to trigger a tool container based on condition ? Do containers enable or disable based on dynamic conditions.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try using 'Detour' tool.
You can bypass certain steps in your workflow based on a condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @anil_m! Check out this article, and see if it is what you're looking for... https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Dynamically-enabling-disabling-workflow-sect...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here are the work flows 1 and 2 are highlighted in blue boxes, Box1 will just return true or false, If box1 returns true then i want to run the box2. I am not aware of joining either detour or the macros. There is no data transfer between them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@anil_m I think you can still accomplish what you are wanting with the method explained in the article I posted. In your formula tool, just add a Boolean column that says "true" or "false" to feed into the macro. Then, within the macro (right click on the icon and click open macro), put the tools you want to run based on your certain condition in the tool containers. Depending on which came in as true or false, one of the containers will run the tools within. You do not have to have any input to the macro in your main workflow other than the Boolean. Just put your inputs within the tool containers within the macro. This way there will be no data transfer. I attached a simple workflow I created that hopefully will clear things up. If the total field equals 5 (true) then one tool container runs, if the total field does not equal 5 (false), the other one runs. You can make modifications as necessary to your workflow from there. Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Barnesk, Thanks for the detailed explanation :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This isn't 100% what you're asking but in case it helps anyone else:
If the condition is a failure of some sort of a previous step, and then you DON'T want to run subsequent steps (and this approach is nice if you don't want to use any macros at all, and want to contain the logic within a single workflow), what you can do is split up the steps that you want to run in order and ensure that an alteryx ERROR is emitted from any of the previous steps, such that none of the subsequent steps will be run, then to do this is simple 1) use the Block Until Done tool, which will trigger your steps in order and 2) Then under Workflow - Configuration --> Runtime --> check the box for stopping the workflow on error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
