- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi: how to remove session based on atribute value in nifi
- Labels:
-
Apache NiFi
Created ‎10-11-2017 04:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to remove session in case i get certain data from file i have code like this,but i got errors "flowfile has already marked for removal", what should i change to get rid of extra errors?
|
Created ‎10-11-2017 04:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's hard to tell from the formatting of your code above, but if you are executing session.remove(flowFile1) then later trying to transfer it to REL_SUCCESS, you will get that error. You can either change the logic to put the remove/transfer calls into an if-else block, or keep a boolean variable indicating whether the flow file has already been removed, and transfer if it has not been removed. It looks like you already have an if-clause checking the firstChild for "false", perhaps you could put the transfer in an else-clause.
Created on ‎12-07-2022 02:40 PM - edited ‎12-07-2022 09:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mburgess I have the same problem. The code was written in jython.
