RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage( pkg );
WorkingMemory workingMemory = ruleBase.newStatefulSession();
ProcessInstance processInstance = ( ProcessInstance )
workingMemory.startProcess("org.drools.milestone");
assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
workingMemory.insert(new Person("Jane Doe", 20));
assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
workingMemory.insert(new Person("John Doe", 50));
assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());