Ternary operator in drools when part

49 views
Skip to first unread message

Anas Rahman

unread,
Nov 4, 2020, 10:59:54 AM11/4/20
to Drools Setup

Does drools support ternary operator ? How we can handle a ternary operator to bind a value to a variable in a fact field in when part ?
I need an implementation like;
Address (
   ...(conditions)...
    $var : countryCode != null ? value1 : value2,
...(conditions)...
)
I am using drools version 7. Can anybody please help me to reach a solution for this ?
Reply all
Reply to author
Forward
0 new messages