[jboss-jira] [JBoss JIRA] (DROOLS-2263) Unexpected results in GDST when using enumerations with commas
Toni Rikkola (JIRA)
issues at jboss.org
Wed Jan 31 08:25:01 EST 2018
[ https://issues.jboss.org/browse/DROOLS-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Toni Rikkola updated DROOLS-2263:
---------------------------------
Summary: Unexpected results in GDST when using enumerations with commas (was: [GSS] (6.4.z) Unexpected results in GDST when using enumerations with commas)
> 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
>
> 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" ) )
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list