|
Rule Execution Server API | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
FlowTask | FlowTask defines a task embedding ruleflow control. |
FunctionTask | FunctionTask defines a Task embedding some statements
to be executed as a function. |
RuleflowEngine | RuleflowEngine represents a ruleflow engine. |
RuleflowEngineDefinition | Use an RuleflowEngineDefinition instance to create
RuleflowEngine instances and to access Task
definitions. |
RuleflowEngineInput | RuleflowEngineInput is used to parameterize ruleflow execution. |
RuleflowEngineOutput | A RuleflowEngineOutput is produced when a
RuleflowEngine is executed. |
RuleflowObserver | Use a RuleflowObserver instance to observe events specific
to a RuleflowEngine instance. |
RuleTask | RuleTask defines a task embedding a RuleEngine . |
RunningRuleflowEngine | Represents a running RuleflowEngine |
Task | Use this interface to access the description of a task in the ruleflow. |
Enum Summary | |
---|---|
TaskKind | The task kind. |
Provides the entry point for running ruleflow engine.
You can use the rulflow API to create and execute your engine.
The main steps are:
More explanations including code examples are provided in the sections below.
To load the engine
The following code shows how to do this:
EngineLoader loader = new EngineLoader(file); EngineDefinition def = loader.load();
The following code shows how to create the engine:
RuleflowEngine engine = (RuleflowEngine) def.createEngine();
You need to provide your data to the engine thanks to a RuleflowEngineInput. The following example shows how to set them:
RuleflowEngineInput ruleflowEngineInput = engine.createRuleflowEngineInput(); ruleflowEngineInput.setParameter(name, value); ruleflowEngineInput.getWorkingMemory().add(yourObject);
The following code shows how to run the engine:
RuleflowEngineOutput ruleflowEngineOutput = engine.execute(ruleflowEngineInput);
The following example shows how to retrieve the execution result
int executedRuleInstanceCount = ruleflowEngineOutput.getExecutedRuleInstanceCount(); int executedTasksCount = ruleflowEngineOutput.getExecutedTasksCount(); ruleflowEngineInput.getData().get(yourParameterName);
|
Rule Execution Server API | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |