The Cancel block is used to stop the flow at this point.
Connect the output of a block with the input of the Cancel block to stop the flow.
Example:

Result:
Cancel of the flow.
Tips and best practices:
The Cancel block terminates your application and all running processes at this point.
Library:
General