cancel
Showing results for 
Search instead for 
Did you mean: 

Recursive Pipeline Solution

masterkrause
New Contributor

I am curious about using recursive pipelines. I know the documentation says that we should not use pipelines in a recursive manner but for some solutions, I think it makes sense. I have created two pipelines: Recursion Parent and Recursion Child.The Recursion Parent passes in a simple js variable, $test which is set to 2 in this case. The Recursion Parent then calls the Recursion Child pipeline which then increments $test by 1 while subsequently decrementing the pipeline parameter param by 1. Once param == 0 then the Child pipeline stops and returns the value of $test and a status, in this case “completed”.

Recursive Parent Input
Recursive%20Parent%20Input

Recursive Parent Output
Recursive%20Parent%20output

Recursive Child Input
Recursive%20Child%20input

Recursive Child Pipeline Execute
recursive%20child%20execute

My question/point to this is: Why is recursion not supported? It obviously works with a minor work around.

7 REPLIES 7

normpw
New Contributor

Thanks christwr your looping solution helped me to loop through an REST Post until successfully getting success from a sha356 hash password.

Hello normpw, thank you for joining our Community and making your first post one that shares your success from christwr’s suggestion!

mina
Employee
Employee

For Rest Get’s pagination feature please have a look at this sample pipeline, REST Get Pagination for Hubspot.slp in our doc.