We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Batch Macro in Gallery Only Runs Once

clarab
Alteryx
Alteryx
Created

Issue


The batch macro in workflow runs multiple iterations in Designer but only runs once in Gallery even though there are multiple records in the data.

image.png


image.png


Environment Details

 
  • Alteryx Designer
    • Version(s): All
  • Batch Macro

 

Cause

 

If there is a Macro Output in the batch macro, the output anchor of the batch macro must be connected to a tool.

image.png



image.png
 

 
Spoilers

The reason why this works in Designer is that the Browse Everywhere feature is enabled in Designer by default. If you click on the output anchor of your batch macro after you run, you will see the output in Designer. With this feature enabled, it will write out the output for each iteration to a YXBE file stored in the temporary folder without having to connect to a tool. However, in Gallery this "Browse Everywhere" feature is disabled. Hence, it will stop at one iteration since it cannot output the data.

If you disable the browse tools in the Workflow - Configuration > Runtime, you will find that the workflow in Designer runs only once.
 



 

Resolution


Always connect the output anchor of the batch macro to a tool in the workflow. If the output is not necessary, remove the Macro Output in the batch maro.


 
 

Additional Resources

Comments
LisaL
Alteryx
Alteryx

In general, when you see "ended by a downstream tool" you always want to consider the possibility that the Engine stopped running because there's nothing downstream that actually does anything with the data.  If there's nothing using the data, then to save resources, the engine doesn't continue.

 

Recall that Browse tools are essentially disabled for server runs because there are no eyes to view the contents of the Browse.  If you just want to see the data, output to a .yxdb in the local (staging) directory to get the opportunity to display the data at the end of the run.