public String getExpandedDRL ( final String source , final DefaultExpanderResolver resolver ) throws DroolsParserException { final Expander expander = resolver . get ( "*" , null ) ; final String expanded = expander . expand ( source ) ; if ( expander . hasErrors ( ) ) { String err = "" ; for ( ExpanderException ex : expander . getErrors ( ) ) { err = err + "\n Line:[" + ex . getLine ( ) + "] " + ex . getMessage ( ) ; } throw new DroolsParserException ( err ) ; } return expanded ; }
This will expand the DRL using the given expander resolver . useful for debugging .