Hi Luis,

Thanks for reporting this problem and providing the background
details. This is a known issue related to applying FlowFile attributes
with the failure relationship, and it is being tracked in the follow
Jira issue:

https://issues.apache.org/jira/browse/NIFI-13324

Regards,
David Handermann

On Wed, Jun 5, 2024 at 4:20 PM Luis Carmona <luis.carm...@openpartner.cl> wrote:
>
>
> Hi everybody,
>
> As I'm not a java programmer, the new about Python becoming a first
> class citizen in NIFI 2 was a great thing.
>
> I am creating processors, but there is an issue I can not figure out
> about controlling an Exception in python code and therefore sending the
> flowfile to 'failure' way.
>
> Specifically when I catch an exception it does send the ff to failure,
> but completely ignores the paramaters I set for content (string)  and
> attributes(dict) and all the time just sends the original content plus
> the standard attributes.
>
> I have tried:
>
> - Creating FlowFileTransform instance and then trying to modify its
> properties to finally use it in the return statement
>
> - Returning a FlowFileTransform just at the point of the return, having
> several return points according to code conditions.
>
> - Creating a variable (dict), that changes during the transformation
> lines of code, and finally assigning the variable items to
> FlowFileTransform new instance (flowfile, contents, attributes).
>
> But nothing, doesn't work, goes to 'failure' but ignores the content I
> try to put.
>
>
> I am using:
>
> - Java 21.0.2
>
> - python 3.10.12
>
> - nifi 2.0.0-M3
>
>
> I am attaching a reduced version that recreates the behavior.
>
>
> Can anyone give me tip about this or maybe I missed something on
> documentation, or any idea, what could be happening ?
>
>
> Thanks in advance
>
> LC
>

Reply via email to