although drools-compiler has the descr classes, it would be nice to have an Rule Object Model like the one I showed you guys.

this way, a condition would be represented by a condition object like this

public class Condition {

    /**
     * Added the attribute to make it easier to compile the rule to
     * java code
     */
    private String objectType;
    /**
     * if the attribute is bound to a variable, the method
     * should return the name of the variable.
     */
    private String boundVariable;
    /**
     * the attribute of the object to match on
     */
    private String attribute;
    /**
     * the operator for the condition, which may be ==, !=
     * <, >, <=, >=, <>
     */
    private String operator;
    /**
     * The timestamp of the last change made to the condition.
     * this attribute is optional and is meant to make it
     * easier to run queries on the rules by timestamp
     */
    private long timestamp;
    /**
     * the value of the condition
     */
    private String value;
    /**
     * the value can be either a single literal value or a list
     * of values of the same type
     */
    private String valueType = null;
    /**
     * the version of the condition. for advanced reporting, it's
     * easier if the condition is tagged with a version number.
     */
    private String version;
}

I'm totally bias, but it would make writing tools easier. things like rule repo, validation, impact analysis, queries and reporting simpler :)


peter

On 2/27/07, Mark Proctor <mproctor@codehaus.org> wrote:
Suggest away.

Mark
Michael Neale wrote:
Guys - are there going to be any changes to the compiler API now? Cause now is the time to fix/change it if needed.

I have some suggestions if anyone is interested.


_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev


_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev