0 Replies Latest reply on Jan 21, 2009 1:29 PM by svetoslav kasabov

    [size=18][b]subProcessDefinition not found[/b][/size]

    svetoslav kasabov Newbie

      I have process that invoke sub process using process state. I test the process with JUnit. When start test it says - ERROR (GraphElement.java:295) - action threw exception: can't create a process instance when processDefinition is null. This is because can't find the sub process definiton. How can I bound sub process definition to parent process definition. This is my code in JUnit test

      ProcessDefinition definition = ProcessDefinition
       .parseXmlInputStream(new FileInputStream("jpdl\\parent\\processdefinition.xml"));
       ProcessDefinition definitionSub = ProcessDefinition
       .parseXmlInputStream(new FileInputStream("jpdl\\sub\\processdefinition.xml"));
       ProcessState st = (ProcessState)definition.getNode("Sub process Invoke");
       st.setProcessDefinition(definitionSub);
       ProcessInstance instance = new ProcessInstance(definition);
       instance.signal();