How can i break/stop a workflow?

Hello,

I’m wondering how can I avoid “nested if”, i try to reply this in workflow

but I don’t know how to stop workflow, is this possible?

I am not sure exactly what you mean here the code you have provided isn’t nested that would look more like

if(input !==""){
    if(input ==="foo"{
       return error;
   })   
}
//if you want them in the on if 

if(input ==="" || input2 ==="" ){
    return error;
}

if your trying to break a we web workflow before this I would just do an if before running the custom code

Sorry! Wrong SS. I’m trying to avoid workflows like this:

yeah no worries in the first if just check both conditions