08-08-2017 08:56 AM
Hello Forum,
I have a input document like this:
[
{
"count" : 10
}
]
and I need to invoke child pipeline using Pipeline Execute snap 10 times. If count is 5, I need to execute child pipeline 5 times.
How can I achieve this? Thanks in Advance!
08-08-2017 01:38 PM
Leveraging the REST Snap’s pagination functionality is definitely the way to go for your use case, but I wanted to make sure your original question was answered as well. The Pipeline Execute snap will kick off a child pipeline for every document it receives (if reuse is turned off). So, to invoke something N times, you’ll need to generate N documents. Generating documents can be achieved with the Sequence snap, if the number is coming from a pipeline parameter. If the number is coming from a document, you can use the ‘sl.range()’ method to create an array that is then split with a JSONSplitter to create the documents for the PipeExec snap.
08-08-2017 02:01 PM
Thanks so much! I love this community.