[rules-users] verifying 'is not null' in decision table?

Swindells, Thomas TSwindells at nds.com
Tue Dec 22 04:25:16 EST 2009


The key thing to remember with decision tables is that currently a column is only included if there is a value in the rule row and that value will always be included in the rule. The easiest way to do this is to have a condition in the form "firstName != $param" and then have null as the cell value. The other solution if you want separate rules for each field which cannot be null is to have it in the form "$param != null" and enter the field name as the cell value.

Thomas

> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org [mailto:rules-users-
> bounces at lists.jboss.org] On Behalf Of HonorGod
> Sent: 21 December 2009 15:52
> To: rules-users at lists.jboss.org
> Subject: [rules-users] verifying 'is not null' in decision table?
>
>
> How can I verify if my condition attribute is not null in decision table?
>
> I have a class -
>
> Public Class Person {
>
> String firstName = null;
> String lastName = null ;
>
> }
>
> In my decision table I have to check if firstName and lastName are not null
> and then fire actions.
>
> How I can do this? I know I can get that through drl.
>
> Thanks
>
> --
> View this message in context: http://n3.nabble.com/verifying-is-not-null-in-
> decision-table-tp96386p96386.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.

An NDS Group Limited company. www.nds.com




More information about the rules-users mailing list