RE: [rules-users] Sequence of rules in a decision table
by Hehl, Thomas
That did it! Thanks.
_____
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: Friday, October 19, 2007 9:04 PM
To: Rules Users List
Subject: Re: [rules-users] Sequence of rules in a decision table
Hehl, Thomas wrote:
I have a decision table and I'm running a series of rules. It is important
that the rules run in a specific order. How do I make my decision table
process the rules in the sequence I want, or simply from the top down?
There is an attribute called "sequential" for decision tables that when set
causes it row to have a high salience value of the previous row, this way it
executes the rules in the row order. Note this is different to the
sequential mode on stateless sessions, so don't confuse the two.
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
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 <mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
<https://lists.jboss.org/mailman/listinfo/rules-users>
17 years, 1 month
Drools 4.0.3
by prateek.katiyar@wipro.com
Hi all
I am using drools 4.0.2 and in one of my application i am facing the same memory leak problem about which we have discussed earlier.
I want to know that when are you going to release the latest version of Drools i.e. Drools 4.0.3.
It's very argent please give me the proper advice.
Thanks. Have a great day.
With Regards
Prateek
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
17 years, 1 month
Drools, RCP, and Eclipse 3.3
by J Michael Dean
I am trying to utilize Drools in an RCP, and have been getting errors
relating to not finding the jdt core. I have attempted to use the
snapshot but with no difference. So to work around this, am planning
to build my rules into a package outside my RCP, and then I won't
need the drools compiler which I assume is dependent on the jdt.
In the examples, however, I cannot find (I have looked) an example
that does not compile the drl on the fly. I can try to use BRMS
eventually, but I want an application that can check to see if it has
a connection to a BRMS repository, and if not, will revert to using a
local rules file.
I have two questions - one is whether I am on the right track, or if
I simply have to wait until Drools is fully usable with 3.3. Two is
whether someone can direct me to an example that will point the way.
Thanks in advance.
- Mike
17 years, 1 month
Sequence of rules in a decision table
by Hehl, Thomas
I have a decision table and I'm running a series of rules. It is important
that the rules run in a specific order. How do I make my decision table
process the rules in the sequence I want, or simply from the top down?
Thanks.
Thom Hehl
Sr. eJuror Architect
* Office (859) 277-8800 x 144
* Thomas.Hehl(a)acs-inc.com <mailto:Thomas.Hehl@acs-inc.com>
ACS, Inc.
Government Solutions
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.
17 years, 1 month
BRMS 4.0.2 issues
by jboss-rules.philv@xoxy.net
I'm pretty new to Drools and I think the BRMS in 4.0.2 is great. I've
encountered a few issues that I wanted to bring up. I can put some or
all of these into JIRA if that's best, but I wanted to bring them up
here first in case it's just user error on my part.
=== Issue #1 ===
For our project we want to use a DSL in the BRMS. The error messages
that are shown when you click "Validate" when editing a business rule
that uses a DSL in the BRMS are not user-friendly at all. If I make a
small typo and misspell the name of an attribute (a very likely thing
for a BRMS user to do), and click the Validate button, the error I get
back is a big stack trace starting with "java.lang.RuntimeException:
SNO: Conversion failed at
org.codehaus.janino.UnitCompiler.numericPromotion(UnitCompiler.java)
at …" Nowhere in that stack trace is anything that gives a hint that
the error is just a typo of an attribute name.
Contrast this with the rather helpful error message I get if I make
the same typo when editing a DRL rule: "Unable to create Field
Extractor for 'overtimHours'". (The error is that I misspelled
overtimeHours). Is it possible to get the same type of helpful error
messages on validation when editing a DSL rule?
Just to be clear, I'm talking about the rules that use the DSL (which
I want our business users to edit), not the DSL grammar itself (which
will be modified by developers).
=== Issue #2 ===
The BRMS doesn't allow rules to have an apostrophe character in them.
I stumbled into this one when I attempted to import a .drl file where
the first rule was named "Set employee's minimum wage". This .drl file
works fine outside the BRMS.
Here's the first few lines of the rule file:
--------------------------
package com.example
import com.example.Employee;
import function com.example.RuleHelper.logNumber;
expander Wage.dsl
rule "Set employee's minimum wage"
when
--------------------------
When I try to import it into the BRMS I got a very strange error back
(including the <pre> tags): "Unable to import into the package.
[<pre>Unable to process import: javax.jcr.RepositoryException: failed
to resolve path Set employee's minimum wage relative to
/drools:repository/drools:package_area/com.soi/assets: Invalid name:
Set employee's minimum wage: Invalid name: Set employee's minimum
wage</pre>]".
Later when I tried to manually enter the rules in that file through
the BRMS I figured out the real cause was the ' character in the rule
name. I was unable to create a rule with an apostrophe in the name.
The error stack trace says "An error occurred executing the action.
Details
com.google.gwt.user.client.rpc.SerializableException:
javax.jcr.RepositoryException: failed to resolve path Set employee's
minimum wage relative to
/drools:repository/drools:package_area/com.example/assets: Invalid
name: Set employee's minimum wage: Invalid name: Set employee's
minimum wage at
org.drools.brms.server.ServiceImplementation.createNewRule(ServiceImplementation.java:166)..."
=== Issue #3 ===
I've developed a DSL for my project, and as recommended in the
documentation (section 6.7.3) I renamed my .drl files to .dslr. When I
started to use the BRMS, I was not able to import a file with a .dslr
extension. Renaming the file to .drl worked around the problem. I
think the BRMS should allow importing of .dslr files.
=== Issue #4 ===
This one is pretty minor. When creating a new rule asset through the
BRMS using the type "Business rule using a DSL (text editor)", the
initial description you put in is ignored. You always get the
description "A dsl is a language mapping from a domain specific
language to the rule language."
As I said, I'm happy to create JIRA tickets for all of the above if
that's what you'd like. I'm pretty new to Drools, so I thought I'd
post the issues here first for feedback.
Thanks,
Phil
17 years, 1 month
re[rules-users] trieving the RHS of a rule at run-time
by Fermion
Hi!
I want to display all my current activations in a JTable object. On
selection of one of the hereby created rows (each representing an activated
rule by its name), I want to display additional info on this rule.
It is no problem to retrieve the rule from the RuleBase, as I know the
Package and Rule names. Unfortunately the toString()-output of the
associated Consequence is not really what I want.
What I really want is the RHS of the rule in analogy to the Rule.getLHS()
method. Unfortunately there is no such method for the RHS.
Is there a work-around for this? I would really like to avoid parsing the
rule file just to get the RHS of a rule.
Thanks!
--
View this message in context: http://www.nabble.com/retrieving-the-RHS-of-a-rule-at-run-time-tf4653148....
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 1 month
Working memory update problem in the LHS
by Fabrice Granzotto
I have 3 classes in my working memory:
- Item
- Container
- History
I first create an object Item i (which is in the container c):
Container c1=new Container(?c1?);
Item i=new Item(c1);
session.insert(i);
When I insert the item in the working memory a rule is fired and creates a new
History object which is directly asserted in the working memory:
History h1=new History(i);
insert(h1);
Now we have this situation: History.getItem().getContainer().getName() gives
?c1?. After that, in my application, I change the container of the Item i:
i.setContainer(new Container(?c2?));
(auto update in the working memory via a bean, it works, the debugger indicates
that the item was updated)
Now we should this situation: History.getItem().getContainer().getName() gives
?c2?. But in the LHS of the rules, this call still gives ?c1? and in a
RHS it is ok, it gives ?c1?
What am I doing wrong? Why is the History object not updated in the LHS?
Thanks for your help
Fabrice
17 years, 1 month
firing specific rule
by Manukyan, Sergey
Folks,
I have to restate the question as didn't find the answer anywhere and
have not get response to it in my previous email.
Using 4.0.2. So I have a set of rules, each with a specific
ruleflow-group defined. And I have a rule flow file defined. Altogether
everything works fine.
Now I need to fire a single specific rule from this rule set. Using the
RuleNameEqualsAgendaFilter didn't help, it didn't fire the rule...
How is it supposed to be done?
Thanks,
-Sergey
**********************
** LEGAL DISCLAIMER **
**********************
This E-mail message and any attachments may contain
legally privileged, confidential or proprietary
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are
hereby notified that any dissemination, distribution
or copying of this E-mail message is strictly
prohibited. If you have received this message in
error, please immediately notify the sender and
delete this E-mail message from your computer.
17 years, 1 month
Initialize a fact
by drools_user
Hi,
How do I initialize a global fact in the drl file? I do not want to use the
Drools API in order to better use the JSR94 API.
# global variable
global List objectList ;
# Part that does not work
objectList = new ArrayList() ;
# rule
rule "list-rule"
when
then
for(int i = 0; i< objectList.size(); i++){
#Do Something
}
end
Thanks in advance
--
View this message in context: http://www.nabble.com/Initialize-a-fact-tf4649832.html#a13284006
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 1 month