Error while using the Matrix type Decision Table
by Swaroop Oggu
Hi,
Iam trying to use the Matrix type decision table using CustomWorkbook.xls
example on Drools 5.1.0. Iam getting an error "Invalid Column header
(ACTION type),should be CONDITION or ACTION row no XX cellnum XX contain a
leading C or A identifier". The SRL is generating correctly though, Any way
to supress this error ?
Thanks
Swaroop
14 years, 3 months
drools-spring schema issues
by Stephen Masters
Hi folks,
According to the integration docs:
http://docs.jboss.org/drools/release/5.3.0.Final/droolsjbpm-integration-d...
... 3.3.1.3 shows the location of the schema to be:
http://drools.org/schema/drools-spring.xsd
Unfortunately, that seems to redirect me to the Drools home page rather than a schema.
I have previously been using:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-containe...
... but this doesn't support <drools:agendaEventListener> as a child of the <drools:ksession> element. Neither does it support <drools:eventListeners> at the level above. I was hoping to be able to make use of these, as they look as though they should help me to rid myself of some code.
I did notice that there are 1.1.0 and 1.2.0 versions of the drools-spring schema, but neither of those supports this either. I'm generally unclear as to which I should be using.
So I guess I have two questions really...
Are these valid configuration elements to use? i.e. Is the documentation out of date? Are they still beta?
Assuming that they should be available, what schema location should I be using?
Many thanks for any pointers you can provide.
Steve
14 years, 3 months
MVEL performance penalty
by Wolfgang Laun
Drools 5.3.0 FINAL.
This experiment was inspired by code posted with the insinuation that MVEL
would "optimize" condition evaluation. - Consider this rule:
rule "Term - java"
dialect "java"
when
$ea : EasyApp( Test.valueInList( $ea.getProductCode(), "CAR" )==true
&& age < 0 )
then end
You'd expect that Test.valueInList() is called once per inserted EasyApp
fact, and this can be verified easily. - Now the same rule, with MVEL's
syntactic sugar:
rule "Term - mvel"
dialect "mvel"
when
$ea : EasyApp( Test.valueInList( productCode, "CAR" )==true
&& age < 0 )
then end
*Now Test.valueInList() is called twice for each inserted fact.*
Cheers
Wolfgang
14 years, 3 months
Retriving Rule Id in Rule Template
by srinivasasanda
Hi All,
How to retrieve the cell number(rule id) when i click the load template
data.
My actual requirement is,I created a rule template where i defined some
conditions and actions.Now,when i clicked the load template data,i filled
condition columns and action columns.
I added 4 rows in template data.Now there are 4 rules available which are
postfixed with ids(cell numbers).
Now,how can i get that cellnumbers(1,2,3,4) in then part of rule condition.
Please suggest me
--
View this message in context: http://drools.46999.n3.nabble.com/Retriving-Rule-Id-in-Rule-Template-tp36...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months
Inserting rules from guvnor into database
by srinivasasanda
Hi All,
Greetings,
I would like to know how to insert the rules from guvnor into
database.Ofcourse,I retrieved the rules from guvnor through KnowledgePackage
classes and API and inserted manually through java code.
But,I should not need that.My requirement is whenever i created rule in the
guvnor and click save changes,my repository of rules must be inserted into
database(mysql or postgres).How can i achieve that.Please suggest me.How can
i achieve that.
Thanks in Advance
--
View this message in context: http://drools.46999.n3.nabble.com/Inserting-rules-from-guvnor-into-databa...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months
Uable to reolve type
by gg
This is my rules file and its throwing this error:
[ isContained : unable to resolve type while building function
]
--------------------------------------------------------------------------------
package com.sample
import com.sample.DroolsTest.Message;
import com.sample.DroolsTest.Result;
import com.sample.DroolsTest.Discount;
import java.util.Arrays;
import java.util.List;
function boolean isContained(List<String> plist, List<String> clist){
boolean found = true;
for(String s : clist){
if (!plist.contains(s)){
found = false;
}
}
return found;
}
rule "GoodBye"
when
m : Message(ls:ls, pids: productIds)
l : List() from ls
eval(isContained(pids,l))
then
System.out.println( "found" );
end
Thanks,
--GG
--
View this message in context: http://drools.46999.n3.nabble.com/Uable-to-reolve-type-tp3634048p3634048....
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months
Function Mismatch <eof>
by gg
I have written this in my rules file: But I getting this error :
[29,0]: [ERR 102] Line 29:0 mismatched input '<eof>' in function
"isContained"
[0,0]: Parser returned a null Package
-----------------------------------------------------------------------------
function boolean isContained(List<String> plist, List<String> clist){
boolean found = true;
for(String s : clist){
if (!plist.contains(s)){
found = false;
}
return found;
}
rule "GoodBye"
when
m : Message(ls:ls, pids: productIds)
l : List() from ls
eval(isContained(pids,l))
then
System.out.println( "found" );
end
--
View this message in context: http://drools.46999.n3.nabble.com/Function-Mismatch-eof-tp3634033p3634033...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months
Lists of Lists membership
by gg
I have a List of List of String : List<List<String>> and an array of
strings: String [].
I want to fire a rule each time the inside "List of String" is contained in
the array of String [].
for example
List<List<String>> :
(1,2,3)
(2,3)
(4,5,6)
and String []:
(2,3,4)
so this should fire 1 rule corresponding to (2,3) contained in (2,3,4)
Thanks,
--GG
--
View this message in context: http://drools.46999.n3.nabble.com/Lists-of-Lists-membership-tp3633943p363...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months
Removing Special Characters
by Lalitha
Hi all,
I am working on drools. I would like to remove Special characters which
are existed in the data i.e. replacing special characters with null.
Following is the code:
rule "Wild Character validation"
when
c : CustomerInfo(customerName != "");
then
int l = c.length();
int ch = 0;
int i = 0;
for (i = 0; i < l; i++) {
if (data.charAt(i) != "*"|| data.charAt(i) != "#"){
continue;
}
ch++;
data.setCharAt(i, "");
}
c.setCustomerName(data);
end
Is there any wrong in this code? If so please help me out. Waiting for your
suggestion .
Thanks and Regards,
Lalitha.
--
View this message in context: http://drools.46999.n3.nabble.com/Removing-Special-Characters-tp3628821p3...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months