Cannot assign a bound variable to a method invocation that uses another bound variable as an argument in rule LHS
Issue
- Given an object that is inserted into the
Knowledge Session, when trying to access its getters that does not require any parameters and bound variables can be created by getting output from of the getter method. For instance:
...
rule "Get SENIOR Employee for Given Employee"
when
SalaryUpdate( $employees : employees )
Employee( $employeeId : id, relationship != Relationship.SENIOR ) from $employees
// this is what is expected to get, but it does not work
EmployeeIDManager( $senior : getMappedEmployee( $EmployeeId ) )
then
System.out.println( $senior );
end
...
- In above scenario, there is a method named
getMappedEmployee()within theEmployeeIDManagerobject. This simple scenario is working as expected but it will not work if the method with string parameter is called by passing bound variable.
Environment
- Red Hat JBoss BRMS 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
