Hi Pierre, I've checked the developer guide before I sent the email and
according to the developer guide, the method annotated with OnUnScheduled
will be called in 2 cases according to my understanding, please correct me
if I'm wrong:
1. when user tries to stop the processor in the NIFI UI, thus the processor
is no longer scheduled to run in this case, and the method will be called.
2. when method annotated with OnScheduled throws exceptions, for example
time out execution exception, the OnUnScheduled method will also be called.
My question is how to tell the first scenario from the second one? Thanks.
2017-08-11 15:51 GMT+08:00 Pierre Villard <pierre.villard...@gmail.com>:
> Hi Ben,
> You might want to have a look here:
> 2017-08-11 9:06 GMT+02:00 尹文才 <batman...@gmail.com>:
> > Hi guys, I'm trying to execute some code in my processor when the
> > is asked to stop in the NIFI UI by the user, I checked the developer
> > and only find OnUnscheduled will be called when the processor is no long
> > scheduled to run. I've tested this OnUnscheduled, it will also be called
> > after timed out executing OnScheduled task. So is there a way to execute
> > some code only when the processor is stopping?
> > Regards,
> > Ben