ReFramework - stop workflow

Hi, I am currently using the ReFramework (not using Orchestrator), and inside InitAllApplications I have a dialog asking the user to open a file. What is the best way to stop the workflow safely if the file is not an Excel file? I know that there is a Should Stop activity but what is the best way to stop the workflow immediately after this Open File activity without having to modify the rest of the activities after it with boolean flags to check if it can continue?

@DEATHFISH

As per my understanding it is Init state right.

After uploading the file and check whether the file contains .xlsx or .xls and if it didn’t contain then assign exception to the System Error variable. Then it will go to End state.

As we all know if any error occurs in Init state then it will go to End state.

@lakshman

Which activity should I use/ which exception should I throw?