rule implementation
by thomas kukofka
Hello,
I have 1 Object of Type "A"
with a position (x,y) and n Objects of type "B" with postions (x,y)
respectively.
I want to write a rule which gets 1 Object type "A" and more than 10 Objects
of Type "B" as input facts. The rule should determine 10 of the Objects of
type "B" which are nearest to the Object of type "B".
I would appreciate any help!
Regards
Thomas
16 years, 4 months
Perm gen addPackageFromDrl
by Joe White
HI all,
We've got an application that has the need to deploy dynamically
generated drl periodically. The drl is regenerated from a set of
database tables whenever a change is made to the tables. After running
through the generation and package building we eventually get an out of
memory error for permGen. The error is hit with 128 and 256mb of perm
gen.
The method that seems to cause the error is addPackageFromDRL on the
PackageBuilder. I've attached a method that represents what we are doing
with the drl and the package building in the 4.0.4 form. I get the error
in both 4.0.4 and in the 5.0 versions of drools. In the 4.0.4 version
shadow facts are disabled on the rule base.
Is regenerating rules frequently from a drl format a valid use case?
Any help in improving the perm gen consumption or fixing our use of
drools is greatly appreciated.
Thanks,
Joe
16 years, 4 months
Drools vs Business Logic
by Harsh Jetly
Hi ,
Firstly I would like to apologize for sending the same question to both the
mailing lists and sending it multiple number of times. I assure you , it
shall not happen again .
I am using version 4.0.4 of drools . I have a basic question :
If we compare a rule engine to code written within the application , which
would prove to be faster .
I know about the rete algorithm and concepts of node sharing and caching .
Another question that I have is , in which situation will Drools be best
suited ?
Thanks a ton
Harsh Jetly
Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com
This Document is classified as:
|------|
| [X] |
|------|L&T Infotech Proprietary |------|
| [ ] |
|------|L&T Infotech Confidential |------|
| [ ] |
|------|
L&T Infotech Internal Use Only |------|
| [ ] |
|------|L&T Infotech General Business
This Email may contain confidential or privileged information for the
intended recipient (s) If you are not the intended recipient, please do not
use or disseminate the information, notify the sender and delete it from
your system.
______________________________________________________________________
16 years, 4 months
How to create DSL template that produces rules based on arbitrary user's input?
by psentosa
Hi all,
This newbie has the following problem:
I'd like to let rules-creator to input something arbitrary, and the
corresponding rules are produced.
To be concrete, he'd like to be able to write the following condition:
When
I play only on "Monday", "Thursday", "Friday"
Then
I'll get 3000
But it should also be possible that he only inputs "Monday", or
"Monday","Tuesday","Wednesday","Thursday".
So the number of days to be input should be arbitrary.
With my current understanding, I could only put some placeholders (in the
example above:
I play only on {day1} {day2} {day3} ..... --> $player : Player (1stday ==
{day1} && 2ndday == {day2} && 3rdday == {day 3})
I'll get {number} --> $player.setPayment(number)
Hope I explained this correctly...any tipps? Or should I really create on
template for 1 day only, another template for 2 days only, and so on?
Thanks a lot
--
View this message in context: http://www.nabble.com/How-to-create-DSL-template-that-produces-rules-base...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 4 months
RE: [rules-users] Decision table not triggering
by Hehl, Thomas
Outside of the WM. There are a number of rules in this decision table, but
they all look just like this one. The way this works is that if it matches
any of these rules, then it's an approved request.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Anstis, Michael
(M.)
Sent: Friday, August 08, 2008 3:54 AM
To: Rules Users List
Subject: RE: [rules-users] Decision table not triggering
I think you might need to post more of your source if possible.
Where are you setting PoolInfo.daysBeforeSummons to 5, outside WM and
before fireAllRules or within the RHS of another rule?
Thanks,
Mike
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Hehl, Thomas
Sent: 07 August 2008 21:41
To: 'Rules Users List'
Subject: RE: [rules-users] Decision table not triggering
Nope. Only one of each.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Greg Barton
Sent: Thursday, August 07, 2008 4:33 PM
To: Rules Users List
Subject: Re: [rules-users] Decision table not triggering
Is there more than one PoolInfo object in working
memory? If so does any one of them match the rule?
Also, the rule conditions would create a cartesian
join because the PoolInfo and PostponementRequest are
not logically related. In other words, if you had
PoolInfo1, PoolInfo2, PostponementRequest1,
PostponementRequest2 in working memory, and all
matched the rule, you'd get the following rule
firings:
PoolInfo1, PostponementRequest1
PoolInfo1, PostponementRequest2
PoolInfo2, PostponementRequest1
PoolInfo2, PostponementRequest2
Probably not what you want.
GreG
--- "Hehl, Thomas" <Thomas.Hehl(a)acs-inc.com> wrote:
> I have a unit test that calls a decision table that
> generated the following
> rule with drools 4.0.7:
>
>
>
> #From row number: 10
>
> rule "postponePart_10"
>
>
>
> when
>
> PoolInfo(courtLocation == "101",
> daysBeforeSummons >= 7,
> daysBeforeSummons <= 999)
>
> postponementRequest:
> PostponementRequest(requestDaysAfterSummons
> >= 30, requestDaysAfterSummons <= 90,
> requestedDayOfWeek >= 2,
> requestedDayOfWeek <= 2)
>
> then
>
> postponementRequest.setAllowed(true);
>
> end
>
>
>
> This rule passes when daysBeforeSummons = 30. I
> then change the
> daysBeforeSummons to 5 and the rule still passes. I
> have debugged this and
> watched it run rule 10, so I don't know what else to
> do. Does this look like
> a bug?
>
>
>
>
>
> Thom Hehl
> Sr. eJuror Architect
> ACS: Government Solutions
>
> * Office (859) 277-8800 x 144
> * Thomas.Hehl(a)acs-inc.com
> <mailto:Thomas.Hehl@acs-inc.com>
> 1733 Harrodsburg Road
> Lexington, KY 40504-3617
>
>
>
> This e-mail message, including any attachments, is
> for the sole use of the
> intended recipient(s) and may contain confidential
> and privileged
> information. Any unauthorized review, use,
> disclosure or distribution is
> prohibited. If you are not the intended recipient,
> please contact the sender
> by reply e-mail and destroy all copies of the
> original message and notify
> sender via e-mail at Thomas.Hehl(a)acs-inc.com
> <mailto:Thomas.Hehl@acs-inc.com> or by telephone at
> 859-277-8800 ext. 144.
> Thank you.
>
>
>
> > _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 4 months
External library for function in BRMS
by psentosa
Hi,
I have the following questions:
if I'd like to define a quite complex function, which uses both: my own
classes (as parameter, and for use within the function) and some external
library, i.e. commongs-lang-2.2.jar (should also be used within the
function), should I put them all as several jars for the BRMS?
Do I somehow need to import them from my function asset? Or will it be
recognized automatically?
Is there anything else I should take care of?
thanks in advance for any response
ps
--
View this message in context: http://www.nabble.com/External-library-for-function-in-BRMS-tp18889514p18...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 4 months
RE: [rules-users] Decision table not triggering
by Hehl, Thomas
Nope. Only one of each.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Greg Barton
Sent: Thursday, August 07, 2008 4:33 PM
To: Rules Users List
Subject: Re: [rules-users] Decision table not triggering
Is there more than one PoolInfo object in working
memory? If so does any one of them match the rule?
Also, the rule conditions would create a cartesian
join because the PoolInfo and PostponementRequest are
not logically related. In other words, if you had
PoolInfo1, PoolInfo2, PostponementRequest1,
PostponementRequest2 in working memory, and all
matched the rule, you'd get the following rule
firings:
PoolInfo1, PostponementRequest1
PoolInfo1, PostponementRequest2
PoolInfo2, PostponementRequest1
PoolInfo2, PostponementRequest2
Probably not what you want.
GreG
--- "Hehl, Thomas" <Thomas.Hehl(a)acs-inc.com> wrote:
> I have a unit test that calls a decision table that
> generated the following
> rule with drools 4.0.7:
>
>
>
> #From row number: 10
>
> rule "postponePart_10"
>
>
>
> when
>
> PoolInfo(courtLocation == "101",
> daysBeforeSummons >= 7,
> daysBeforeSummons <= 999)
>
> postponementRequest:
> PostponementRequest(requestDaysAfterSummons
> >= 30, requestDaysAfterSummons <= 90,
> requestedDayOfWeek >= 2,
> requestedDayOfWeek <= 2)
>
> then
>
> postponementRequest.setAllowed(true);
>
> end
>
>
>
> This rule passes when daysBeforeSummons = 30. I
> then change the
> daysBeforeSummons to 5 and the rule still passes. I
> have debugged this and
> watched it run rule 10, so I don't know what else to
> do. Does this look like
> a bug?
>
>
>
>
>
> Thom Hehl
> Sr. eJuror Architect
> ACS: Government Solutions
>
> * Office (859) 277-8800 x 144
> * Thomas.Hehl(a)acs-inc.com
> <mailto:Thomas.Hehl@acs-inc.com>
> 1733 Harrodsburg Road
> Lexington, KY 40504-3617
>
>
>
> This e-mail message, including any attachments, is
> for the sole use of the
> intended recipient(s) and may contain confidential
> and privileged
> information. Any unauthorized review, use,
> disclosure or distribution is
> prohibited. If you are not the intended recipient,
> please contact the sender
> by reply e-mail and destroy all copies of the
> original message and notify
> sender via e-mail at Thomas.Hehl(a)acs-inc.com
> <mailto:Thomas.Hehl@acs-inc.com> or by telephone at
> 859-277-8800 ext. 144.
> Thank you.
>
>
>
> > _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 4 months
Decision table not triggering
by Hehl, Thomas
I have a unit test that calls a decision table that generated the following
rule with drools 4.0.7:
#From row number: 10
rule "postponePart_10"
when
PoolInfo(courtLocation == "101", daysBeforeSummons >= 7,
daysBeforeSummons <= 999)
postponementRequest: PostponementRequest(requestDaysAfterSummons
>= 30, requestDaysAfterSummons <= 90, requestedDayOfWeek >= 2,
requestedDayOfWeek <= 2)
then
postponementRequest.setAllowed(true);
end
This rule passes when daysBeforeSummons = 30. I then change the
daysBeforeSummons to 5 and the rule still passes. I have debugged this and
watched it run rule 10, so I don't know what else to do. Does this look like
a bug?
Thom Hehl
Sr. eJuror Architect
ACS: Government Solutions
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
1733 Harrodsburg Road
Lexington, KY 40504-3617
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message and notify
sender via e-mail at Thomas.Hehl(a)acs-inc.com
<mailto:Thomas.Hehl@acs-inc.com> or by telephone at 859-277-8800 ext. 144.
Thank you.
16 years, 4 months
Re: [rules-dev] Problem using RuleFlows .
by Mark Proctor
Harsh,
You have violated basic netiquette in so many ways. This will most
likely lead to people ignoring you. Can you please read this before
posting again:
http://www.jboss.org/drools/lists.html
In particularly:
3. Don't wait a minimum of 3 days and resend your email within minutes
of hours.
16. Email user questions to the dev mailing list.
17. Email both dev and user list in the hope of a quicker response.
Harsh Jetly wrote:
> Hi ,
> The version of Drools that I have used is 4.0.4
>
> I have used ruleflow groups to create my rule file.
> It has a split node (XOR) in which I specify a constraint on which a
> ruleflow-group is to be selected .
>
> Insert arraylists as facts in the working memory one by one.
>
> The problem I face is that when I insert these arraylists in the same
> session , it doesn't evaluate every constraint in the split node .
>
>
> The work around I am using , it that I create a new session for every
> arraylist , this works just fine . But creating a new session always is an
> overhead .
>
> Can you please assist me with this situation .
>
> Thank You
>
> Harsh Jetly
>
>
>
>
> Larsen & Toubro Infotech Ltd.
> www.Lntinfotech.com
>
> This Document is classified as:
>
> |------|
> | [X] |
> |------|L&T Infotech Proprietary |------|
> | [ ] |
> |------|L&T Infotech Confidential |------|
> | [ ] |
> |------|
> L&T Infotech Internal Use Only |------|
> | [ ] |
> |------|L&T Infotech General Business
>
> This Email may contain confidential or privileged information for the
> intended recipient (s) If you are not the intended recipient, please do not
> use or disseminate the information, notify the sender and delete it from
> your system.
>
>
> ______________________________________________________________________
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
16 years, 4 months