You have some actions to execute on a user click, but you don't want to execute them right away (e.g. for an approval), because you clicked by mistake. Then you can add the following "Execute Script" action at the first place. If the user clicks cancel, no further actions are processed.
var deferrer = jQuery.Deferred();
if(window.confirm("Do you want to approve?")){
deferrer.resolve(); }
else {
deferrer.reject("Cancelled");
}
return deferrer.promise();