]
Jozef Marko updated DROOLS-2263:
--------------------------------
Fix Version/s: 6.5.0.Final
Unexpected results in GDST when using enumerations with commas
--------------------------------------------------------------
Key: DROOLS-2263
URL:
https://issues.jboss.org/browse/DROOLS-2263
Project: Drools
Issue Type: Bug
Components: Guided Decision Table Editor
Reporter: Toni Rikkola
Assignee: Toni Rikkola
Fix For: 6.5.0.Final
When using enumerations where the values itself contain a comma, the rules generated by a
GDST are unexpected, as the "contains in" operator splits those values in the
enumerations. Example enumeration:
{noformat}
fact: person
field: city
context: ['paris','london','new york,boston']
{noformat}
Note: see the 'new york, boston' sample.
The code generated will be:
{noformat}
rule "Row 1 personGDT"
dialect "mvel"
when
p : person( city in ( "new york", "boston" ) )
then
end
{noformat}
Basically "paris" and "new york,boston" will be treated by the DSL
parser as 3 strings in the DRL generation and will produce someting simiular to
p : person( city in ( "paris", "new york", "boston" ) )
But what the customer expects is the following
p : person( city in ( "paris", "new york,boston" ) )