Thanks Koji, I checked the NIFI REST API and it seems that I need to use Groovy to do it(I don't understand Groovy), is there any Java related examples which interact with NIFI via REST API? Thanks.
Regards, Ben 2017-07-14 13:49 GMT+08:00 Koji Kawamura <ijokaruma...@gmail.com>: > Hi Ben, > > Just an idea, using ListenHTTP or HandleHTTPRequest (or whatever > listener type processor you can use) in front of your processor might > be helpful. You also need to change your processor to support incoming > FlowFile as well if it doesn't currently. This way, the outside > application can send a simple HTTP request to do your processor its > job. > > Another possible way would be using NiFi REST API, stop the processor > and then restart it. When the processor is restarted, its onTrigger > will be called, and it will wait for next time to be scheduled (next > 5min in your case). > > Thanks, > Koji > > On Wed, Jul 12, 2017 at 5:04 PM, 尹文才 <batman...@gmail.com> wrote: > > Hi guys, is it possible for a Java application outside the NIFI > environment > > to trigger a timer-driven processor to do its work(I mean its ontrigger > > method will be called) when the processor is not yet due to be triggered? > > The reason why I'm asking about this is because I have a Java > applicatiion > > with UI outside NIFI and there're some configuration data that could be > > updated into a database, and my processor in NIFI need to get the updated > > configuration > > data from that database as soon as possible, but my processor is > configured > > to be timer driven of 5 mins. I hope the processor could be triggered to > > run after the configuration is updated by the Java application when it's > > not yet reached > > the time for it to be triggered. Thanks. > > > > Regards, > > Ben >