// creating a person that likes the cheese:
// Retrieve the generated fact type
FactType personFact = ruleBase.getFactType( "org.drools.generatedbeans.Person" );
// Create a new Fact instance
Object person = personFact.newInstance();
// Set a field value using the more verbose method chain...
// should we add short cuts?
personFact.getField( "likes" ).getFieldAccessor().setValue( person,
cheese );