Error running Drools Planner examples
by Anton Hughes
Hi
Im getting the following error when running the Drools Planner examples -
can someone please explain what I need to change, and where?
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: The
directory dataDir
(C:\jboss\Drools\drools-planner-distribution-5.4.0.Beta2\examples\sources\data\nurserostering)
does not exist. The working directory should be set to the directory that
contains the data directory. This is different in a git clone
(drools-planner/drools-planner-examples) and the release zip (examples).
at
org.drools.planner.examples.common.business.SolutionBusiness.updateDataDirs(SolutionBusiness.java:95)
at
org.drools.planner.examples.common.app.CommonApp.createSolutionBusiness(CommonApp.java:55)
at
org.drools.planner.examples.common.app.CommonApp.<init>(CommonApp.java:35)
at
org.drools.planner.examples.nurserostering.app.NurseRosteringApp.<init>(NurseRosteringApp.java:31)
at
org.drools.planner.examples.app.DroolsPlannerExamplesApp$9.actionPerformed(DroolsPlannerExamplesApp.java:111)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
...
Thanks, and regards,
Anton
12 years, 9 months
Using Character typed properties in Drool 5.3
by Welsh, Armand
Community,
In drools 5.2 I had the following LHS"
when
BloombergColumn (columnName == "CRNCY", $cur : stringValue != null)
Country (currency == $cur, emergingMkt == 'Y' || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT"))
I am switching to Drool 5.3, and Drools Guvnor reports the following error upon validate (or compile):
[bum_code_value.currency 01] Unable to Analyse Expression emergingMkt == 'Y' || countryCode == "BH" || countryCode == "HR" || countryCode == "CZ" || countryCode == "EE" || countryCode == "HK" || countryCode == "HU" || countryCode == "IL" || countryCode == "KR" || countryCode == "KW" || countryCode == "MO" || countryCode == "OM" || countryCode == "QA" || countryCode == "SA" || countryCode == "SG" || countryCode == "SK" || countryCode == "SI" || countryCode == "TT": [Error: Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String] [Near : {... == "SK" || countryCode == "SI" || countryCode == "TT" ....}] ^ [Line: 7, Column: 28]
Looking at the emergingMkt in my data model, I see that it is defined as a Character. If I change my LHS to:
BloombergColumn (columnName == "CRNCY", $cur : stringValue != null)
Country (currency == $cur, emergingMkt == Character.valueOf('Y') || countryCode in ("BH","HR","CZ","EE","HK","HU","IL","KR","KW","MO","OM","QA","SA","SG","SK","SI","TT"))
Then the validate passes.
Was this change in behavior intentional? I don't see a reference to this change in the Drools 5.3 documentation, and this makes for a harder to read rule for our Drools analysts.
Thanks in advance,
Armand
12 years, 9 months
Drools Eclipse debug views - Audit, Agenda, Working Memory, etc
by devan.vanreenen@gmail.com
Hi there,
Help needed pls.
I have read previous threads from this forum on not being able to see any
content on Drools Eclipse debug views - Audit, Agenda, Working Memory, etc
when debugging rules and still cant seem to get this working
I have tried the following suggestions
I inspect my stateless session under variables tab on eclipse debug
perpective and there is no member variable for the Working Memory to select.
I have tried suggestions around refresh issues as well.
Is there anything else I can check or do?
Thanks
Devan
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Eclipse-debug-views-Audit-Agenda...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Fusion: Insert passed events
by javadude
Hi !
scenario: Event A then Event B. If there is no Event B after 5 min of A then
trigger rule.
*when
time1:(Event) from entry-point xxx
not (Event(this after[ 0,5m ] time1)) from entry-point xxx
then
...
end*
For realtime event that works fine, but in real life you have the event
coming in delayed, eg. from an interface.
Example:
Event A time: 01:00 (mm:ss) but received at 02:00
Above rule will trigger at 07:00, but the business logic would require it to
be triggered at 06:00
How do I handle this kind of requirement ?
Thanks
Sven
--
View this message in context: http://drools.46999.n3.nabble.com/Fusion-Insert-passed-events-tp3824630p3...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Future events
by lexsoto
Hello:
I have this rule:
An event is inserted that has a timestamp in the future, the rule is fired.
This looks like a bug, because the sliding time window has not yet met the
timestamp of the event.
I expect the rule to fire not immediately but only when the time reaches the
event time.
Is my assumption/understanding correct?
--
View this message in context: http://drools.46999.n3.nabble.com/Future-events-tp3826236p3826236.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
[rule-users]Drools Fact Management with Large Dataset in RDBMS
by CW
Thank you in advance for your time reading this post first.
I have to make my rules work with databases with TB of data, so fact
management become a major issue when I design my system. Currently I have
several main programs which use both stateful and stateless sessions. I
would like to collect some good practices to manage the insertion and
disposal of facts so that I can keep my working memory healthy. Below are
some of my findings in this forum:
1. Insert only relevant facts into working memory with the use of "data
preparation" rule together with Drools pipeline (hibernate, mybatis, etc).
An excellent example from manstis in the post
http://drools.46999.n3.nabble.com/Applying-rules-on-the-data-in-an-RDBMS-...
---------------------
rule "bootstrap"
salience -100
when
$list : List( ) from placeHolder.namedQuery("Smurfs")
then
for(ExternalObject o : $list ) {
insert( o );
}
end
--------------------
2. Use "insertlogical" instead of "insert" when inserting facts in rule
3. Implement "garbage collection" rule to clean up unwanted facts
I would like to ask:
1. if there are any other suggestion on optimizing fact management?
2. is there a way for the rule engine to directly operate on data in
database (perhaps with some other plugin?)
Thanks again!
--
View this message in context: http://drools.46999.n3.nabble.com/rule-users-Drools-Fact-Management-with-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months