Hi,
I have question which is related to deployment of process definition from the code, as it is shown below. Actually it is more hibernate issue, since every new deployed Process Definition is not getting a consecutive ID number in JBPM_PROCESS_DEFINITION table. So the JBPM_PROCESS_DEFINITION table looks like that:
ID | Name | ver| .... | ... -------------------------------------------------- 1 | websale | 1 | FALSE | 2 2162 | SimpleSplitTest | 1 | FALSE | 2163 ----------------------------------------------------
public static void deployProcessPar(String filePath) throws JbpmAtflowException, FileNotFoundException { JbpmContext context = getAdminContext(); try { ZipInputStream zip = new ZipInputStream(new FileInputStream(filePath)); ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zip); context.deployProcessDefinition(processDefinition); } catch (Exception e) { throw new JbpmAtflowException("Could not deploy process PAR archive", e); } finally { context.close(); } }
Yes it's an hibernate "issue". JBPM use a "native" ID assignement strategy so Hibernate use one sequence for all tables. The second process defintion has a ID with the value 2162 because 2161 elements exist already in the database.
Matthieu