Skip to: Site menu | Main content

Drools

Java Rules Engine

Spring Integration Print

The Spring POJO Semantic Module ...

Creating Rules

Rules are implemented as spring-beans (ie, POJOs) with condition and consequence methods. Since any class can be a rule, we need a way to determine the drools rule related information, such as the rule name, its salience, condition and consqence methods.

which methods are the conditions and consequences. This is the responsiblity of the rule factory-bean. A rule factory-bean uses

There are two rule factory-bean's, BasicRuleFactoryBean and BeanRuleMetadataRuleFactoryBean. BasicRule

Creating RuleSets

Spring POJO provides several BeanFactory subclasses for creating pojo-rules.

Spring BeanFactory's

  • RuleSetFactoryBean
  • BasicRuleFactoryBean
  • BeanRuleMetadataRuleFactoryBean

Metadata

Rule Metadata

Method Metadata

Argument Metdata

Metadata Source

Rule Metadata Sources

  • ClassInferedRuleMetadataSource
  • BeanRuleMetadataRuleFactoryBean

Method Metadata Sources

  • AccessAndReturnTypeMethodMetadataSource
  • NameMatchMethodMetadataSource

Parameter Metadata Sources

  • FactParameterMetadata
  • ApplicationDataParameterMetadata
  • KnowledgeHelperParameterMetadata