drools

How to compile a .drl file through an ant build script

我的梦境 提交于 2020-01-11 03:33:09
问题 I am new to Drools. I want to know if it is possible to compile a .drl file using some kind of a command that can be entered in the windows command line (shell/cmd). I looked through the binaries that come with the drools distribution but I am unable to figure out a way to compile a .drl file. The reason I am interested in such a command is that I want to write an ant build file which will compile my java classes and rules and create a jar. This jar should be self sufficient, i.e running the

JBoss Drools Requirements

强颜欢笑 提交于 2020-01-07 02:24:52
问题 I've been trying on multiple machines, with multiple versions of Eclipse, JBoss Drools, and the Eclipse GEF (as stated in Drools docs as required). I can't get them installed and working together, at all. See below for exact problem. 回答1: In your question text you refer to Drools, but not jBPM. The install is choking on jBPM. Perhaps try installing Drools without the jBPM stuff? I'm running Drools 6.2.0.Final on Luna SR2 without issues, and I don't have jBPM installed. If you still have

Drools 7.7.0 Installation Error

对着背影说爱祢 提交于 2020-01-06 08:36:08
问题 I am trying to install drools plugin into eclipse 4.2 (juno). I have used this update site: https://download.jboss.org/drools/release/7.7.0.Final/org.drools.updatesite/ Its throwing this error in the first step of installation: Cannot complete the install because one or more required items could not be found. Software being installed: JBoss Drools Core Developer Resources 7.7.0.Final (org.drools.eclipse.feature.source.feature.group 7.7.0.Final) Missing requirement: JBoss Drools Core 7.7.0

Drools accumulate

半腔热情 提交于 2020-01-06 05:19:08
问题 Could someone please help me with this accumulate function accumulate ($sum: Repetition(objectId == getEventKey(), "VERY_LONG".equals(getRepType())); $count: count($sum); $count== $vlongCount) though the $count=10 and vlongcount=11 accumulate is still happening. is there any bug associted with accumulate function in Drools 回答1: $count:Number(intValue == $vlongCount) from accumulate(Repetition($sum: objectId == getEventKey(), "VERY_LONG".equals(getRepType())),$count: count($sum)) 来源: https:/

Optaplanner: Iterate over list variable in drools rule file

守給你的承諾、 提交于 2020-01-06 04:49:26
问题 I am solving a problem similar to employee rostering. I have an additional constraint. The employees have a "type" value assigned to them. It's a hard constraint that atleast 1 employee of each "type" be there everyday. I have modelled it as follows: rule "All employee types must be covered" when $type: Constants.EmployeeType() from Constants.EmployeeType.values() not Shift(employeeId != null, $employee: getEmployee(), $employee.getType() == $type.getValue()) then scoreHolder

How to use null safe operator in drools decision table

天大地大妈咪最大 提交于 2020-01-05 20:42:21
问题 Please let me know how to use ".?" (null safe operator) in drools decision table(Spreadsheet). Attached my spreadsheet, where for mdcl object I need to add null safe operator. Please let me know if I need to add additional information, as I'm new to Drools. 回答1: The null-safe operator in Drools is !. , not .? - see the documentation. You can use it inside decision tables just as you would when writing rules. In your example, change the condition from mdcl.MDCL_Health.get("MDCL").Value to mdcl

How to use null safe operator in drools decision table

不羁的心 提交于 2020-01-05 20:41:55
问题 Please let me know how to use ".?" (null safe operator) in drools decision table(Spreadsheet). Attached my spreadsheet, where for mdcl object I need to add null safe operator. Please let me know if I need to add additional information, as I'm new to Drools. 回答1: The null-safe operator in Drools is !. , not .? - see the documentation. You can use it inside decision tables just as you would when writing rules. In your example, change the condition from mdcl.MDCL_Health.get("MDCL").Value to mdcl

Drools Rule Expression : Access Nested class data member

瘦欲@ 提交于 2020-01-05 12:09:10
问题 Below is the structure of my classes: public class Address { private String street; private int phone; public void setStreet(String s){street = s;} public void setPhone(int p){phone = p;} public String getStreet(String s){return street;} public int getPhone(){ return phone; } } public class Borrower { Address adr = new Address(); public void setAddress(String s, int p) { adr.setStreet(s); adr.setPhone(p); } public Address getAddress() { return adr; } } Drools Expression I am using :- rule

Is there any Drools plugin for Eclipse?

﹥>﹥吖頭↗ 提交于 2020-01-05 07:13:34
问题 Have JBoss (or any other Entity) released a Drools plugin for Eclipse ? 回答1: Here goes the steps for how to install drools plugin in eclipse . Start Eclipse Help -> Install New Software In the Work With: or Site: input field, enter: "http://download.jboss.org/drools/release/5.4.0.Final/org.drools.updatesite/" and click the "Add" button For the Name you can just enter "Drools" Check the Drools and jBPM checkbox and follow the instructions to get it installed. I hope this tutorial helpful to

Type-unsafe Object field access in Drools

我们两清 提交于 2020-01-04 13:50:23
问题 I'm working with a system where some of the data inserted into a Drools engine follows this (heavily oversimplified) format: public class Item { public String getValueType() { ... } public Object getValue() { ... } } The values may be several different types. Now, I want to create a bunch of Drools rules to check various fields of the values, something along the lines of: $a : Item(valueType == "Car", value.owner.location == "At Home") $b : Item(valueType == "Payments", value.rates.discounts