ReplaceText: write content on empty flowfile does nothing but sends to success queue
Hello. Well, I have a nifi flow that is triggered by a ListFile processor. ListFile creates an empty content flowfile and sends it to success queue.
I want to write some fixed content ( say "id,description,date" ) on this empty flowfile. The goal is to write an empty csv with that header in HDFS as first action of the flow.
So I was trying to use ReplaceText for writing the content to the empty flowfile.
The flow looks like this ListFile ---> ReplaceText (see image below)

ReplaceText has the following settings: Replacement Strategy = Always Replace, Replacement Value = id,description,date
At first I thougt that ReplaceText could fail cause incoming flowfile had no content.
But ReplaceText sent the flowfile to success BUT NO CONTENT WAS WRITTEN (It is still empty)
In the image below you can see that Queued Bytes are 0

Setting Bulletin Level to "DEBUG" just throws the following message : "ReplaceText[id=501319d3-354d-1482-6c84-d176639be85f] Transferred FlowFile[filename=Control de trabajos de pala - Control punto a punto.csv] to 'success'"
Is Replacetext supposed to write content on an empty file ?
If not then empty flowfile should be sent to failure queue, right ?
Note: for reproducing the bug (I guess we can call it a bug), you can use GenerateFlowfile instead of ListFile and you will get the same result.
Thanks for any feed back. I guess i will have to use a ExecuteScript processor which is a bit more dificult.


