We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Sequenced Containers Macro - how to stop it on error

StellaBon
11 - Bolide

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!

4 REPLIES 4
danilang
19 - Altair
19 - Altair

Hi @StellaBon 

 

Configure your outer workflow to Cancel on error

danilang_0-1687277101368.png

 

Make sure that your Message Type is configured as Error in your Message tool in the macro

danilang_1-1687277247033.png

 

DAn

 

 

ChrisTX
16 - Nebula
16 - Nebula

@StellaBon 

 

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

StellaBon
11 - Bolide

Thank you, @danilang  I'm just learning what the message tool does. 

Thanks for your help I'm going to try this tomorrow!

StellaBon
11 - Bolide

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!

 

 

Labels
Top Solution Authors