Decision tables working with nested objects

651 views
Skip to first unread message

Priyanka

unread,
Jun 21, 2017, 7:56:20 AM6/21/17
to Drools Usage
Hi,

I am trying to create a decision table where I want to access nested object values. While doing so I am getting exception saying "mismatched input 'customer' in rule", where customer is my nested object.

my xls looks like follows:



Please note "customer" is a object inside Transaction object. I am trying to access customer object fields like gender, marital status in my decision table.

-Priyanka
Auto Generated Inline Image 1

Michael Anstis

unread,
Jun 21, 2017, 8:16:41 AM6/21/17
to Drools Usage
I suspect the row under "CONDITION" needs to be merged to span both columns.

It is probably the "customer.custMaritalStatus" that cannot be resolved since you have not indicated a pattern to use.


-Priyanka

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/569dd084-0a6e-428f-b056-67dbd25a014b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Priyanka

unread,
Jun 21, 2017, 12:11:23 PM6/21/17
to Drools Usage
Thanks Michael, I think that was the problem.
I am hitting one more problem now. I want to set boolean value, in ACTION. I am getting exception "Predicate 'setFraud(true)' must be a Boolean expression"
This might be xls problem also (sorry about that). Not able to figure out what it is. Attaching hearwith my decision table for reference.



On Wednesday, June 21, 2017 at 5:46:41 PM UTC+5:30, Michael Anstis wrote:
I suspect the row under "CONDITION" needs to be merged to span both columns.

It is probably the "customer.custMaritalStatus" that cannot be resolved since you have not indicated a pattern to use.
On 21 June 2017 at 12:56, Priyanka <priyank...@gmail.com> wrote:
Hi,

I am trying to create a decision table where I want to access nested object values. While doing so I am getting exception saying "mismatched input 'customer' in rule", where customer is my nested object.

my xls looks like follows:



Please note "customer" is a object inside Transaction object. I am trying to access customer object fields like gender, marital status in my decision table.

-Priyanka

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
Auto Generated Inline Image 1

Michael Anstis

unread,
Jun 21, 2017, 12:40:17 PM6/21/17
to Drools Usage
You probably want the action to be t.setFraud($param)

To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Priyanka

unread,
Jun 22, 2017, 12:29:22 AM6/22/17
to Drools Usage
That doesn't help.

Priyanka

unread,
Jul 10, 2017, 6:41:48 AM7/10/17
to Drools Usage
It worked after I changed datatype of variable set in action from primitive boolean to Boolean.

-Priyanka
Reply all
Reply to author
Forward
0 new messages