Yes.
If the data "defines" the rules then there are numerous options:-
- Construct a DRL String yourself and pass this to a KnowledgeBuilder
- Use the fluent API to build rules programmatically
- Construct an XLS decision table using your favourite XLS (Java) API
and look at drools-decisiontables
- Construct a Guvnor decision table using classes in
droolsjbpm-ide-common (bundled with Guvnor)
If the data is to be plugged into place-holders in statically defined
rules:-
- Look at the use of Drools Expert Templates
Decision tables do not lend themselves well to "OR" as there is an implicit
"AND" between columns.
There might be other solutions, these are those that came readily to mind.
With kind regards,
Mike
On 24 February 2012 14:31, shawn <youngxiao121(a)hotmail.com> wrote:
If it is possible to create a drl file or decision table dynamically
in
drool
or java?
Like the drool received data then create drl or decision table based on the
data?
Data: Condition 1 AND Condition 2 OR Condition 3 .....
Can the above data be stored in the rule file which also contains the
operators "AND", "OR"?
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-ta...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users