I am trying to start a NiFi flow by a HTTP call using HandleHttpRequest
Once the flow being invoked, I want it to keep running until stopped
I have a InvokeHttp processor in the flow..where I am putting Scheduling - Run Schedule of 1 sec, Time driven
But this processor is not repeating the task. any suggestions.
Once you start all the processors in the NiFi UI the flow is considered "running".
Posting to a HandleHttpRequest processor creates 1 Flow File which will then pass through your flow, until it reaches a processor that terminates the relationships and does not transfer the flow file anywhere.
Setting the run schedule of InvokeHttp to 1 second means every 1 second that processor will be executed by the framework. If there is another processor connected to InvokeHttp then every 1 second it is trying to get a flow file from the incoming queue to process it.
If you want something to continually happen in your flow then you need a source processor that keeps getting triggered. In the case of HandleHttpRequest, you would need to continually post data from somewhere outside of NiFi. In the case of other source processors you can schedule them to run on the scheduling time.
Thanks @Bryan Bende
so is there a hack? I wan to trigger by a http call however after that I want rest of the flow to continue as a scheduled task. ExecuteScript, ExecuteProcess?
I noticed we can start/stop a flow using nifi-rest api, I tried but got error.