[jboss-jira] [JBoss JIRA] (DROOLS-4903) In constraints fail to compile if negated or inside a forall pattern
Matteo Casalino (Jira)
issues at jboss.org
Tue Jan 7 02:57:13 EST 2020
[ https://issues.redhat.com/browse/DROOLS-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matteo Casalino updated DROOLS-4903:
------------------------------------
Description:
It appears that the KieBuilder fails to compile the following pattern:
{noformat}
Pojo(!(x in (1,2,3)))
{noformat}
returning the following error:
{noformat}
Error Messages:
Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
text=Unable to Analyse Expression !(x in (1,2,3)):
[Error: unexpected token: ,2]
[Near : {... !(x in (1,2,3)) ....}]
{noformat}
Furthermore, as of Drools 7.29.0.Final, the following form will also fail to compile:
{noformat}
forall(Pojo(y==42, x in (1,2,3)))
{noformat}
with the following error:
{noformat}
Error Messages:
Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
text=Unable to Analyse Expression !(y==42) || !(x in (1,2,3)):
[Error: unexpected token: ,2]
[Near : {... !(y==42) || !(x in (1,2,3)) ....}]
{noformat}
The latter is likely a consequence of the negation introduced by [DROOLS-4632], [DROOLS-4633]
was:
It appears that the KieBuilder fails to compile the following pattern:
{noformat}
Pojo(!(x in (1,2,3)))
{noformat}
returning the following error:
{noformat}
Error Messages:
Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
text=Unable to Analyse Expression !(x in (1,2,3)):
[Error: unexpected token: ,2]
[Near : {... !(x in (1,2,3)) ....}]
{noformat}
Furthermore, as of Drools 7.29.0.Final, the following form will also fail to compile:
{noformat}
forall(Pojo(y==42, x in (1,2,3)))
{noformat}
with the following error:
{noformat}
Error Messages:
Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
text=Unable to Analyse Expression !(y==42) || !(x in (1,2,3)):
[Error: unexpected token: ,2]
[Near : {... !(y==42) || !(x in (1,2,3)) ....}]
{noformat}
The latter is likely a consequence of the negation introduced by [DROOLS-4632|https://issues.redhat.com/browse/DROOLS-4632], [DROOLS-4633][https://issues.redhat.com/browse/DROOLS-4633]
> In constraints fail to compile if negated or inside a forall pattern
> --------------------------------------------------------------------
>
> Key: DROOLS-4903
> URL: https://issues.redhat.com/browse/DROOLS-4903
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.31.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: in-constraint-negation.tgz
>
>
> It appears that the KieBuilder fails to compile the following pattern:
> {noformat}
> Pojo(!(x in (1,2,3)))
> {noformat}
> returning the following error:
> {noformat}
> Error Messages:
> Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
> text=Unable to Analyse Expression !(x in (1,2,3)):
> [Error: unexpected token: ,2]
> [Near : {... !(x in (1,2,3)) ....}]
> {noformat}
> Furthermore, as of Drools 7.29.0.Final, the following form will also fail to compile:
> {noformat}
> forall(Pojo(y==42, x in (1,2,3)))
> {noformat}
> with the following error:
> {noformat}
> Error Messages:
> Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
> text=Unable to Analyse Expression !(y==42) || !(x in (1,2,3)):
> [Error: unexpected token: ,2]
> [Near : {... !(y==42) || !(x in (1,2,3)) ....}]
> {noformat}
> The latter is likely a consequence of the negation introduced by [DROOLS-4632], [DROOLS-4633]
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list