package org.domain.seamwithrules.session; import javax.ejb.Stateless; import org.drools.WorkingMemory; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Logger; import org.jboss.seam.log.Log; import org.jboss.seam.international.StatusMessages; import com.credit.CreditScore; @Stateless @Name("creditRun") public class CreditRunBean implements CreditRun { @Logger private Log log; @In StatusMessages statusMessages; @In WorkingMemory creditRulesWorkingMemory; public void creditRun() { CreditScore c = new CreditScore(); c.setLienType("FIRST_TD"); c.setDivision("Wholesale"); c.setScore(500); creditRulesWorkingMemory.insert(c); // if we have a ruleflow, start the process //creditRulesWorkingMemory.fireAllRules(); // implement your business logic here log.info("creditRun.creditRun() action called"); statusMessages.add("creditRun"); } // add additional action methods }