log.debug("begin transaction");
TransactionManager.beginTransaction();
Element processElement = processDoc.getRootElement();
log.debug("<process>");
TwisterProcess tp = deployProcessElement(processElement);
Document defDoc = definitionDoc;
if (definitionDoc == null) {
defDoc = getProcessDefDoc(processElement);
}
deployDefinitions(defDoc, tp);
deployVariables(processElement.element("variables"), tp);
deployCorrelationSets(processElement.element("correlationSets"), tp);
// todo implements 'partnerLinks' elements
// todo implements 'partners' elements
// todo implements 'faultHandlers' elements
// todo implements 'compensationHandlers' elements
// todo implements 'eventHandlers' elements
deployActivity(processElement, tp);
log.debug("</process> ");
saveProcess(processDoc, defDoc, tp.getNamespace()+tp.getName());
log.debug("commit transaction");
TransactionManager.commitTransaction();
} catch (TransactionException e) {
try {