I tried without late binding and got same result. However after looking at the 
unit test it seems the subprocess need to be set explicitly and the 
superprocess then persisted in the database.

  | // create the subprocess
  |     ProcessDefinition subProcessDefinition = new ProcessDefinition("sub");
  |     // store the subprocess in the database
  |     graphSession.saveProcessDefinition(subProcessDefinition);
  | 
  |     // create the super process
  |     ProcessDefinition superProcessDefinition = 
ProcessDefinition.parseXmlString(
  |       "<process-definition name='super'>" +
  |       "  <process-state name='subprocess' />" +
  |       "</process-definition>");
  |     // resolve the reference to the subprocess
  |     ProcessState processState = (ProcessState) 
superProcessDefinition.getNode("subprocess");
  |     processState.setSubProcessDefinition(subProcessDefinition);
  |   
  |     // save and reload the superprocess
  |     superProcessDefinition = saveAndReload(superProcessDefinition);
  |   
  |     processState = (ProcessState) 
superProcessDefinition.getNode("subprocess");
  |     assertNotNull("sub", processState.getSubProcessDefinition().getName());
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192292
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to