Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-3142

ExtractHL7Attributes processor does not route to REL_FAILURE for an exception other than an HL7Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.0.0
    • None
    • Extensions

    Description

      The ExtractHL7Attribute processor will not route a flowfile to REL_FAILURE if processing the flow file throws an exception that is not an HL7Exception. This bug is a result of the try catch block in the onTrigger method. It is easily fixed by changing the catch block to catch a throwable object. Change

       
      try {
          ...
      } catch (final HL7Exception e) {
          getLogger().error("Failed to extract attributes from {} due to {}", new Object[]{flowFile, e}, e);
          session.transfer(flowFile, REL_FAILURE);
          return;
      }
      

      to

       
      try {
          ...
      } catch (final Throwable t) {
          getLogger().error("Failed to extract attributes from {} due to {}", new Object[]{flowFile, t}, t);
          session.transfer(flowFile, REL_FAILURE);
          return;
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kjlinvill@gmail.com Kirby Linvill
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: