Created 12-10-2018 09:21 PM
I want to write my own code which will run Nifi processor from a java class ,how I can create set ProcessContext value and pass to onTrigger method ?
I didn’t find any settermethod for ProcessContext class methods .
Created 12-11-2018 03:14 PM
The ProcessContext is set by the framework and passed to onTrigger(). What kinds of values are you trying to pass? Usually the ProcessContext is used to get the values of your processor's properties.
Created 12-11-2018 05:27 PM
I want to use Nifi without UI .
As using UI we can set all the property value in UI and same will be passed to onTrigger with all the values in ProcessContext.
How I can assign the value to Property without UI and pass to onTrigger using ProcessContext.
Like all the value we can provide to ExecuteSQLRecord processor in UI which will be set to ProcessContext,how same can be achieved without UI.
Created 12-12-2018 03:52 PM
The UI just makes REST API calls to NiFi to set things like processor properties. You'd have to make the REST call(s) yourself to set the values for the processor properties, then when you start the processor, onTrigger() will have a ProcessContext that has your settings for those properties' values. Check the REST API documentation for more information, and you can also enable Developer Tools on your browser while setting properties with the UI, after hitting the Apply button you can see the POST call(s) being made, and you can use those as guidance for how to do it without the UI.
Created 12-13-2018 09:17 AM
you are correct all the UI component calls REST API however to call most of the REST API we need to pass the id to same.
When we create everything from java code base we will not have any such id which was getting generated in case of UI,how I can do everything from my own custom java program without having any UI.