rem: var dstUri = flowHelper.getDocumentHelper(cocoon).getSourceUri(flowHelper.getPageEnvelope(cocoon).getDocument()); 
add: var dstUri = flowHelper.getPageEnvelope(cocoon).getDocument().getSourceURI(); 
context: function editDocument() {    try {        var flowHelper = new FlowHelper();        var resolver = cocoon.getComponent(SourceResolver.ROLE);        var dstUri = flowHelper.getDocumentHelper(cocoon).getSourceUri(flowHelper.getPageEnvelope(cocoon).getDocument());                SourceUtil.copy(resolver, cocoon.parameters["sourceUri"], dstUri, _getParameter("useBuffer", "false") == "true");        if(_getParameter("noCheckin", "false") == "false")            flowHelper.reservedCheckIn(cocoon, _getParameter("backup", "true") == "true");        if(_getParameter("noWorkflow", "false") == "false")            flowHelper.triggerWorkflow(cocoon, _getParameter("workflowEvent", "edit"));        if(_getParameter("noStatus", "false") == "false")            cocoon.sendStatus(_getParameter("status", 204));        else            cocoon.redirectTo(_getParameter("redirectUrl", "FIXME"));            } catch (exception) {        cocoon.log.error("Can not edit doucment.", exception);    } finally {        if(resolver != null)            cocoon.releaseComponent(resolver);    }}
meta: 791	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/d9c0c0cac60da63773f84a1c79143533b1c4b322/edit-document.js/clean/src/webapp/lenya/usecases/edit-document.js