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

Components that reference variable in user-defined property are not stopped/restarted when variable is updated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.15.0
    • 1.15.0
    • Core Framework
    • None

    Description

      When a Process Group's variable is updated, any component that references that variable must first be stopped and then restarted. However, if a processor references the variable in a user-defined property, it does not get stopped & restarted.

      To illustrate:

      • Create a GenerateFlowFile processor
      • Add a user-defined property if "Hello" with a value of "${greeting}"
      • Create a variable named "greeting" in the Process Group and give it any value - say "hello".
      • Connect GenerateFlowFile to an UpdateAttribute and set the Run Schedule to "1 hour".
      • Start GenerateFlowFile. It should run once.
      • Update variable to have a value of "good-bye".
      • After changes have been applied, you should have seen GenerateFlowFile run twice - once with a value of "hello" and again with a value of "good-bye" but currently you'll see it have only run once.

      As a result, when a variable is change, it may not take effect on all processors until restart of NiFi.

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m