ProcessInstance processInstance = session.startProcess("org.drools.event");
assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
session = SerializationHelper.getSerialisedStatefulSession(session);
processInstance = session.getProcessInstance(processInstance.getId());
processInstance.signalEvent("MyEvent", "MyValue");
assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
assertEquals("MyValue", ((VariableScopeInstance)
((ProcessInstance) processInstance).getContextInstance(
VariableScope.VARIABLE_SCOPE)).getVariable("MyVar"));
}