nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Wing <jvw...@gmail.com>
Subject Re: Read the custom attributes
Date Tue, 24 May 2016 23:03:39 GMT
Expression language support must be configured in the PropertyDescriptor
for all properties, including dynamic properties.  Your processor should
override getSupportedDynamicPropertyDescriptor() to provide dynamic
properties.  Take a look at the UpdateAttribute processor for an example:

@Override
protected PropertyDescriptor
getSupportedDynamicPropertyDescriptor(final String
propertyDescriptorName) {
    return new PropertyDescriptor.Builder()
            .name(propertyDescriptorName)
            .required(false)
            .addValidator(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.STRING,
true))
            .addValidator(StandardValidators.ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR)
            .expressionLanguageSupported(true)
            .dynamic(true)
            .build();
}

https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-processor/src/main/java/org/apache/nifi/processors/attributes/UpdateAttribute.java#L194




On Tue, May 24, 2016 at 3:43 PM, Kumiko Yada <Kumiko.Yada@ds-iq.com> wrote:

> Hello,
>
>
>
> When the Nifi expression language is used in the custom processor
> property, it’s working.  However, I’m not able get from expression language
> for the custom attributes.  How can I enable to read the custom attributes?
>
>
>
> Thanks
>
> Kumiko
>

Mime
View raw message