Follow up on high availability -
I'm planning to use Drools for Capacity Management. In my use-case I need to
track # of hours of planned capacity that has been consumed based on hours
allocated. I'm planning on having a StatefulKnowledgeSession that will have
facts that store the # of hours of
In my use case, I have ~ 200,000 rows in a table that I need lookup in order
to price an item. Rather than load the entire table into working memory,I'm
trying load the relevant rows (based on a matching criteria) and load those
as facts and then have my rules evaluate the loaded facts. Based on
That worked. Thanks for clearing this up.
--
View this message in context:
http://drools.46999.n3.nabble.com/ConcurrentModificationException-loading-facts-from-db-Hibernate-tp4018431p4018437.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
I'm trying to use the enabled function to ensure that some rules only fire
under certain conditions.
I have the following in my DRL :
rule Load pricelist
salience 1
when
$unitPrice : Pricelist() from
PricelistUtilities.getPriceLists()
then
Hello,
In our environment we need to develop a framework wherein we would have
about a dozen rule templates whose data will be provided by users using
spreadsheets. Basically users will upload excel workbooks containing 10-12
worksheets and we'll be using ExternalSpreadsheetCompiler to generate
That worked. Thanks. Also in the course of running into this, i did manage to
find a better way to do it. I move the for loop into the LHS and that worked
too. I think I'll go with the latter - I think it's a better way anyway...
--
View this message in context:
Hi,
I have a situation where I need to iterate over an ArrayList in the RHS of a
rule. The ArrayList is created in the LHS of the rule as follows :
rule Hello World
dialect mvel
when
$cur: Message()
$others : ArrayList ( size 0 ) from
Thanks W,
It worked after I moved opening brace to the same line as the 'for'.
But 'wow - we've spent several hours trying to resolve this on our own. And
we did not want to post before we confirmed that we've taking care of all
the obvious..
But seriously - someone is advocating that MVEL
laune,
Unfortunately, the earlier test worked when I set the dialect to java. It
does not work when it's set to mvel.
When the rule is written as follows :
rule Hello World
dialect mvel
when
$cur: Message()
$others : ArrayList ( size 0 ) from
Thanks for the response Wolfgang.
I am not calling ksession.fireAllRules(1). I just have
ksession.fireAllRules();
I tried inserting 2 pairs - One product with a price set and the other left
as null. The one with the null still does not fire the 'Set Options Price'
after it's price has been set
Just ran another test, I removed the check for 'price == null' in the 'Set
Options Price' rule - so the rules now reads :
rule Set Options price
salience 50
when
$prod : Product ( )
$option : Option ( product == $prod )
then
Hello all,
For some reason I have a rule that does not fire after a Modify/Update.
I have 2 facts - Product and Option. The relationship between them is that a
'Product' can have 0 - N 'Option'(s).
Based on that, I added a 'product' field to the 'Option' object. I'm
creating and inserting my
Duh !!! Of course - I forgot the import statement. For some reason I thought
KnowledgeHelper would already be imported.
Thanks for your help once again W !
--
View this message in context:
ok ! It looks like Wolf, your idea of using 'for' in the RHS worked using
rule templates.
It's still 'java' code though. I just wish there was a cleaner way to load
facts into WM without going through java. Declaring types in rules is a very
nice feature. If there's a cleaner way to 'load' these
Hello all,
As the title states, I need to create new facts and insert them into working
memory from a function. Is it possible to do that ? I tried to create a
function with 'KnowledgeHelper' as a parameter and my rule file failed to
compile. Then I even tried to reference 'drools' instance
All,
Thanks for the quick responses.
Mantis, I did try using from [ one,two,three ] syntax, but it did not
work. It gave me a parser error.
Basically I need to create a spreadsheet reader that inserts values into WM
before reasoning over them. The spreadsheet that the users are currently
I was hoping to be able to give the Business Analysts an overall process to
use Drools by avoiding as much java code as possible. If there was some way
to do this, I could have just had them create different templates they would
need (based on the format of the spreadsheets they currently use) and
Ok - I managed to get this to work. Now the main question - I've used
ExternalSpreadsheetCompiler. This is still considered 'Experimental' per the
5.1.1 documentation ! And when I look at some history it looks like
RuleTemplates have been around since August of 2008. Is there a road map of
when
Hello all,
In my use case, I am planning on using decision tables to implement rules
that contain product information (product attributes - like product grade,
product style etc). I've managed to put together the spreadsheet and have
been successful in generating different set of rules (using
Manstis,
You are correct. There are parameters that users will provide in the
spreadsheet that I need to validate. Actually there will be one spreadsheet.
It's going to serve 2 purposes. Provide a decision table AND also be a
container of data for a few Rule Templates. The concept is that if a
Background :
I have an object model is as follows :
Units 1 --- 0..N Options
where a unit (basically an item in stock), can have 0 … N Options.
Items themselves have 2 primary fields - an item type (called group - a 3
digit number that represents the category the item
Never mind. I figured it out. I had not merged the fact cell over the 2
columns that had the unit constraint. I'm good. Thanks for looking though.
--
View this message in context:
Thanks for the pointer Wolfgang. I'll change the DRL accordingly.
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Getting-different-results-from-decision-tables-based-on-number-of-facts-all-other-fact-information-s-tp2467364p2468740.html
Sent from the Drools
Wolfgang - adding the dialect to the 'Functions' cell worked like a charm.
Edson's solution did not work without the dialect mvel. So in this case MVEL
is a must have. But then your suggestion to add the dialect next to the
cell keyed Functions worked.
Thanks again for your help.
--
View this
Edson/Wolfgang,
Thanks to your suggestions, I've got this working the way I need it using
rules defined in a .drl file. I think I have just one hurdle left before I
start working out how to get it working through decision tables - and that
is how to specific 'mvel' dialect for decision tables.
Edson,
I did manage to use the 'CollectSetAccumulateFunction' as a template for the
MatchAll and have also successfully 'called' the accumulate function from a
rule written in a .drl file. But I'm stuck at one point - how to send the
value of $param to the accumulate method ? From what I
/1/29 groovenarula [hidden email]
Edson,
I did manage to use the 'CollectSetAccumulateFunction' as a template
for the
MatchAll and have also successfully 'called' the accumulate function
from a
rule written in a .drl file. But I'm stuck at one point
Thanks for outlining the approach, Edson.
Unfortunately, I'm a newbie using drools, so I just need some clarification
on what you mean by 'matchAll is your own accumulate function with the
semantics you described.' ? Do you mean that I have to create a 'custom'
accumulate function ?
Edson, if
. Look for
a section titled Accumulate Functions.
You could also use accumulate with all the steps in inline code, which is
documented in the preceding section.
-W
On 26 January 2011 16:50, groovenarula [hidden email] wrote:
Thanks for outlining the approach, Edson
/org/drools/base/accumulators/CollectSetAccumulateFunction.java
https://github.com/droolsjbpm/droolsjbpm/blob/master/drools-core/src/main/java/org/drools/base/accumulators/CollectSetAccumulateFunction.java
  Edson
2011/1/26 groovenarula [hidden email]
Thanks Wolfgang. I found it. I
Thanks for the options, Bruno and Wolfgang.
But is there a more 'generic' way to do the matches ? The problem I have is
that the # of instances that might match could vary. And I have to provide a
means for the business users to be able to provide that 'option's code'
using a decision table.
Hello,
I have a fact called 'Option' :
public class Option {
private String code;
private Item item;
public String getCode() {
return code;
}
public void setCode(String optionCode) {
this.code = optionCode;
}
At
);
Rule Name
Number Directors
Warning
example1
Hotbuys
Hotbuys missing
Hope that helps,
Thomas
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of groovenarula
Sent: 03 December 2009 06:51
To: rules-users@lists.jboss.org
...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of groovenarula
Sent: 03 December 2009 06:51
To: rules-users@lists.jboss.org
Subject: [rules-users] Can we use 'from' CE in Decision Tables ?
Hello all, Is it possible to define the follow rule in a decision table :
rule Activate
Hello all,
Is it possible to define the follow rule in a decision table :
rule Activate Promotion
when
l : Line( )
not ( Promotion ( code == HOTBUY ) from l.promos )
then
#do some action
end
The rule above works perfectly for what I
35 matches
Mail list logo