Does JBoss Rules engine (Drools) only support flat models as rule facts?
Issue
- Several documentations show JBoss Rules (Business Rule Engine) linking different objects by attributes instead of navigating by the object graph. Is this strategy, using flat models, a recommended way to work with BRMS?
- In
BRMS 5.xreleases the best practice was to create flat objects and link them by theiridin the rules, for example.
public class Person{
private int id;
}
public class Address{
private int id;
private int personId;
}
rule "old reccomendation rule"
when
$person: Person()
$address: Address(personId=$person.id)
then
...
end
Does this still remain the best practice in BRMS 6.1 or should users use classes like this?
public class Person{
private int id;
private addresses ArrayList<Address>()
}
Environment
- JBoss Enterprise Business Rules Management System (BRMS)
- 5.3.x
- Red Hat JBoss BRMS (BRMS)
- 6.1
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.
