Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Iterative Macro works perfectly when tested, but slips into infinite loop inside workflow

5 - Atom

Hello all.


I have an iterative macro that takes an input and iterates through every record one group at a time, each time writing volume to trucks. The macro works flawlessly inside the "test environment,' (i.e., the .yxmc where I built the macro) on a group of records (say records 7 - 10, inclusive). However, when I use the macro in my actual workflow, the macro writes records 7, 8, and 9, and then slips into an infinite loop, never writing record 10 to the table.


To make things more puzzling, if I use the sample tool in my workflow to send just these 4 records through the macro, it works perfectly even inside the workflow; however if I run the entire input table through the macro, the problem described above occurs (writes through record 9 and then infinitely loops).


I cannot share the workflow without taking a SIGNIFICANT amount of time to mask all of the data as it is a lot of information and all proprietary. 


Any thoughts?

13 - Pulsar

Hi @amoorekh,


could you share a Screenshot of the workflow and more details about the process? I think not elements of the macro are dynamic that's why they work with the static example but won't work when you apply a bigger set to it.





5 - Atom

Hi @grossal,


The macro image is attached (the standard workflow is very large; I can't get it in a screenshot).


I am essentially attempting to take a large set of volume and divide it up into trucks to be shipped based on a series of rules that would be too complex to get into here. The first step of the macro is to filter on the first distribution center I want to evaluate in this iteration (one distribution center might be passed across multiple iterations depending on the volume in that distribution center). Then, some running totals are calculated and rows are generated to split up one record where the volume in that record can be shared between two trucks. After those rows are generated, the running totals are recalculated to to determine when the truck is full and a new truck needs to begin being loaded with volume (i.e., a new iteration of the macro).


Like I said, when I run this on the records that trigger an infinite loop in the standard workflow, they work perfectly fine in the .yxmc pictured. The fields the workflow is feeding the macro is identical to the macro input in the macro's configuration, and the data is only 51,310 records in total.

11 - Bolide

Hi @amoorekh 


In the interface designer (Ctrl+Alt+D) of macro workflow, in test view, there is an open to run the wf in debug mode. Please try. It might give you a clue on the issue.



5 - Atom

Thanks, @deviseetharaman, it didn't show anything helpful. Unfortunately, as I said, the macro works perfectly, exactly as expected, in the .yxmc. It is only slipping into an infinite loop in the standard workflow, which actually is feeding the macro the identical dataset,