There is only one CustomerDetail, receive Customer object in request and
CustomerDetail is response. There is only referenceId that is common in both
the objects, probably I can use that as the link between two objects.
On Wed, Nov 18, 2009 at 1:29 PM, Wolfgang Laun wrote:
> So is there only one
So is there only one CustomerDetail, or are there many? If so, how do you think
you can retrieve that data to use whatever is stored in there? This
sounds strange...
-W
2009/11/18 Lindy hagan :
> Problem is Customer & CustomerDetail are not related. Is there any work
> around? Also I looked at the
Problem is Customer & CustomerDetail are not related. Is there any work
around? Also I looked at the rete tree for matches using Jared Davis's mail
, this also results in the same identical structure as with | or in.
On Wed, Nov 18, 2009 at 11:18 AM, Wolfgang Laun wrote:
> 2009/11/18 Lindy haga
2009/11/18 Lindy hagan :
>
>
> Adding to my initial question , based on the condition satisfied how can I
> set a variable to "Y"in a different object (Other than
> customer)?customerDetail is not static.
> rule "Age Factor"
> when
> m : Customer( age matches "18,21,33,28,40,41")
>
Yes Rete Tree is identical for both the structures. Will go with one of the
scenarios given below , instead of going with Regex.
rule "Test"
when
t : Thing( foo == "BAR" || == "BAS" );
then
System.out.println( "meh" );
end
rule "Test"
when
t : Thing( foo in("BAR","BAS") );
then
System.out.println
And I don't know which is
faster. I'd guess that either is faster than regex for short lists, though.
--- On Tue, 11/17/09, Mauricio Salatino wrote:
> From: Mauricio Salatino
> Subject: Re: [rules-users] Need Syntax help for a string match
> To: "Rules Users List"
@Greg
Using "in" is better that the multiple || == "18" ?
It has some relation with indexing?
With multiple "|| == " the RETE network will generate one alpha node for
each value right?
But for "in" I don't imagine how it works, I also realize that it's not
included in the official docs.
On Tue, N
Here are two ways to write the regular expression.
m : Customer( age matches "(18|21|33|28|40|41)")
m : Customer( age matches "(18|2[18]|33|4[01])")
Did you try
m : Customer( age in ("18","21","33","28","40","41"))
I don't know which solution is faster. I think that would
be
AgeTasks();
end
--- On Tue, 11/17/09, Lindy hagan wrote:
> From: Lindy hagan
> Subject: [rules-users] Need Syntax help for a string match
> To: rules-users@lists.jboss.org
> Date: Tuesday, November 17, 2009, 2:42 PM
>
> Need to do some tasks if customers age is in
> 18,21
Thanks for the quick reply.Will look into regex.
2009/11/17 Mauricio Salatino
> Or just find how to write a regex to match all that numbers:
> Using matches and http://java.sun.com/docs/books/tutorial/essential/regex/
>
>
> On Tue, Nov 17, 2009 at 6:50 PM, Mauricio Salatino wrote:
>
>> I think t
Or just find how to write a regex to match all that numbers:
Using matches and http://java.sun.com/docs/books/tutorial/essential/regex/
On Tue, Nov 17, 2009 at 6:50 PM, Mauricio Salatino wrote:
> I think that you can do something like:
>
> m : Customer( age == "18" || =="21" || =="33" || =="28" |
I think that you can do something like:
m : Customer( age == "18" || =="21" || =="33" || =="28" || =="40" || =="41")
2009/11/17 Lindy hagan
>
> Need to do some tasks if customers age is in 18,21,33,28,40,41. Can't use
> contains as age is a string value.Could any one help me out. Below rule doe
Need to do some tasks if customers age is in 18,21,33,28,40,41. Can't use
contains as age is a string value.Could any one help me out. Below rule does
not work.
rule "Age Factor"
when
m : Customer( age matches "18,21,33,28,40,41")
then
System.out.println("Customer fal
13 matches
Mail list logo