[
https://issues.jboss.org/browse/JBRULES-3279?page=com.atlassian.jira.plug...
]
Ansgar Konermann commented on JBRULES-3279:
-------------------------------------------
We encountered the same "BUG: Can't build a rete network with an inner OR group
element". Code looks similar:
{code}
rule "most_recent_commission_income"
when
$borrower : FBorrower()
$totalAmount: FMoney() from accumulate (
(and
$employmentIncome : FEmploymentIncome(earnedBy == $borrower )
FYearlyIncome($ownedBy: ownedBy == $employmentIncome,
$type: type == FYearlyIncomeType.COMMISSION,
$sustainable: sustainable == true,
$year: year, $amount: amount
)
not (exists (FYearlyIncome(ownedBy == $ownedBy, type == $type , year.index <
$year.index, sustainable == $sustainable)))
),
sumMoney($amount)
)
then
// ...
end
{code}
Any first insights what might cause this and how to work around it?
We'd really love to upgrade from Drools 5.1.1 to 5.4.0.Final, but this bug is
preventing us from dropping the old version. The bug does not occurr when using Drools
5.1.1.
Error message when using 2 patterns inside a single accumulate is not
clear: Parser returned a null Package
-----------------------------------------------------------------------------------------------------------
Key: JBRULES-3279
URL:
https://issues.jboss.org/browse/JBRULES-3279
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 5.3.0.Final
Reporter: Geoffrey De Smet
Assignee: Edson Tirelli
I am trying to parse this rule:
{code}
rule "machineUsage"
when
$machineCapacity : MrMachineCapacity($machine : machine, $resource : resource)
$usageTotal : Number() from accumulate(
MrProcessRequirement(resource == $resource, $process : process, $usage :
usage)
MrProcessAssignment(machine == $machine, process == $process),
sum($usage)
)
then
...
end
{code}
And I get this error message:
{code}
Exception in thread "main" java.lang.IllegalStateException: There are errors
in the scoreDrl's:[47,77]: [ERR 102] Line 47:77 mismatched input ',' in rule
"machineUsage"
[0,0]: Parser returned a null Package
{code}
For this line:
{code}
MrProcessAssignment(machine == $machine, process == $process),
{code}
It clear that it's because I can't use 2 patterns inside a single accumulate, but
the error message seems wrong?
When I try this instead:
{code}
rule "machineUsage"
when
$machineCapacity : MrMachineCapacity($machine : machine, $resource : resource)
$usageTotal : Number() from accumulate(
(MrProcessRequirement(resource == $resource, $process : process, $usage :
usage)
and MrProcessAssignment(machine == $machine, process == $process)),
sum($usage)
)
then
...
end
{code}
I get:
{code}
Exception in thread "main" org.drools.RuntimeDroolsException: BUG: Can't
build a rete network with an inner OR group element
{code}
Don't really see the OR in there.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira