[ 
https://issues.apache.org/jira/browse/NIFI-3206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755404#comment-15755404
 ] 

ASF subversion and git services commented on NIFI-3206:
-------------------------------------------------------

Commit 21ed556691719c592df89f36f0ccec26364e3997 in nifi's branch 
refs/heads/master from [~mattyb149]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=21ed556 ]

NIFI-3206: Add ifElse function to Expression Language

This closes #1333

Signed-off-by: jpercivall <[email protected]>


> Add ifElse function to Expression Language
> ------------------------------------------
>
>                 Key: NIFI-3206
>                 URL: https://issues.apache.org/jira/browse/NIFI-3206
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Matt Burgess
>            Assignee: Matt Burgess
>
> Although UpdateAttribute's Advanced tab lets the user perform conditional 
> processing (if-else, e.g.), it would be nice to allow for simple conditionals 
> wherever Expression Language is supported.
> For example, in any EL-supported property, I could specify (with an attribute 
> "filename" for example):
> ${filename:isNull():ifElse('not_found', 'found')}
> Then if filename is null this will evaluate to 'not_found', and if it is 
> non-null it would evaluate to 'found'. For consistency the subject should be 
> allowed to be anything that can be evaluated as a boolean, so if "myVal" is 
> set to the string "true", then:
> ${myVal:ifElse('a', 'b')} 
> should evaluate to 'a'



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to