cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Calling

sp41832
New Contributor II

Hi,

Is there any option where we can execute 2 dependent pipelines One after the Other.

E.g :

  1. Pipeline X1 executes a series of Snaps.
  2. Execute Pipeline X2 only if X1 is Succesfull.

Also,
Can i set up both X1 and X2 in the same pipeline ?

6 REPLIES 6

tstack
Former Employee

Have you tried using a master pipeline with 2 PipelineExecute snaps, one X1 and one for X2?

sp41832
New Contributor II

No,
Currently the design is Snap1 followed by Snap 2…etc at end in a pipeline Execute(X1 till here) which call X2.

I can put 2 different Pipeline executes in a Master pipeline provided they can execute one after the other.

tstack
Former Employee

Most snaps won’t do any work until they receive a document to process. So, for cases where you need to execute things in order, you need to control the flow of the documents. In this case, you would have one PipelineExecute for X1 that was connected to the PipelineExecute for X2. When X1 finishes, the PipeExec snap will write a document to its output view and that will cause the downstream PipeExec to start X2. (Note that X1 should not have any unlinked output views since the documents that flow out of there will come out of the PipeExec output view.)

Alternatively, if you wanted to put all the snaps in the same pipeline, you can do like @aleung suggested and use an Aggregate or Tail snap to control the flow. These snaps won’t output a document until their upstream snaps have finished. So, that will ensure the ordering.

aleung
Contributor III

yes, you can setup both in one pipeline. all you need is an Aggregate snap in between X1 and X2. This will force all processing is completed before initiating X2. There is a catch with this where you won’t be able to pass through any data from X1.

Will that work for you?