So I need to stop running my workflow when a condition is not met. This post outlines the solution:
https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Stop-workflow-on-a-condition/ta-p/19890
However, this only works when the Tool ID of the Test Tool is less than the Tool ID of the Output Tool. 17 vs 18 in the example.
I placed my Test Tool in my workflow after discovering a potential issue so it's tool ID is the highest in the workflow (113). When I run, it's the last tool to run, so it won't throw an error until after all files are written to.
Block Until Done doesn't help as it only really blocks on output tools (maybe it needs to be re-named Excel Enabler Tool).
There has to be a better solution than to delete and re-insert all my other tools so that their Tool ID is higher than 113.
Edit: I added a small demo where the output is run (ToolID = 3) Before the Test Tool is run (ToolID = 5)
Solved! Go to Solution.
Hi there!
Try leveraging the "annotation" capability in the configuration? Click on the tool, say Test Tool, then use annotate to assign ID number that will make your Test tool higher than all other tools...versus delete and re-insert.
Else, share a workflow example that we can play with...
Please see attachment; hope it helps.
Hi RN02, unfortunately that field is immutable (at least in 2018.4 with my permissions) and also, I would need the Test Tool ID to be lower than my other tools in order for it to run first. That would require finding an ID that isn't being used by any tool in the workflow, which may not be possible. Either that or increase the Tool ID of all the tools that I wish to run after, which is about just as tedious as deleting/re-inserting.
I did upload a small example per your suggestion.
Thanks
hi @swjmj
Have you considered using the Message tool instead of the Test tool. It sits inline with your workflow and can be configured to error and stop passing records through the tool. You may need to do extra work to add the criteria to data though, since the option that would interest you is break "Before rows where expression is true"
Dan
Curious question to follow on this question string.
Would a detour tool have worked as well? Thanks.
Ah yes, I get it now.
Thanks for the example.
The solution offered is better than what I was thinking of...
@ Dan,
That worked exactly as I was hoping the Test Tool would! Thanks so much!
@ Mark,
Thanks for that suggestion and that really clever solution with the Append Fields - I'll have to keep that one in mind for the future. In my workflow, I'm not exactly trying to get rid of bad data, but detect when there's multiple sets of data flowing in from one source (both being acceptable when run on their own, but not together) and let the user know to clean up their input before trying again. Maybe there is a way to do it with the Append Fields and a Summarize - Count Distinct, but for right now, I'd rather just kill the workflow.
Unfortunately I'm going to miss Inspire this year. I hope you'll host that session at Inspire 2020 as well!
Thanks again!
Hello, I take it that this reset of the tool id is in the latest version of Designer?
I don't have that ability available but I am on 2018.2
thanks
Steve
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |