Package ch.ivyteam.ivy.rule.engine.api
Interface IRuleExecutorBuilder
public interface IRuleExecutorBuilder
Responsible for building an
IRuleExecutor
to execute rules on data objects.- Since:
- 9.2
- API:
- This is a public API.
-
Method Summary
Modifier and TypeMethodDescriptionexecutor()
Returns theIRuleExecutor
to execute rules.Add all rules from the given namespaces into the resultingRuleExecutor
.
-
Method Details
-
namespace
Add all rules from the given namespaces into the resultingRuleExecutor
. The namespace itself represent the folder hierarchy in the ivy project relative to theRules
folder. Subnamespaces will not be automatically loaded. Overriding You can override rules from a required project by providing rules with the same namespace in your project.Example:
import ch.ivyteam.ivy.rule.engine.api.IRuleExecutor; IRuleExecutor ruleExecutor = ivy.rules.create() .namespace("namespace.of.rules") .executor();
Note Supported rule resource types are decision table (*.xls) and native rule language (*.drl) from Drools.
- Parameters:
namespaces
- represent the folder hierarchy in the ivy project relative to theRules
folder. The namespace of the following drl resource[ivyProject]/Rules/namespace/of/rules/myrule.drl
isnamespace.of.rules
- Returns:
IRuleExecutorBuilder
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
executor
IRuleExecutor executor()Returns theIRuleExecutor
to execute rules.- Returns:
IRuleExecutor
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-