Using Nifi, I want to handle errors of a processor.
If the processor sends the flowfile to the failure link, I want to send it back x times to the processor that failed to process it.
For that, I wanted to implement a counter in the flowfiles attributes. However, I am facing two issues
- How can I check if the flowfile contains the
counterattribute ? - How to increase the
counterattribute if it exists ?
So far, I have the following flow:
And I am stuck on the "Update Counter" processor. I do not understand how I can achieve this.
The attribute counter does not exist when the flowfile first comes in. I want to check if it exists, if not, ad it to the flow file. When it comes later during execution, if it exists, I want to increment it. How is that possible ?
