@viswanatha reddy Can you provide a little more detail as far as what you are trying to do? Are asking if there is a way to stop a processor if it throws an exception (A particular exception?)? Can you give an example?
there is a discussion about stopping processors using nifi apis:
Now, if you have custom processor, I believe you could define class member to flag when you want to stop processing incoming flow files onTrigger, then define relationship to processor InvokeHTTP, and call nifi API as mentioned by a link above (and whatever notifications you need, as usually).
If you use built-in processor, you won't be able to immediately prevent a processor of processing incoming flow files (queued or just rapidly coming in), but still you can forward failed FF to failure relationship and call InvokeHTTP processor and the rest of your error handling.