[jboss-user] [JBoss jBPM] - Re: HelloTest NullPointer Exception
leonel_vr
do-not-reply at jboss.com
Thu Oct 5 19:58:40 EDT 2006
this is what i did ...
public class HelloTest extends TestCase {
public void testProcess() throws Exception
{
//JpdlXmlReader.parseFromResource("Hello/processdefintion.xml");
//ProcessDefinition definition=ProcessDefinition.parseParResource("Hello/processdefinition.xml");
//assertNotNull("Definition should not be null",definition);
// Extract a process definition from the processdefinition.xml file.
FileInputStream fis = new FileInputStream("processes/Hello/processdefinition.xml");
ProcessDefinition definition = ProcessDefinition.parseXmlInputStream(fis);
assertNotNull("Definition should not be null", definition);
ProcessInstance instance = new ProcessInstance(definition);
assertEquals("Instance is in start state", instance.getRootToken().getNode().getName(),"start");
instance.signal();
assertEquals("Instance is in auction state", instance.getRootToken().getNode().getName(),"auction");
instance.signal();
assertEquals("Instance is in end state", instance.getRootToken().getNode().getName(),"end1");
assertTrue("Instance has ended",instance.hasEnded());
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976451#3976451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976451
More information about the jboss-user
mailing list