cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Why do some snaps execute, when they are not in the current path?

acesario
Contributor II

I have a pipleine which uses routers successfully, but notice that there are a few snaps which execute downstream from a router which does not run. Even if I disconnect the snaps, I see a GATE snap execute, and gives an error (unless I filter for !=[ ] after the gate snap). Atached is a picture of my snap: the green flow follows the routing, the blue line flow does not execute, but the highlighted Gate snap executes, with the following json, containing empty arrays for each of the gate inputs:
[

{
โ€œPersonโ€:[
]
โ€œSectionโ€:[
]}]

image

1 ACCEPTED SOLUTION

Hi @acesario

Do you have the โ€˜Ignore empty streamโ€™ property set in your Excel Formatter like this:

Screen Shot 2020-10-01 at 8.31.16 AM

View solution in original post

7 REPLIES 7

cjhoward18
Employee
Employee

Hi @acesario,

The Gate Snap is designed to always have a single output document produced regardless of the number of input documents received.

Interesting. So you have to filter it to prevent an error? Works, just unexpected.
THANKS for the quick answer!

What is the error you are seeing?

There are use cases in which the snap was designed for where some snaps may not produce an output document for certain cases. However, when the snap is complete the execution can continue to flow to the rest of the pipeline using the Gate snap directly after a snap that completed, but may produce no output document. This is to ensure an output document is produced to drive the rest of the pipeline execution no matter what once the upstream snaps have completed.

Just an error in a downstream snap that the mapped variables are missing - as expected. The filter removed these errors, so iโ€™m okay with this workaround.
Thank you