'how to use first processor input/output in last processor of flow in apache NIFI without storing files/DB

I have 5 processors processor1( have a value)=>processor2( have b value) => processor3(calculate c=a+b)=>processor4( calculate d=c*a)=>processor5( calculate e=d*b). I'm going to use processor1 value in processor4 and processor2 value in processor5. I need to store in cache processor1 input/output result to use in processor n. How can I achieve this please suggest if any processors are there or can I achieve this through bash script?

enter image description here



Solution 1:[1]

for me it sounds like a sequence of UpdateAttribute processors:

UpdateAttribute(a=1, b=2) -> 
UpdateAttribute(c=a + b)  ->
UpdateAttribute(d=a * c)  ->

all 4 values you'll have as attributes of the same flow file

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 daggett