Pipeline and variable scope


The pipeline is apparently copied from services to services which means that when service A calls service B, A not only passes B’s input variables to B but it also passes all the variables in the pipeline.

i) What happens if B overwrites a variable with the same name as the one in the pipeline of A before being called? Then A will not find the expected value when B will return
ii) If B doesn’t clean up its pipeline then some unexpected variables will be returned to A


  1. How can we solve i) and ii) given that it should not be expected that a service will clean its pipeline
  2. Why is the pipeline simply passed from services to services? Shouldn’t only inputs be passed? Can we force this? All languages have scopes, why is this not present in flow?

Thanks for the help

I don’t think it works that way… I am not sure though but you can’t modify the contents of the pipeline while you’re in the called service.

For example A calls B

B will not be able to access variables of A unless those variables of A that are passed to B as input variables.

What you have is something like this: