markobean commented on PR #9617:
URL: https://github.com/apache/nifi/pull/9617#issuecomment-2581157735

   > > I added EL support and tried a couple EL statements. They do not seem to 
generate the required format, e.g. "10 B". The following do not work:
   > > ${random():mod(10):plus(1):append(" B")} ${random():mod(10):plus(1)} B
   > > java.lang.IllegalArgumentException: Invalid data size: 
${random():mod(10):plus(1):append(" B")} java.lang.IllegalArgumentException: 
Invalid data size: ${random():mod(10):plus(1)} B
   > 
   > The validator needs to be changed in order to accept EL, in addition to 
directly-declared sizes.
   
   Ok, I have made the changes and it seems to be working. I just want to add a 
more specific validator. I used the standard NON_EMPTY_VALIDATOR just to see if 
the EL would work. I'll have to add some custom logic to be sure the value 
properly evaluates to a <value> <label> for data size.
   
   Having said that, while this EL approach can be made to work, I find it far 
more obscure than the provided implementation. From a user-friendly 
perspective, constructing the proper EL is more complex. I rarely agree with 
changing code just because a user wasn't aware of a feature or capability. In 
this case though, I find it much easier to understand.
   
   I would like the submitted implementation to be considered over EL unless 
there is a strong argument against it. Why do you prefer EL?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to