RE: Is the future avail in 4.0
by Sikkandar Nawabjan
Hi,
I have couple of questions
1) I want to validate a Object and based upon certain condition set the flag and that flag available in my working memory context so that all the rules will execute based on the value of this flag. Is there any way to set the Global variable in working memory environment and use it in predicate logic.
I beleive passing Global variable using setGLobal() is possible but we can't use it in predicate logic.
2) my second quetion is i have 2 classes say
Public class B extends Class A{
private boolean flag;
}
am validating my rule using of type B.
But i want to assert object of class A. in normal java we do downcasting B b = (B)obj;
if i don't do that will downcast will happen at the working memory side automatically??????????
Basha
17 years, 12 months
does WorkingMemory.iterator support remove()?
by Godmar Back
Does the iterator returned by WorkingMemory.iterator support remove()?
I checked the javadoc and the Drools manual, but may have missed it.
Please answer and augment documentation.
- Godmar
17 years, 12 months
RE: rules-users Digest, Vol 11, Issue 35
by prateek.katiyar@wipro.com
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, 12 months
Sequentiel Mode
by Markus Helbig
from drools documentation:
Sequential mode can only be used with a StatefulSession and is off by
default. To turn on either set the RuleBaseConfiguration.setSequentail to
true or set the rulebase.conf property drools.sequential to true.
when you use it:
*java.lang.RuntimeException*: Cannot have a stateful rule session, with
sequential configuration set to true
somebody there who can solve this mytery?
Cheers
Markus
17 years, 12 months
MVEL VariableResolverFactory problem on eclipse
by Felipe Piccolini
updated to 4.0.1 and creating a new drools project. Any .drl file
(and also rule flows) shows errors with this info on problems tab
on eclipse:
org/mvel/integration/VariableResolverFactory
no more info, actualy I can run the rules (from the Sample.drl) but
it shows the problem.
I tried changing libraries and jdt dependencies, but not succes...
what can it be?...anyone has this problem too?
Thanks.
Felipe Piccolini M.
felipe.piccolini(a)bluesoft.cl
17 years, 12 months
using from with not
by Chris West
Hello,
Does anyone know why rule "GoodBye2" below does not compile, but rule
"GoodBye1" does compile using Drools 4.0.0? The only difference is the
"not". Shouldn't this be valid?
Thanks,
-Chris
package com.sample
import com.sample.DroolsTest.Message;
import com.sample.DroolsTest.Foo;
import java.util.List;
rule "Hello World"
when
m : Message( status == Message.HELLO, message : message )
then
System.out.println( message );
m.setMessage( "Goodbye cruel world" );
m.setStatus( Message.GOODBYE );
update( m );
end
rule "GoodBye1"
no-loop true
when
m : Message( status == Message.GOODBYE, message : message, $foos:
foos )
Foo(id == 10) from $foos
then
System.out.println( message );
m.setMessage( message );
end
rule "GoodBye2"
no-loop true
when
m : Message( status == Message.GOODBYE, message : message, $foos:
foos )
not Foo(id == 10) from $foos
then
System.out.println( message );
m.setMessage( message );
end
17 years, 12 months
Fucntion call in rule
by prateek.katiyar@wipro.com
Hi
I wrote a function in my rule file "boolean test(String name)" and when i use this function in the <lhs></lhs>
part of one of my rule it's giving me the following error:
org.drools.rule.InvalidRulePackage: Rule Compilation error The method test(String) is undefined for the type Rule_validateFullName_0
at org.drools.rule.Package.checkValidity(Unknown Source)
at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
at com.wipro.loan.validation.bean.Final.readRule(Final.java:75)
at com.wipro.loan.validation.bean.Final.main(Final.java:28)
now i want to know that how can i pass the return value of a method of a bean class as a argument of "boolean test(String name)" method.
I am sending the source files in the attachment.
Please help me.
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, 12 months
Migration 3 to 4 (replace "->")
by Markus Helbig
In Drools 3 i used the following code (in a DSL file):
[when]ist BlaBlub=BlaBlub(number : id -> ( BlaClass.staticFunction(
number ))
where id can be resolved be method getId in class BlaBlub and
staticFunction ist a public static function in a helper class.
Drools 4 doesn't allow me this construct, how should this be migrated?
Any help is much appreciated
Cheers
Markus
17 years, 12 months