[rules-users] Data comparing in CONDITION column decision table
Wolfgang Laun
wolfgang.laun at gmail.com
Thu Mar 15 05:16:13 EDT 2012
Line breaks were lost in transit, but I think that you should remove
the quotes from
type == "$param"
if you insert an expression $a.getType().
-W
On 15/03/2012, Sumeet Karawal <sumeet.karawal at tcs.com> wrote:
>
> Hi,
>
> Can we use a data value of another object in the condition column of a
> Spreadsheet.
>
> For example: I have two data types(POJOs) one com.bank.Customer and other
> com.bank.Account
>
> in the rules I want to check whether the value entered for a particular
> field in Customer class is equal to the value entered for the corresponding
> field in the Account class. eg Customer.accType = Account.accType()
>
>
> How can we achieve this using Decision table (CONDITION Column). I have
> tried this:
>
> --------------------------------------------
> |RuleTable
> |Discount
> --------------------------------------------
> |CONDITION |CONDITION |
> ---------------+----------------------------|
> |$a : Account |$c : Customer |
> ---------------+----------------------------|
> | |type == "$param"
> ----------+---------------+----------------------------
> | Discount | Account | Type |
> | Rules | | |
> |----------+---------------+----------------------------|
> | 1 | | $a.getType() |
> |----------+---------------+----------------------------|
> | 2 | | $a.getType() |
> |----------+---------------+----------------------------|
> | 3 | | $a.getType() |
> |----------+---------------+----------------------------|
> | 4 | | $a.getType() |
> |----------+---------------+----------------------------|
> | 5 | | $a.getType() |
> |----------+---------------+----------------------------|
> | 6 | | $a.getType() |
> |----------+---------------+----------------------------|
>
>
>
>
> But it won't work. It would be great if somebody could help me on this.
>
> Thanks & Regards,
> Sumeet Karawal
> Mailto: sumeet.karawal at tcs.com
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list