Hi
- If validateRequest failes then i am returning a value(Not throwing exception ).In this case i dont want workflow to go to PlaceRequest and Save Request
- Similarly if PlaceRequest failes then i am returning a value(Not throwing exception ).In this case i dont want workflow to go to Save Request.
How to handle the above scenario
Sample code
@Service
public class ValidateRequest implements JavaDelegate {
@Override
public void execute(DelegateExecution execution) throws Exception {
Request req = (Request) execution.getVariable("req");
if( !validate(req) ) //if validate(req) is false i should return from here and not execute subsequent workflows
{
return;
}
}