0

is it possible to generate a FlowFile with Attribute Parameters, which get filled on a UpdateAttribute Processor or EvaluateJsonPath Processor?

For Example I have a FlowFile Content:

<ImportDocument>
    <Database>${database}</Database>
    <DocumentType>${documentType}</DocumentType>
    <DocumentTitle>${documentTitle}</DocumentTitle>
</ImportDocument>

from InvokeHTTP Response I recieve the following response:

{ 
    "database" : "abc",
    "documentType" : "RG",
    "documentTitle" : "test"
}

Now I want to fill the Parameters from the first FlowFile with the Attribute Values from the HTTP Response, so that the FlowFile Content will be like:

<ImportDocument>
    <Database>abc</Database>
    <DocumentType>RG</DocumentType>
    <DocumentTitle>test</DocumentTitle>
</ImportDocument>

when I set the Attributes in the Processor EvaluateJsonPath from the HTTP Response

database = $.database
documentType = $.documentType
documentTitle = $.documentTitle

the Parameters in the FlowFile dont get filled with the values.

Do you have any ideas?

BenjaminR
  • 23
  • 4
  • 2
    it's not possible without script. however after evaluatejsonpath you can use ReplaceText to replace whole file content with template-like xml body with placeholders (like you have in question) – daggett May 16 '23 at 14:05

0 Answers0