For the following line of code in the LHS of a rule, is it possible to save
the matched string, and/or the starting and ending index of said match?
sd : SmartDescription(description matches "",
description : description)
___
Brian Trezise
Staff S
Ok, I see the problem. It is a bug that happens when mixing alpha and
beta constraints under ||.
I will fix it.
[]s
Edson
2008/2/8, Jai Vasanth <[EMAIL PROTECTED]>:
>
> Sorry... eval(reason == 'override') is not the right way to check for
> string equality doh. Yes yours is definit
Perhaps the comparison problem is related to the bug reported by Len. See the
thread named, "boolean == String".
http://jira.jboss.org/jira/browse/JBRULES-1451
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/list
Sorry... eval(reason == 'override') is not the right way to check for
string equality doh. Yes yours is definitely the way to go. I have had the
'==' work for many cases. In this case it seems to be not working when
there are multiple boolean disjunctions along with them.
Jai
On Feb 8, 2008 8:52
Thanks for your answer.
Yes, with eval it works. I had oversight it.
The question with the model I have aked myself. But I can't change it. There
are to much factors involved. Storable by Hibernate. Based on configuration
files with key-value, whereas the value could have various data types
(c-t
Very interesting. I tried it too , I dont think its about the '==' because
it seems to be working for eval( reason == 'override'). So it is more to do
with having the eval method call.
Nice find. Not too sure if this is a bug, or if there is a reason why drools
works this way.
Thanks
Jai
On Feb
You could use an inline eval too.
The problem possibly lies more with your model; why not have one subclass
expose the String property and another the Integer property and code the
rules using the subclasses? Much safer throughout the entire application
than having to worry whether some field is m
Hi,
Sorry, the Problem statement did not come with the attchment.
The problem is:
I am serializing working memory(WM). But after deserializing that, if I try
to modify the corresponding RuleBase that is not getting reflected.
I mean, after loading the serialized WM even I add a package to the
cor
Hi,
I have found a solution, but I don't know that it is the best:
My solution:
I have extend my Class with a method which returns the string as a integer.
And my rule is like this:
i : Integer( intValue <= 1) from $test.getValue(Test.VALUE_TYP_INTEGER);
Is that the only/best solution.
Can't
Hello again. I was out of office, sorry for not answering sooner...
I've opened a JIRA issue, #1433, with a test case and a full stack trace
desciption:
http://jira.jboss.com/jira/browse/JBRULES-1433
Best regards,
José Arrarte
On Jan 30, 2008 9:55 AM, Edson Tirelli <[EMAIL PROTECTED]> wrote:
>
Hi,
I have a class, wich contains a string value. This value is in some use
cases an integer.
For this use case I want to convert (parse) the string typ to an integer
because I want that the following rule matches:
rule
when
t : Test(value <= 1)
then
System.out.println(t)
end
cla
11 matches
Mail list logo