Forum Discussion
@viktor_n is correct that SnapLogic is a streaming platform so there is no concept of looping logic. This is a shift in thought for many developers coming from a programming background.
Note that ForEach is a deprecated snap and is not guaranteed to be supported in the future. Instead use a Pipeline Execute snap to call a child pipeline.
My design recommendation is to create a child pipeline to get the SF record. In the child, you can do the lookup and either return the value, or perform the create record, then lookup again (if necessary) and return the record to the calling pipeline. Now it won’t matter if the record originally existed or not, the child takes care of it so the parent doesn’t have to know the difference.
- cstewart5 years agoFormer Employee
One of the ways that you can use pipeline execute and not wait for the child to finish is in the child, have a Mapper Snap which is un-connected output, in which you map the pipepipe.ruuid to an output value. This will execute once the pipeline is started, and return to the parent the runtime id (which can be used to query for status if desired), This has the same effect as using Fire and Forget of the ForEach Snap.