Re: [rules-users] rules-users Digest
by Kumar, Ravendra
Hello All,
I am frustrated with error: 'Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration' xxx.drl
This is generated by eclipse drools plugin in problem view as a error, it would be helpful if someone help me out. I am using following artifacts
1. eclipse ide: Indigo(3.7)
2. eclipse drools plugin: 5.2.final
4. drools runtime 5.2.final (generated in eclipse)
Thanks,
Ravi
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: 08 March 2012 11:08 AM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 64, Issue 21
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of rules-users digest..."
Today's Topics:
1. how to invoke java method with variable arguments from drl
file (womuji)
2. Re: how to invoke java method with variable arguments from
drl file (Matteo Cusmai)
3. Simple question about String comparison in Drool (shawn)
4. Re: Simple question about String comparison in Drool
(Mauricio Salatino)
5. Re: Simple question about String comparison in Drool (shawn)
6. Persistence in fireUntilHalt() loop (Alberto R. Galdo)
7. Re: how to invoke java method with variable arguments from
drl file (Wolfgang Laun)
----------------------------------------------------------------------
Message: 1
Date: Wed, 7 Mar 2012 09:09:49 -0800 (PST)
From: womuji <cmregister(a)gmail.com>
Subject: [rules-users] how to invoke java method with variable
arguments from drl file
To: rules-users(a)lists.jboss.org
Message-ID: <1331140189049-3807314.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
We are upgrading Drools from 5.1 to 5.3, and running into some issue when invoking a Java method with String variable arguments:
methodA(String... params)
how do we invoke this in a drl file? We used to call it in 5.1 as:
objA.methodA({"string1"});
and it works fine. Now in 5.3, it complains that
"unable to resolve method using strict-mode:
objA.methodA([Ljava.lang.Object;)]"
If we tried objA.methodA(new String[]{"string1"}); it complains that "unable to resolve method using strict-mode:
objA.methodA([Ljava.lang.String;)]"
It passes the rule loading if we change to :
objA.methodA("string1");
but when actually running the rule, we are getting error saying " unable to resolve method methodA(java.lang.String)"
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-invoke-java-method-with-variable...
Sent from the Drools: User forum mailing list archive at Nabble.com.
------------------------------
Message: 2
Date: Wed, 7 Mar 2012 21:41:56 +0100
From: Matteo Cusmai <cusmaimatteo(a)gmail.com>
Subject: Re: [rules-users] how to invoke java method with variable
arguments from drl file
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<CABd_zP_kqpoRUCaDvWLcXr7Q-4uQ9JrOdyH82wGy3=GVPioW3Q(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
>From my experience, if you want call a method from then clause, it has
>to
be static method.
Bye bye,
Matteo Cusmai
Il giorno 07/mar/2012 18:10, "womuji" <cmregister(a)gmail.com> ha scritto:
> We are upgrading Drools from 5.1 to 5.3, and running into some issue
> when invoking a Java method with String variable arguments:
>
> methodA(String... params)
>
> how do we invoke this in a drl file? We used to call it in 5.1 as:
>
> objA.methodA({"string1"});
>
> and it works fine. Now in 5.3, it complains that
>
> "unable to resolve method using strict-mode:
> objA.methodA([Ljava.lang.Object;)]"
>
> If we tried objA.methodA(new String[]{"string1"}); it complains that
> "unable to resolve method using strict-mode:
> objA.methodA([Ljava.lang.String;)]"
>
> It passes the rule loading if we change to :
>
> objA.methodA("string1");
>
> but when actually running the rule, we are getting error saying "
> unable to resolve method methodA(java.lang.String)"
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/how-to-invoke-java-method-with-varia
> ble-arguments-from-drl-file-tp3807314p3807314.html
> 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
>
13 years, 9 months
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
13 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
13 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.
13 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.
13 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.
13 years, 9 months