cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline Execute Calling Many Time Instead Of Once

andre_mangatal
New Contributor

Good day Snaplogic Community

I believe this might be a simple solution but I have a few pipelines in our test environment close to promotion to production and notice that one of pipeline executes i.e. “Process Transactions” in the pipeline below is being called by the previous pipeline execute “Store Transactions” more than once when it is run. The first picture below is the main cloud starting pipeline which calls a child pipeline “Store Transactions” in the second picture and then the “Process Transactions” child pipeline is in the third picture below.

How can i change my code or settings to ENSURE there is only one call to “Process Transactions” after the “Store Transactions” pipeline execute returns??? Thank you very, very much in advance!

image

image

image

4 REPLIES 4

tstack
Former Employee

It sounds like more than one document is being output by the “Store Transactions” pipeline, is that correct? The “Process Transactions” pipeline will be executed for every input document it receives. So, if “Store Transactions” is outputting five docs, “Process Transactions” will be executed five times.

Do you actually use the output generated by the child pipeline?

If you only want a single doc to come out of the child, you can close off the unlinked output. Or, you can use a Tail snap.

Hi Tim

Thanks a lot for your response. I don’t actually need to use any output generated by the child pipeline from “Store Transactions”. I just need to call “Process Transactions” at that point. What do you suggest? I can use the Tail snap if I just need to call it?

Thanks again

@andre.mangatal
@tstack has already answered it, tail snap reads the specified number of documents from the end of the input stream. As per your requirement if you use “tail snap” between “Store Transactions” and “Process Transactions”, you will be able to ENSURE that there is only one call to “Process Transactions”.

image

end of you pipeline would look like:

image

Hi thanks a lot … appreciate it