0

In the below image we can clearly see the error in the Conversion_Batching processor. How can this error be transmitted to PutEmail so that the email recipients can clearly understand the error.

enter image description here

Below is the PutEmail configuration:

enter image description here

But ${error} is not getting the error from the previous processor and I am getting an empty mail with the subject correctly set as expected.

How can I do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
User_Targaryen
  • 4,125
  • 4
  • 30
  • 51

1 Answers1

1

NiFi currently does not have a feature where we can capture and pass exceptions/errors to the subsequent processors as attribute or flowfile content.

You can configure SiteToSiteBulletinReportingTask which Publishes Bulletin events using the Site To Site protocol. This will give you information such as bulletinsourceid, bulletinsourcename, bulletingroupname, bulletinmessage etc and based on this you can then send out alert notification emails.

Another way is like in your process group Conversion_Batching introduce attribute ${error} and set custom error messages wherever failure happens, and then you can use this attribute value in PutEmail processor, something like below,

erro_handeling

error_attribute

Vikramsinh Shinde
  • 2,742
  • 2
  • 23
  • 29