I'm trying to create a simple test case using Arquillian, Seam and drools.
consequenceExceptionHandler can not be loaded by drools api because of javaassist manipulation and class loading in Jboss AS 7.
I changed following code to fix this issue
org.jboss.seam.drools.RuleBase.java
if (consequenceExceptionHandler != null)
{
log.debug("adding consequence exception handler: " + consequenceExceptionHandler.getExpressionString());
Class handlerClz = consequenceExceptionHandler.getValue().getClass();
if (ProxyFactory.isProxyClass(consequenceExceptionHandler.getValue().getClass()))
handlerClz = consequenceExceptionHandler.getValue().getClass().getSuperclass();
RuleBaseConfiguration rbconf = new RuleBaseConfiguration();
ConsequenceExceptionHandlerOption cehOption = ConsequenceExceptionHandlerOption.get(handlerClz);
rbconf.setOption(cehOption);
ruleBase = RuleBaseFactory.newRuleBase(rbconf);
}
components.xml configuration
<drools:rule-base name="flowRules" rule-files="flow.drl" consequence-exception-handler="#{cosequenceExceptionHandler}"/>