[rules-users] Re: How to create DSL template that produces rules based on arbitrary user's input?

Matt Geis mgeis at yahoo.com
Fri Aug 8 17:37:04 EDT 2008


You can do this.  Keep in mind that the DSL engine will try to match each dsl mapping entry into the LHS of the rule, one by one, in the order they are declared in the mapping file.  This means you can have one mapping that substitutes the word "and" for a comma, and so on.  It may take some clever mapping, and multiple entries to get the flexible effect you're looking for, but it's doable (I've done it).

You might find the typed variable support in Drools 5 helpful.  There's a blog post about it, and a few weeks ago I posted a more detailed answer to essentially the same question to the list, if you want to go through the archives to find it.

This may help...

http://article.gmane.org/gmane.comp.java.drools.user/11020/match=geis


Matt Geis



      



More information about the rules-users mailing list