Working with Accumulate

This example follows on from Drools5.6 Basic Example This is a quick example that shows a very simple use of the accumulate statement. Problem Write a rule that accumulates and stores the number of iPhone and Android devices owned by students, so that further rules can analyse and act on that information. The Code pom.xml…

Drools5.6 Basic Example

Creating the Project Open Eclipse (Kepler) New -> Maven Project Simple Project Group Id: com.skills421.examples.drools Artifact Id: Drools5.6Example Finish pom.xml Rule Runner src/main/java com.skills421.examples.drools.controller.RuleRunner Person src/main/java com.skills421.examples.drools.model.Person Main src/main/java com.skills421.examples.drools.Main Rules src/main/resources test1.drl Output