java - Drools DSL custom expander -


there dsl.defaultexpander , dsl.defaultexpanderresolver. design , javadoc gives idea can add custom expander flow. didn't found real possibility that. see how achieve dsl parsed custom expander?

well, in knowledgebuilderimpl (the class used compile drl/dsl) see following method:

public defaultexpander getdslexpander() {     defaultexpander expander = new defaultexpander();     if (this.dslfiles == null || this.dslfiles.isempty()) {         return null;     }     (dslmappingfile file : this.dslfiles) {         expander.adddslmapping(file.getmapping());     }     return expander; }  

as can see, defaultexpander hardcoded in there, guess there no way specify other implementation.

same thing happens in drlparser.getdefaultresolver() defaultexpanderresolver instantiated no matters what.

in opinion, way go pre-generate drl (outside drools) based on own semantics , feed generated drl drools.

hope helps,


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -