[JBoss jBPM] - Re: Error in leaveNode and SubProcess
by jurna
Thank you very much for your reply. After changing process definition as you suggested, everything works fine. Here is changed unit test, which completes successfuly:
| public class TestSubProcessBug extends TestCase{
|
| public void testBug() {
| ProcessDefinition subDefinition = ProcessDefinition.parseXmlString("<?xml version='1.0' encoding='UTF-8'?>"+
| "<process-definition name='testSubProcess'>"+
| " <start-state name='start'>"+
| " <transition to='testState'/>"+
| " </start-state>"+
| " <node name='testState'>"+
| " <script>"+
| " executionContext.leaveNode();"+
| " </script>"+
| " <transition to='end'/>"+
| " </node>"+
| " <end-state name='end'/>"+
| "</process-definition>");
| ProcessDefinition definition = ProcessDefinition.parseXmlString("<?xml version='1.0' encoding='UTF-8'?>"+
| "<process-definition name='testParent'>"+
| " <start-state name='start'>"+
| " <transition to='state'/>"+
| " </start-state>"+
| " <node name='state'>"+
| " <script>"+
| " executionContext.leaveNode();"+
| " </script>"+
| " <transition to='subProcess'/>"+
| " </node>"+
| " <process-state name='subProcess'>"+
| " <sub-process name='testSubProcess'/>"+
| " <transition to='end'/>"+
| " </process-state>"+
| " <end-state name='end'/>"+
| "</process-definition>");
| ProcessState processState = (ProcessState) definition.getNode("subProcess");
| processState.setSubProcessDefinition(subDefinition);
| ProcessInstance processInstance = new ProcessInstance(definition);
| processInstance.signal();
| }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126037#4126037
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126037
18 years, 2 months