Insert (filtering) device in a DPL workflow

Assume I have a very simple DPL workflow, like :

(A) [digit-sampler] -> [digit-sink]

That I launch with pipes : digit-sample --infile input.data | digit-sink --outfile output.data

Now I want to “insert” a filtering piece in the middle, that takes some digits and possibly modifies them, so its input is of the same kind as its ouput :

(B) [digit-sampler] -> [digit-patcher] -> [digit-sink]

launched using digit-sample --infile input.data | digit-patcher | digit-sink --outfile output.data

The way I’m currently going for this is to use a switch in digit-sampler to change the name of the output in case (B) (and get the digit-patcher expect that as an input) in order to keep the sink untouched. So basically to insert the patcher I need to change two names : the output of the sampler and the input of the patcher.

While this works, I feel I’m missing something and that there might be a simpler way to achieve is without fussing around with the input/output names. Is there ?

Thanks,