" <transition to='end' />" +
" </process-state>" +
" <end-state name='end' />" +
"</process-definition>"
);
superProcessDefinition.addDefinition(new ContextDefinition());
ProcessDefinition subProcessDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state>" +
" <transition to='state' />" +
" </start-state>" +
" <state name='state'>" +
" <transition to='end' />" +
" </state>" +
" <end-state name='end' />" +
"</process-definition>"
);
subProcessDefinition.addDefinition(new ContextDefinition());
// bind the sub-process to the super process definition
ProcessState processState = (ProcessState) superProcessDefinition.getNode("subprocessnode");
processState.setSubProcessDefinition(subProcessDefinition);