[jboss-jira] [JBoss JIRA] Created: (JBRULES-3183) Error evaluating XOR condition in ruleflow (in 5.2.0 worked in 5.0.1)
Lubos Pechac (JIRA)
jira-events at lists.jboss.org
Thu Aug 18 08:10:17 EDT 2011
Error evaluating XOR condition in ruleflow (in 5.2.0 worked in 5.0.1)
---------------------------------------------------------------------
Key: JBRULES-3183
URL: https://issues.jboss.org/browse/JBRULES-3183
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.2.0.Final
Environment: Windows XP, Java 6, Eclipse 3.7.0, Drools plugin from JBoss Tools 3.2
Reporter: Lubos Pechac
Assignee: Mark Proctor
XOR split below produces error for condition:
not GBN2GFact()
or
GBN2GFact( payComps == null || payComps.size == 0 )
payComps is declared in POJO GBN2GFact:
List<PayrollComponent> payComps = new ArrayList<PayrollComponent>();
Error is:
Description Resource Path Location Type
Unable to build expression for 'inline-eval' : [Error: incompatible types in statement: class java.lang.Integer (compared from: class piag.PayrollComponent)]
[Near : {... payComps == null || payComps.size == 0 ....}]
^
[Line: 1, Column: 21]'payComps == null || payComps.size == 0'
[Error: incompatible types in statement: class java.lang.Integer (compared from: class piag.PayrollComponent)]
[Near : {... payComps == null || payComps.size == 0 ....}]
^
[Line: 1, Column: 21] : [Rule name='RuleFlow-Split-GB_N2G-20-14-DROOLS_DEFAULT']
[Error: incompatible types in statement: class java.lang.Integer (compared from: class piag.PayrollComponent)]
[Near : {... payComps == null || payComps.size == 0 ....}]
^
[Line: 1, Column: 21] GB_N2G.rf /GB2008Rules/src/main/rules Unknown Drools Error
RuleFlow:
<?xml version="1.0" encoding="UTF-8"?>
<process xmlns="http://drools.org/drools-5.0/process"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-5.0/process drools-processes-5.0.xsd"
type="RuleFlow" name="GB_N2G" id="GB_N2G" package-name="piag" >
<header>
<imports>
<import name="piag.gb.payroll.GBN2GFact" />
<import name="java.math.BigDecimal" />
</imports>
</header>
<nodes>
<start id="1" name="Start" x="402" y="3" width="80" height="40" />
<ruleSet id="2" name="Initialization N2G" x="384" y="59" width="115" height="40" ruleFlowGroup="Initialization N2G" />
<split id="3" name="Exist PayrollComponents?" x="370" y="180" width="146" height="40" type="2" >
<constraints>
<constraint toNodeId="5" toType="DROOLS_DEFAULT" name="Yes" priority="1" type="rule" dialect="mvel" >GBN2GFact( payComps != null && payComps.size > 0 )</constraint>
<constraint toNodeId="4" toType="DROOLS_DEFAULT" name="No" priority="1" type="rule" dialect="mvel" >not GBN2GFact()
or
GBN2GFact( payComps == null || payComps.size == 0 )</constraint>
</constraints>
</split>
<end id="4" name="End" x="595" y="178" width="80" height="40" />
<subProcess id="5" name="G2N" x="402" y="241" width="80" height="40" processId="GB_G2N" >
</subProcess>
<ruleSet id="6" name="Getting N2G borders" x="376" y="298" width="130" height="40" ruleFlowGroup="Getting N2G borders" />
<join id="7" name="Loop" x="402" y="359" width="80" height="40" type="2" />
<ruleSet id="8" name="Insert PayrollComponent" x="256" y="399" width="138" height="40" ruleFlowGroup="Insert PayrollComponent" />
<join id="9" name="Loop" x="286" y="469" width="80" height="40" type="2" />
<ruleSet id="10" name="Insert border" x="208" y="515" width="80" height="40" ruleFlowGroup="Insert border" />
<subProcess id="11" name="G2N" x="207" y="574" width="80" height="40" processId="GB_G2N" >
</subProcess>
<ruleSet id="12" name="Backward NI" x="207" y="635" width="80" height="40" ruleFlowGroup="Backward NI" />
<end id="14" name="End" x="401" y="1258" width="80" height="40" />
<ruleSet id="15" name="Backward TAX" x="279" y="748" width="93" height="40" ruleFlowGroup="Backward TAX" />
<ruleSet id="17" name="Getting precision" x="173" y="1018" width="101" height="40" ruleFlowGroup="Getting precision" />
<subProcess id="16" name="G2N" x="184" y="959" width="80" height="40" processId="GB_G2N" >
</subProcess>
<ruleSet id="19" name="Create N2G PayItems" x="267" y="1133" width="117" height="40" ruleFlowGroup="Create N2G PayItems" />
<split id="18" name="Is precise?" x="287" y="1064" width="80" height="40" type="2" >
<constraints>
<constraint toNodeId="23" toType="DROOLS_DEFAULT" name="No" priority="1" type="rule" dialect="mvel" >GBN2GFact( correctnessCount <= 5 && precision == null )
or
GBN2GFact( correctnessCount <= 5 && precision != null && ( precision >= "0.01" || precision <= "-0.01" ) )</constraint>
<constraint toNodeId="19" toType="DROOLS_DEFAULT" name="Yes" priority="1" type="rule" dialect="mvel" >GBN2GFact( correctnessCount > 5 )
or
GBN2GFact( precision != null && precision < "0.01" && precision > "-0.01" )</constraint>
</constraints>
</split>
<ruleSet id="21" name="Gross calculation" x="276" y="808" width="100" height="40" ruleFlowGroup="Gross calculation" />
<split id="20" name="Some PayrollComponent?" x="364" y="1189" width="155" height="40" type="2" >
<constraints>
<constraint toNodeId="7" toType="DROOLS_DEFAULT" name="Yes" priority="1" type="rule" dialect="mvel" >GBN2GFact( payComps != null && payComps.size > 0 )</constraint>
<constraint toNodeId="14" toType="DROOLS_DEFAULT" name="No" priority="1" type="rule" dialect="mvel" >GBN2GFact( payComps == null || payComps.size == 0 )</constraint>
</constraints>
</split>
<join id="23" name="Join" x="287" y="867" width="80" height="40" type="2" />
<ruleSet id="22" name="Update gross" x="183" y="901" width="80" height="40" ruleFlowGroup="Update gross" />
<ruleSet id="25" name="Adding PayrollComponent" x="371" y="118" width="142" height="40" ruleFlowGroup="Adding PayrollComponent" />
<split id="24" name="Is calc Net higher?" x="266" y="688" width="119" height="40" type="2" >
<constraints>
<constraint toNodeId="9" toType="DROOLS_DEFAULT" name="No" priority="1" type="rule" dialect="mvel" >GBN2GFact( tempBorders != null && tempBorders.size > 0 )</constraint>
<constraint toNodeId="15" toType="DROOLS_DEFAULT" name="Yes" priority="1" type="rule" dialect="mvel" >GBN2GFact( tempBorders == null || tempBorders.size == 0 )</constraint>
</constraints>
</split>
</nodes>
<connections>
<connection from="1" to="2" />
<connection from="25" to="3" />
<connection from="3" to="4" />
<connection from="3" to="5" />
<connection from="5" to="6" />
<connection from="20" to="7" />
<connection from="6" to="7" />
<connection from="7" to="8" />
<connection from="8" to="9" />
<connection from="24" to="9" />
<connection from="9" to="10" />
<connection from="10" to="11" />
<connection from="11" to="12" />
<connection from="20" to="14" />
<connection from="24" to="15" />
<connection from="16" to="17" />
<connection from="22" to="16" />
<connection from="18" to="19" />
<connection from="17" to="18" />
<connection from="15" to="21" />
<connection from="19" to="20" />
<connection from="21" to="23" />
<connection from="18" to="23" />
<connection from="23" to="22" />
<connection from="2" to="25" />
<connection from="12" to="24" />
</connections>
</process>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list