Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

InvokeHTTP write a property on Failure Condition

avatar

I am working on a NIFI flow that begins with an InvokeHTTP processor.

On the occasion that there is a connection timeout (Failure condition), I wish to assign the InvokeHTTP processor Remote URL value to a new property and have this property passed as data (attribute) through the "Failure" path to another processor. Is it possible to do within the same InvokeHTTP processor?

Can anyone help?

1 ACCEPTED SOLUTION

avatar

I solved this by using a GenerateFlowFile processor to create an attribute url and to trigger the InvokeHTTP processor at the schedule rate of interest.
On a failure condition (e.g. InvokeHTTP connection timeout) I use an UpdateAttribute processor to assign to the attribute url the Remote URL using a Regex: ${invokehttp.java.exception.message:substringAfterLast('/'):substringBefore(':')}

View solution in original post

1 REPLY 1

avatar

I solved this by using a GenerateFlowFile processor to create an attribute url and to trigger the InvokeHTTP processor at the schedule rate of interest.
On a failure condition (e.g. InvokeHTTP connection timeout) I use an UpdateAttribute processor to assign to the attribute url the Remote URL using a Regex: ${invokehttp.java.exception.message:substringAfterLast('/'):substringBefore(':')}