Re: Telescopic controller services in test framework...

2017-05-15 Thread Mark Payne
Russ, When you call setProperty, it's expecting a String value, so you don't want to set the value of the property to `service2` but rather you'd set the property to the identifier for service2. For example: runner.addControllerService( "service-id2", service2 ); // add service2 with an ident

Re: Telescopic controller services in test framework...

2017-05-15 Thread Matt Burgess
I forgot, InvokeScriptedProcessor has an example of "dynamically" adding properties, the code is a bit weird but the idea is represented there: https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/main/java/org/apache/nifi/processors/scrip

Re: Telescopic controller services in test framework...

2017-05-15 Thread Matt Burgess
I believe NIFI-1121 [1] covers the ability for properties to depend on each other, it is still an open issue. I think the workaround is to override onPropertyModified(), and rebuild the dependent property based on the change in value(s). The user will have to hit the Apply button on the dialog aft

Telescopic controller services in test framework...

2017-05-15 Thread Russell Bateman
I've written a controller service that depends on another controller service. One of the properties in the first service builds itself using .identifiesControllerService( Service2.class ), but no .allowableValues()because it was unclear what to put. In my test code, I'm struggling as to how to