A flow can have multiple End activities. The End activity will stop the execution of the flow and can have a result value to set the result of the flow. Every End must have the same result type (e.g. Boolean, Integer, string or custom type).
Flow end
To set the flow result, double-click on the End activity, or select "Set variable as return value" on an activity.
You can also set the result variable in the properties of an end activity. The drop down will show the available variables.