]
Mario Fusco resolved DROOLS-5607.
---------------------------------
Resolution: Done
Fixed by
DRLDumper corrupts accumulate over conjunction of patterns
----------------------------------------------------------
Key: DROOLS-5607
URL:
https://issues.redhat.com/browse/DROOLS-5607
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.42.0.Final
Reporter: Matteo Casalino
Assignee: Mario Fusco
Priority: Major
Attachments: parser-dumper-with-accumulate-on-and.zip
The following valid accumulate clause:
{noformat}
Set(size>=1) from accumulate(
$p1:Pattern1(...)
and
$p2:Pattern2(...)
, collectSet($p1)
){noformat}
is modified as follows when parsed and re-serialized with DRLParser/DRLDumper:
{noformat}
Set(size>=1) from accumulate(
($p1:Pattern1(...)
and
$p2:Pattern2(...))
, collectSet($p1)
){noformat}
The latter syntax is rejected by the Drools compiler with the following error:
{noformat}
Error Messages:
Message [id=1, kieBase=defaultKieBase, level=ERROR, path=org/example/rules.drl, line=14,
column=0
text=Invalid accumulate pattern in rule 'round trips accumulate'.]{noformat}