usecase.checkExecutionConditions(); if (! usecase.hasErrors()) { return executeFlow(usecase); 
if (usecase.isOptimistic()) { usecase.checkPreconditions(); preconditionsOk = !usecase.hasErrors(); } if (preconditionsOk) { if (usecase.isOptimistic()) { usecase.lockInvolvedObjects(); } usecase.checkExecutionConditions(); if (! usecase.hasErrors()) { return executeFlow(usecase); } 
function defaultSubmitFlow(usecase) {    if (cocoon.request.getParameter("submit")||cocoon.request.getParameter("lenya.submit")=="ok") {        usecase.checkExecutionConditions();        if (! usecase.hasErrors()) {            return executeFlow(usecase);        }    } else if (cocoon.request.getParameter("cancel")) {        usecase.cancel();        return "cancel";    }    else {        usecase.advance();    }    return "continue"}
791	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/791/3a365b1762310c4d0398dfe86ba669e25155b02c/usecases.js/buggy/src/modules-core/usecase/usecases.js