Skip to end of metadata
Go to start of metadata

Spring Configuration

The spring application context config file must define the drools beans and HVAC application beans. The main class will create a spring application using this config file an start the HVAC simulation running.

The first step is to define the rule-sets for the heat-pump rules and vent rules. A rule-set bean is created with RuleSetFactoryBean. The rules are specified with the rules property.

This will result in the creation a RuleSet composed of the four heat-pump rules. We'll cover the details of rule bean shortly. For each pojo rule, RuleSetFactoryBean will build a corresponding internal drools Rule. In order to do this, we need to tell RuleSetFactoryBean how to obtain the rule metadata, of which there are three kinds. 1) Rule metadata, such as the rule name and saliance; 2) Method metadata, which indicates which methods in the rule pojo are conditions and which are consequences; 3) Argument metatada, which indicates for each condition/consequence parameter whether its a fact or application-data.

Labels: