[rules-users] negation for matches

2007-07-13 Thread Manukyan, Sergey

Folks,

 

How can I negate the matches?, like for those that don't match certain
criteria do that

 

I tried something like this but it doesn't work:

 

 

rule SupplierView: Supplier code's first two characters should be
numeric.

  when

$s : SupplierView(!(suppCode matches \\d\\d.*))

  then

ValidationErrorFacade.getInstance().registerError($s, new
ValidationError(Supplier code's first two characters should be
numeric.));

end



 

Thanks,

 

-Sergey

 



**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] negation for matches

2007-07-13 Thread Sarika Khamitkar
You can try:

$s : SupplierView(suppCode not matches \\d\\d.*)

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manukyan,
Sergey
Sent: Friday, July 13, 2007 4:49 PM
To: Rules Users List
Subject: [rules-users] negation for matches

 

Folks,

 

How can I negate the matches?, like for those that don't match certain
criteria do that

 

I tried something like this but it doesn't work:

 

 

rule SupplierView: Supplier code's first two characters should be
numeric.

  when

$s : SupplierView(!(suppCode matches \\d\\d.*))

  then

ValidationErrorFacade.getInstance().registerError($s, new
ValidationError(Supplier code's first two characters should be
numeric.));

end



 

Thanks,

 

-Sergey

 

**
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] negation for matches

2007-07-13 Thread Edson Tirelli

  If you are using MR3 or later, the correct syntax is not matches.
Before this version, you must use a predicate.

 []s
 Edson


2007/7/13, Manukyan, Sergey [EMAIL PROTECTED]:


 Nope .. it doesn't work either….


 --

*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Sarika Khamitkar
*Sent:* Friday, July 13, 2007 5:06 PM
*To:* Rules Users List
*Subject:* RE: [rules-users] negation for matches



You can try:

$s : SupplierView(suppCode not *matches* \\d\\d.*)




 --

*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Manukyan, Sergey
*Sent:* Friday, July 13, 2007 4:49 PM
*To:* Rules Users List
*Subject:* [rules-users] negation for matches



Folks,



How can I negate the matches?, like for those that don't match certain
criteria do that



I tried something like this but it doesn't work:





*rule* SupplierView: Supplier code's first two characters should be
numeric.

  *when*

$s : SupplierView(!(suppCode *matches* \\d\\d.*))

  *then*

ValidationErrorFacade.getInstance().registerError($s, 
*new*ValidationError(Supplier
code's first two characters should be numeric.));

*end*





Thanks,



-Sergey


  **
** LEGAL DISCLAIMER **
**

This E-mail message and any attachments may contain
legally privileged, confidential or proprietary
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are
hereby notified that any dissemination, distribution
or copying of this E-mail message is strictly
prohibited. If you have received this message in
error, please immediately notify the sender and
delete this E-mail message from your computer.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users





--
 Edson Tirelli
 Software Engineer - JBoss Rules Core Developer
 Office: +55 11 3529-6000
 Mobile: +55 11 9287-5646
 JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users