*/
public class JbpmUnitTestCase extends AbstractMuleTestCase
{
public void testDeployAndRun() throws Exception
{
Jbpm jbpm = new Jbpm();
jbpm.initialise();
// Deploy the process
jbpm.deployProcess("simple-process.jpdl.xml");
// Start the process
Object process = jbpm.startProcess("simple", null, null);
assertNotNull(process);
Object processId = jbpm.getId(process);
// The process should be started and in a wait state.
process = jbpm.lookupProcess(processId);
assertNotNull(process);
assertEquals("dummyState", jbpm.getState(process));
// Advance the process one step.
process = jbpm.advanceProcess(processId);
// The process should have ended.
assertNotNull(process);
assertTrue(jbpm.hasEnded(process));
jbpm.dispose();
}