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

Simon Elliston Ball commented on NIFI-1832:
-------------------------------------------

I expected there may be some history behind this, and it's not a trivial fix. 
[~joewitt] thanks for the context. My goal here is to provide a constricted 
list of possible values for an EL expression. Essentially a run time validation 
akin to AllowableValues validation. 

The precise use case I have in mind in this instance is a List->Fetch pattern 
processor pair. In this case Azure blobs, which can be either Block or Page. 
The List can provide an enumeration which controls behavior on the Fetch. This 
could be done with a Route processor, but that seems like a nasty version of 
the pattern which obscures the DFM's intent. I also suspect that the use case 
might generalize well for programmatically derived enumerations from EL. 
Essentially, a cheap, stringly alternative to having enums in EL.

> Testing EL properties with AllowableValues
> ------------------------------------------
>
>                 Key: NIFI-1832
>                 URL: https://issues.apache.org/jira/browse/NIFI-1832
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Tools and Build
>    Affects Versions: 0.6.1
>         Environment: Testing
>            Reporter: Simon Elliston Ball
>            Assignee: Pierre Villard
>            Priority: Minor
>
> I’ve come across an interesting problem with MockFlowFile while testing a 
> custom processor. My property has an AllowableValue list, and supports 
> expression language. The test uses:
> runner.setProperty(PROPERTY_REF, "${attribute.name}”);
> However, the test fails on validation of in the MockFlowFile with the 
> unevaluated version of the EL invalid against the allowed values list. 
> 'Property' validated against '${attribute.name}' is invalid because Given 
> value is not found in allowed set ...



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

Reply via email to