/** * Create a process instance and associate it with the * current conversation. * * @param processDefinitionName the jBPM process definition name * @param businessKey the business key of the new process definition */ public void createProcess(String processDefinitionName, String businessKey) { /*ProcessInstance process = ManagedJbpmContext.instance().getGraphSession() .findLatestProcessDefinition(processDefinitionName) .createProcessInstance(Collections.EMPTY_MAP, businessKey);*/ ProcessInstance process = ManagedJbpmContext.instance().newProcessInstanceForUpdate(processDefinitionName); process.setKey(businessKey); afterCreateProcess(processDefinitionName, process, true); }
processInstance.setKey(key);
processInstance.setKey(key);