[jboss-user] [JBoss jBPM] - Deploying process programatically, Hibernate

jstachera do-not-reply at jboss.com
Tue Dec 12 13:26:53 EST 2006


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
  | ----------------------------------------------------
  | 


why the SimpleSplitTest did not get ID = 2 ??


  | 	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();
  | 		}
  | 	}
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993144#3993144

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993144



More information about the jboss-user mailing list