Support Questions

Find answers, ask questions, and share your expertise

Use a variable in a processor



I'm trying to pass an output value of a processor dynamically into another and use it as a new property , here is my flow:

ReplaceText (gives the output)-> UpdateAttribute (i created a property which value is referencing output) ->  EvaluateXpath ( i want to pass this value in a new property here) . I tried passing it by ${property_name} and $property_name but nothing works. Is it impossible to have a property referencing another in the EvaluateXpath processor ?



Rising Star

Can I clarify that what you want to do is dealing with XML and XPath?

Or based on this "I'm trying to pass an output value of a processor dynamically into another and use it as a new property"

Output values in to flowfile attributes depend on the previous processor.

If you are not dealing with XML then the processor you most likely need is ExtractText followed by an RouteOnAttribute


Hi  @DigitalPlumber thanks for your response, im actually dealing with an XML file so i need to use EvaluateXpath to extract values from my file ( i have Getfile -> SplitXml -> EvaluateXpath in my flow). On the other hand i have a CSV file that im extracting a value from ( i have another flow Getfile -> UpdateAttribute -> QueryRecord -> ReplaceText-> UpdateAttribute) My goal is to pass the value of the UpdateAttribute into the EvaluateXpath so i can extract a value from my XML file based on the ouput value extracted from my CSV.

Rising Star

I understand the issue EvaluateXPath does not take in an attribute syntax and fails at validation since it is validating for a valid Xpath path.

I wonder if there is a way to use QueryRecord instead.


Indeed @DigitalPlumber , EvaluateXpath can't handle variables, only an Xpath. Queryrecord might be an alternative if i was using another type of file but since im using an XML file and this processor performs an SQL Query what can be my parameters in the query ? 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.