If the values are dynamic and the Fact/Field static for a keyword you could consider using a Template or Decision Table, where for example a single column represents a Fact/Field and the user simply provides the values.

I am surprised to read you found DSL had to be defined for every Condition or Action. This is certainly not the case in my experience.

If you meant you had to define a DSL for every Fact/Field combination you require this is to be expected.

Otherwise, "yes" this can only be achieved by changing the code base.

With kind regards,

Mike

sent on the move

On 9 Aug 2012 13:59, "san_drools" <pathasantosh@yahoo.co.in> wrote:

Hello,

       I need to know how to proceed to define keywords that represent
objects of facts in Drools.

         In detail, i am  using Guvnor editor to write Business and
technical rules required on a package basis for an application. So, here
writing rules by using Objects and it's attributes synactically is a tedious
job for client.
         So, the idea is "to provide some keywords to the client where each
keyword represents an object/attribute. By using keywords simply, the client
will write a rule. These keywords shall be processed (may be at compile
time) and the respective object/attribute shall be used/considered in rule
when the rules are fired"

          To achieve this,
             1. worked with DSL configurations but it fulfilled our idea
partially as every #condition and #action needs to be defined in DSL
configurations to be able to use them in a rule.
             2. Tried working on guvnor sources for it, but couldn't be able
to do (as i am new to drools; i am a learner)

        Can any one please suggest the way we can proceed to achieve this
requirement. Is 'working on guvnor sources' only the possible way for this?
Or is there any option/feature we can proceed with? Please let me know.
Thanks in advance.

Regards
San_Drools







--
View this message in context: http://drools.46999.n3.nabble.com/How-to-define-keywords-that-represent-objects-in-facts-to-be-able-to-use-in-rules-tp4019065.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users