public static ExecutableFlow resetFailedFlows(final ExecutableFlow theFlow) { if (theFlow.getStatus() == Status.FAILED) { theFlow.reset(); } if (theFlow.hasChildren()) { for (ExecutableFlow flow : theFlow.getChildren()) { resetFailedFlows(flow); } } return theFlow; }