markap14 commented on pull request #4903:
URL: https://github.com/apache/nifi/pull/4903#issuecomment-838816994


   @mattyb149 I tried this out with the latest commit, and it didn't appear to 
solve the underlying problem. There's no `onPropertyModified` to indicate that 
the script needs to be recompiled. I created a simple dataflow: 
GenerateFlowFile -> ExecuteScript -> UpdateAttribute. Configured ExecuteScript 
with the following script:
   ```
   flowfile = session.get()
   flowfile = session.putAttribute(flowfile, 'greeting', 'hello')
   session.transfer(flowfile, REL_SUCCESS)
   session.commit()
   ```
   
   It appeared to run correctly. Then I stopped the Processor, and changed the 
script to:
   ```
   flowfile = session.get()
   flowfile = session.putAttribute(flowfile, 'greeting', 'good-bye')
   session.transfer(flowfile, REL_SUCCESS)
   session.commit()
   ```
   
   Ran it again. The output had an attribute of `greeting` with a value of 
`hello` - NOT `good-bye`. So after I changed the text of the script, it did not 
recompile.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to