Can I recursively call a flow or subflow?

jordimsant
Tera Guru

I was trying to develop a flow and this question came to my mind. Is it possible to create loops using a flow? Can I recursively call a flow to achieve this goal? I have tried many ways and I have not found how to do it.

6 REPLIES 6

JulianP32954866
Tera Contributor

Yes you can

I have a subflow and an input of a string.  I also have a flow variable of a string

convert the input to an array and then process each entry via a lookup record

I then append the sys_id of the record to the flow variable (as a comma separated string)

After I have processed those records, a quick check to ensure the flow variable is not empty, and if not I call the same subflow, this time passing the flow variable values - so is now recursive

If the flow variable is empty, I assign the value of the flow variable to the output.

 

JulianP32954866_0-1753098285596.png