[jboss-jira] [JBoss JIRA] (DROOLS-1789) Unexpected results in GDST when using enumerations with commas
Michael Anstis (JIRA)
issues at jboss.org
Fri Oct 27 04:35:06 EDT 2017
[ https://issues.jboss.org/browse/DROOLS-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Anstis moved GUVNOR-2894 to DROOLS-1789:
------------------------------------------------
Project: Drools (was: Guvnor)
Key: DROOLS-1789 (was: GUVNOR-2894)
Workflow: GIT Pull Request workflow (was: classic default workflow)
Component/s: Data Model Oracle
Guided Decision Table Editor
Guided Rule Editor
Guided Template Editor
(was: Data Model Oracle)
(was: Guided Decision Table)
(was: Guided Rule Editor)
(was: Guided Rule Templates)
Affects Version/s: 7.0.0.Beta6
(was: 7.0.0.Beta6)
> Unexpected results in GDST when using enumerations with commas
> --------------------------------------------------------------
>
> Key: DROOLS-1789
> URL: https://issues.jboss.org/browse/DROOLS-1789
> Project: Drools
> Issue Type: Bug
> Components: Data Model Oracle, Guided Decision Table Editor, Guided Rule Editor, Guided Template Editor
> Affects Versions: 7.0.0.Beta6
> Reporter: Michael Anstis
> Assignee: Michael Anstis
>
> 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