You could try having custom logic in the #init() method of the processor (or in 
the method annotated with @OnInitialize for the controller service) which makes 
an outgoing request, retrieves information from the external source, and then 
programmatically populates new dynamic properties. The dynamic property 
mechanism is well-established, and you could theoretically use it to modify the 
possible values of existing PropertyDescriptor objects as well. There are some 
buildAllowableValues methods in EncryptContent which do part of this, but 
obviously they are using data which is static on the JVM and performed at 
processor class initialization. Just put a placeholder value in initially and 
delegate the actual population logic to the invoked init() method. 


Andy LoPresto
[email protected]
[email protected]
He/Him
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Oct 14, 2020, at 10:47 AM, Jeremy Dyer <[email protected]> wrote:
> 
> Bryan,
> 
> That makes sense. Sounds like "dependent properties" isn't quite what I'm
> looking for but that is an interesting point about a customValidator. I
> will try that.
> 
> As a more concrete example say a ControllerService points to a
> unique database table. Depending on the ControllerService/Table selected I
> would want to display all of the column names for that Table as valid
> options for a PropertyDescriptor.
> 
> What I'm trying to do isn't database related but the example is pretty much
> exactly the same idea.
> 
> - Jeremy Dyer
> 
> On Wed, Oct 14, 2020 at 10:52 AM Bryan Bende <[email protected]> wrote:
> 
>> Hello,
>> 
>> There is an open PR for "dependent properties" which will hopefully be
>> merged soon, but I think it is slightly different than what you are
>> asking for.
>> 
>> The idea is that some properties should only be shown based on how
>> another property is configured, i.e. changing a strategy property to
>> strategy1 should remove any properties relevant to other strategies so
>> the user doesn't have to see a bunch of stuff that isn't relevant.
>> 
>> In your scenario it isn't adding/removing whole properties, but
>> updating the values of a property. Not sure that has been considered
>> yet.
>> 
>> You basically have to implement customValidate and implement logic
>> that makes the processor invalid if your two properties have values
>> that shouldn't be used together.
>> 
>> -Bryan
>> 
>> On Wed, Oct 14, 2020 at 10:27 AM Jeremy Dyer <[email protected]> wrote:
>>> 
>>> Hello,
>>> 
>>> Is it possible to have valid values for a PropertyDescriptor change based
>>> on another selection?
>>> 
>>> Ex: I have a ControllerService Property and if I change that
>>> ControllerService in the dropdown I would like the valid values for
>> another
>>> Property to be changed in the UI.
>>> 
>>> I'm thinking this isn't really possible since the logic occurs on the
>>> backend after "Apply" has been pressed. I know I can "Apply" and
>>> reconfigure to see the new values but would like something more
>> immediate.
>>> 
>>> Thanks!
>>> Jeremy Dyer
>> 

Reply via email to