In NiFi 2.4 and above, the Jython engine is no longer available in ExecuteScript.
Previously, I used scripts like this to read and update attributes:
val = flowFile.getAttribute('x')
flowFile = session.putAttribute(flowFile, 'x', str(int(val) + 10))
Now I want to do the same using Python in NiFi 2.4+:
Read an attribute (e.g., x)
Compute a new value
Write it back as an attribute (or a new one)
Keep the original FlowFile content unchanged
What’s the recommended way in NiFi 2.4+?
Any official docs, samples, or best practices for this scenario would be very helpful.