Hey Mark,

Yeah, at the time I couldn't think of a use-case that a user would want to
set an attribute to empty so when I added the validator for the stateful
portion, I added the empty validator as well. That said, I don't see a need
to keep it if it's preventing your use-case. Curious, what is your use-case
that you always need to set an attribute to an empty string?

- Joe



On Fri, Jan 19, 2018 at 2:43 PM, Michael Moser <[email protected]> wrote:

> Hi Mark,
>
> After reading the JIRA [1] and the PR for the UpdateAttribute
> modifications, I believe this was simply an unintended consequence of the
> code changes.  If you would like to write a new JIRA, then I'm sure we can
> restore the "Set Empty String" functionality when not storing attributes in
> local state.
>
> [1] - https://issues.apache.org/jira/browse/NIFI-1582
>
> -- Mike
>
>
> On Thu, Jan 18, 2018 at 5:11 PM, Mark Bean <[email protected]> wrote:
>
> > UpdateAttribute supports stateful properties. In doing so, the validator
> > applied to the attributes changes. In the case where stateful properties
> > are not desired, the validator adds StandardValidators.NON_EMPTY_
> > VALIDATOR.
> > This means the "Set Empty String" checkbox cannot be used.
> >
> > One solution is to store state locally, and then set both the Stateful
> > Variables Initial Value and the dynamic property to the Empty String.
> >
> > However, my question: why is the NON_EMPTY_VALIDATOR added (when stateful
> > is not set) versus just the ATTRIBUTE_KEY_PROPERTY_NAME_VALIDATOR?
> >
> > Thanks,
> > Mark
> >
>



-- 
*Joe Percivall*
linkedin.com/in/Percivall
e: [email protected]

Reply via email to