.put("state", "complete");
submissionDb.updateDocument(submissionDoc);
} else {
// Get document that the changes were made against
CouchDb couchDb = documentDbDesignDocument.getDatabase();
CouchDocumentOptions options = new CouchDocumentOptions();
options.setRevision(approvedVersion);
JSONObject rootDoc = couchDb.getDocument(docId, options);
// Compute patch from submission
JSONObject submissionPatch = JSONPatcher.computePatch(rootDoc, approvedDoc);
JSONObject databasePatch = JSONPatcher.computePatch(rootDoc, currentDoc);