//Clear any state from previous runs of the business engine
WorkingMemory workingMemory = businessRules.newWorkingMemory( );
//This is a small ruleset , so we can add a debug listener to see what is going on
workingMemory.addEventListener(
new DebugWorkingMemoryEventListener( ) );
//Let the rule engine know about the facts
workingMemory.assertObject(stockToBuy);