[
https://issues.apache.org/jira/browse/NIFI-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956812#comment-15956812
]
ASF GitHub Bot commented on NIFI-11:
------------------------------------
Github user mcgilman commented on the issue:
https://github.com/apache/nifi/pull/1644
@trixpan Sorry for the delay, I must have missed the mention on this PR.
Evaluating EL can lead to different types of Exceptions depending on the
issue with the statement (StringIndexOutOfBounds, NumberFormat, etc). If an
onTrigger throws a ProcessException, the flowfile will be penalized and the
Processor will NOT be administratively yielded. If any other type of Exception
escapes, the flowfile will be penalized and the Process will be
administratively yielded. I think the issue in this case is that we are only
catching ProcessException. As a result all other Exceptions are escaping and
causing the Processor to be yielded. I'm thinking the fix is to simply catch
Exception and then rethrow ProcessException to prevent the administrative
yielding. Thoughts?
> UpdateAttribute should penalize & roll back FlowFiles for which Expression
> Language fails to evaluate
> -----------------------------------------------------------------------------------------------------
>
> Key: NIFI-11
> URL: https://issues.apache.org/jira/browse/NIFI-11
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Matt Gilman
> Assignee: Andre F de Miranda
> Priority: Minor
>
> For example, if using ${filename:substring(1, 20)} and the filename is only
> 15 characters, this will throw an Exception, which causes UpdateAttribute to
> yield and not penalize the FlowFile. Instead, it should catch this Exception
> and rollback with penalization and NOT yield, as this is a problem with the
> data, not a problem with the processor's ability to function at this moment.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)