public void deployProcessDefinition( String xmlProcessDefinition, WorkflowProcessDef wfProcessDefEntity) throws OperationException { try { ProcessDefinition pd = jbpm.getProcessDefinitionFromXml(xmlProcessDefinition); wfProcessDefEntity.setUniqueName(pd.getName()); wfProcessDefEntity.setVersion(pd.getVersion()); wfProcessDefEntity.setDescription(pd.getDescription()); log.trace("Deploying workflow process definition name #0", pd.getName()); jbpmContext.deployProcessDefinition(pd); wfProcessDefEntity.setProcessDefEngineKey(String.valueOf(pd.getId())); jbpmContext.getSession().flush(); // }catch (JpdlException e) { } catch (Exception e) { throw new OperationException("Could not deploy process definition: " + e.getMessage()); } }