Has anyone tried to use the Drools Rules engine with Servoy? I am interested to know if we can use directly the JSRecord, JSFoundset and JSRelation in the rules (without having to write any Java classes) to access their properties.
For example, if we have an order table, can we use in the drools rule something like:
- Code: Select all
<rule-set name="cheese rules"
xmlns="http://drools.org/rules"
xmlns:java="http://drools.org/semantics/java">
<rule name="Order Discount">
<parameter identifier="order">
<class>com.servoy.j2db.dataprocessing.IRecord</class>
</parameter>
<java:condition>order.getValue("total_amount") > 1000</java:condition>
<java:consequence>
order.setValue("discount_percent", 15.5);
</java:consequence>
</rule>
</rule-set>