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

HonorGod jagadeesh.motamarri at barclayscapital.com
Tue Dec 22 06:20:37 EST 2009


Thanks Thomas. I got this part now. But I guess the real scenarios I have
been looking is - 

I have 4 different date fields and I need to check if they are not null and
set a priority using decision table.

Lets say I have Date 1 , Date 2  , Date 3 , Date 4. If Date 1 is not null
and rest of them are null then my priority is Date 1. If Date 1 and Date 2
are not null and the rest are null then my priority is Date 2 and so
no.....so we are looking at 16 different possibilites and the
priorities....how can i set the priority in this case...

Thanks

Swindells, Thomas wrote:
> 
> 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
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://n3.nabble.com/verifying-is-not-null-in-decision-table-tp96386p97139.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list