public class RuleEngineFactory
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
RuleEngineFactory() |
Modifier and Type | Method and Description |
---|---|
RuleEngine |
createRuleEngine(Configuration configuration)
Deprecated.
Use
createRuleEngine(IManagedComponent) instead. |
RuleEngine |
createRuleEngine(IManagedComponent parentManagedComponent)
Creates and returns a rule engine with respect to the given managed
component and its associated JMX enabled configuration.
|
RuleEngine |
createRuleEngine(RuleRepository ruleRepository)
Creates and returns a rule-engine with respect to the given rule-repository
|
RuleRepository |
createRuleRepository(Configuration configuration)
Creates and returns a rule-repository with respect to the given configuration
|
ExpressionInterpreter |
getExpressionInterpreter()
Returns an expression interpreter used by rule-engine to evaluate the expressions.
|
static RuleEngineFactory |
getInstance()
Gets the instance of rule engine factory.
|
public static RuleEngineFactory getInstance()
@Deprecated public RuleEngine createRuleEngine(Configuration configuration) throws RuleEngineInitalizationFailedException
createRuleEngine(IManagedComponent)
instead.public RuleEngine createRuleEngine(IManagedComponent parentManagedComponent) throws RuleEngineInitalizationFailedException
DISCLAIMER: By far this is the most recommended way to initialize
Rule engine. Users are encouraged to use this API compared to other
available APIs. Future BOP4 releases, might not support old deprecated
APIs to initialize RuleEngine
parentManagedComponent
- a dummy IManagedComponent
that wraps all rule engine
related managed sub components. For example, when a BPM engine
embeds rule engine, it has to provide a managed component
identified by Embedded Rule Engine (Note that
name is not fixed) as per below application connector
configruration for BPM service embedding Rule engine
...... <component name="Embedded Rule Engine"> <component name="Rule Repository ConnectionPool"> <xmlEncoding>false</xmlEncoding> <precedence></precedence> <cursorCacheSize>50</cursorCacheSize> <cursorCacheRefreshInterval>3600</cursorCacheRefreshInterval> <queryCacheSize>50</queryCacheSize> <queryCacheRefreshInterval>3600</queryCacheRefreshInterval> <maximumWriteConnections>5</maximumWriteConnections> <maximumReadConnections>5</maximumReadConnections> <minimumReadConnections>1</minimumReadConnections> <minimumWriteConnections>1</minimumWriteConnections> <connectionPoolRefreshInterval>3600</connectionPoolRefreshInterval> <multithreaded>true</multithreaded> <sharedPool>false</sharedPool> <xsiNilForNullData>false</xsiNilForNullData> <datasource> <type>Relational</type> <name>Cordys System#system</name> </datasource> <reconnectionAttempts>1</reconnectionAttempts> <requestThreshold>1000</requestThreshold> </component> <component name="Rule Engine"> <ruleAudit>false</ruleAudit> <threadPoolSize>5</threadPoolSize> <maxDispatcherQueueSize>50000</maxDispatcherQueueSize> </component> </component> ......Host framework (for example, BPM in this case) has to create a dummy managed component by some name (in above case, Embedded Rule Engine)and then pass it over to rule engine framework.
RuleEngineInitalizationFailedException
public RuleRepository createRuleRepository(Configuration configuration) throws RuleEngineInitalizationFailedException
java.lang.Exception
RuleEngineInitalizationFailedException
public RuleEngine createRuleEngine(RuleRepository ruleRepository) throws RuleEngineInitalizationFailedException
public ExpressionInterpreter getExpressionInterpreter()