Hi all,
I have a sequenced macro that I've been using successfully for some time but it has a glitch. I'm hoping someone has run into this.
My macro has Container 1 and Container 2.
It runs Container 1 (while 2 is disabled), then runs Container 2 (while 1 is disabled).
Now container 1 has a test that says "Stop if No New Files". This stops the processing of container 1.
Here is the problem- Container 2 keeps processing (because the stop test is within container 1 and is not on the macro's outer workflow).
So I know what is going wrong but I'm not sure of how to apply the test to the outer workflow that references the test in the inner workflow.
I apologize that I cannot upload it due to the nature of the work. Alteryx version 2021.3
Thanks for any input you can offer!
Solved! Go to Solution.
Hi @StellaBon
Configure your outer workflow to Cancel on error
Make sure that your Message Type is configured as Error in your Message tool in the macro
DAn
In Container 1, could you write out a small text file, then read the text file in Container 2?
The text file could contain something as simple as a single letter Y or N, to indicate if Container 2 should continue.
Or the text file could be named differently, like "Run Container 2" or "Do Not Run Container 2", and you could use the function FileExists as a test.
The outer workflow would need code to delete both files before calling Container 1, to clear out the small text file from prior runs.
And you may need to consider what could happen if the same workflow was run twice at the same time; Container 2 could generate a random number or add the run date and time to the File name.
Chris
Thank you, @danilang I'm just learning what the message tool does.
Thanks for your help I'm going to try this tomorrow!
Thanks @ChrisTX, this is clever! I am going to try the first poster's way and keep this as a backup. Makes a lot of sense!