I used 'salience' key word to control the order of firing in drl file. But it
is not working properly when we use both DSL file and DRL file to execute
rules. The order of firing is in random manner in DSL file.
How to control the order of firing in dsl file?
Eg:
My requirement consists of 6
I asserted 3 object in the working memory and I iterate it to check a value
in that object for a condition in the first rule. I need to iterate all the
objects in the working memory again for another condition in the second
rule. But the objects are not iterating in the second rule.
There is
I asserted 3 class (Class1, Class2, Class3) in the working memory. I make an
reference for the class (Class1) in the first rule. Is it possible to use
the same reference in the 2nd rule?
Eg:
[when] class : Class1() eval(class.getVarName1() == {value1});
[then] .do
I asserted 3 class (Class1, Class2, Class3) in the working memory. I make an
reference for the class (Class1) in the first rule. Is it possible to use
the same reference in the 2nd rule?
Eg:
[when] class : Class1() eval(class.getVarName1() == {value1});
[then] .do
I asserted 3 object in the working memory and I iterate it to check a value
in that object for a condition in the first rule. I need to iterate all the
objects in the working memory again for another condition in the second
rule. But the objects are not iterating in the second rule.
There is
Hi,
I asserted 4 objects of a class with class name “DemoClass” in to
working memory. In rule one I am creating a reference for the DemoClass and
implementing the logic.
In rule2,… I am creating another reference of the DemoClass .so that time it
is accessing the next asserted object
Hi,
If we wrote 6 [when] [then] rules in an drl file, there is any order in
firing the rules or the rules get fired in random?
If it is fired in random, there is any method or keywords to control the
order of firing the rules?
--
View this message in context:
How to check a variable in a class contains any of the four or five value. I
tried the below codes, but it throws error.
Codes
context : Context(state == Context.START_UP) exists Classname(varName
: 1 || 2 || 3)
context : Context(state == Context.START_UP) exists
How to use if else conditions in one [when] [then] condition in drools?
Eg: if(something){ do 1}
else {do 2}
I need to use only one [when] [then] condition. The requirement is like
that.
--
View this message in context:
I got the following exception when I tried to run the drl file rule.
org.drools.rule.InvalidRulePackage: unknown:13:37 mismatched token:
[EMAIL PROTECTED],307:308='',55,13:37]; expecting type ')'
unknown:13:81 Unexpected token ')'
at org.drools.rule.Package.checkValidity(Unknown Source)
Following is the Example taken form the following URL:
http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3.0.1/html_single/index.html#d0e2144
But this rule is not working for me. If anyone know the logic behind the
rule, please explain me.
Example:
Imagine we have two
My Code has the following Hierarchy. I am facing some problem, while I try to
remove the Child level class object in .dsl file level.
Class1:
public class Class1{
private Class2 class2;
//getter setters for class2
}
Class2:
public class Class2{
Private Class3 class3;
//getter setters
I tried to extract a boolean variable from a class using context. The
following is my code in DSL file.
context : Context(state == START_UP) Classname(aliasname :
booleanVariableName)
When I tried to run this statement I got the following error message in DRL
file.
Error Message: Unable to
13 matches
Mail list logo