Reputation: 4180
I am starting and stopping a processor group containing a flow of custom processors, via API.
How can I make the processor group run only once and just stop?
We can use a cron to get it executed only once. But is there a clean way, without the need to calculate the cron expression and executing it only once?
Upvotes: 0
Views: 2441
Reputation: 1700
You can use the InvokeHTTP processor when finish to call the nifi-api.
Here you can find an interesting article explaining how to do this.
Upvotes: 0
Reputation: 31490
At the end of your flow you can use InvokeHTTP processor (or) trigger shell script and making use of process group REST API you can stop all the processors in the process group.
Schedule your trigger processor in your process group to run on Timer Driven with 1000000000000 sec and Using another InvokeHTTP processor (or) using Shell script you can start this processor.
Flow:
You can either stop your trigger processor (or) stop the entire process group.
If you are stopping the entire process group then you need to keep InvokeHTTP processor that starts the process group needs to be in different process group.
Upvotes: 1