[jboss-jira] [JBoss JIRA] (DROOLS-2252) "Unable to expand" error with acculumate in Guided Rule Editor with DSL
Jozef Marko (JIRA)
issues at jboss.org
Fri Jan 19 03:10:00 EST 2018
[ https://issues.jboss.org/browse/DROOLS-2252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jozef Marko updated DROOLS-2252:
--------------------------------
Tester: Jozef Marko (was: Jan Hrcek)
> "Unable to expand" error with acculumate in Guided Rule Editor with DSL
> -----------------------------------------------------------------------
>
> Key: DROOLS-2252
> URL: https://issues.jboss.org/browse/DROOLS-2252
> Project: Drools
> Issue Type: Bug
> Components: Guided Rule Editor
> Affects Versions: 7.5.0.Final
> Reporter: Michael Anstis
> Assignee: Michael Anstis
> Labels: support
>
> In Guided Rule Editor with DSL option, you can add "From Accumulate" but "Function"/"Custom Code" gets an error "Unable to expand".
> Reproduce steps:
> - Unzip the attached reproducer-repo.zip
> - Clone the repo via business-central "Administration" > "Repositories" > "Clone Repository"
> - Go to Project Explorer, choose the repo, choose "project1"
> - Go to package org > kie > example > project1. You will find DataObject 'Person,' DSL, Test Scenario
> - Create a new Guided Rule. Check "Use Domain Specific Language (DSL)" option
> - Add conditions (See guidedrule01.png)
> -- DSL "There is a person whose age is 20"
> -- "From Accumulate ..."
> --- Choose "Number" for the first "click to add pattern..."
> --- Choose "Person" for the second "click to add pattern..."
> --- Configure Variable name "$p" for "All Person with"
> -- Write "count($p)" in Function
> - Save
> - Press "Validate"
> - You will get an error "Unable to expand" (See error01.png)
> This is because "count($p)" line doesn't have preceding ">".
> {noformat}
> rule "gr1"
> dialect "mvel"
> when
> There is a person whose age is 20
> >Number( ) from accumulate ( $p : Person( ),
> count($p))
> then
> end
> {noformat}
> - If you add ">" at the begging of Function (See guidedrule02.png), you don't get the error.
> - But if you close the Editor and reopen the rdslr, the condition is rendered as free form DRL (See guidedrule03.png). So it cannot be a workaround.
> - "Custom Code" has the same problem as "Function". Furthermore, "Custom Code" cannot use ">" because ">" wouldn't be placed at the beginning of the line.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list