Flow control Hydraulic proportional solenoid valve

Hello, I am trying to control hydraulic flow in pipeline, please find the attached sketch.

I need your advice please if this will be the best solution or if you can recommend me the best option that will be great. from the drawing, if solution 1 in is doable then which better, to install the flowmeter after particle sensor or before the the particle sensor?

Thank you Maj