Rule Execution Server API

com.ibm.rules.engine.runtime
Interface Engine

All Superinterfaces:
EngineServices, Observable
All Known Subinterfaces:
EngineWithWorkingMemory, FastpathEngine, RuleEngine, RuleflowEngine, RunningRuleflowEngine, SteppingRuleEngine

public interface Engine
extends Observable, EngineServices

Use this Engine interface to parametrize and run an Engine instance. You create an Engine using an EngineDefinition object.

See Also:
EngineDefinition

Method Summary
 EngineInput createInput()
          Creates an EngineInput object for this Engine.
 EngineInput createInput(EngineData data)
          Creates an EngineInput object for this Engine.
 EngineOutput execute(EngineInput input)
          Executes this Engine using the input then returns the output.
 EngineOutput execute(Map<String,Object> input)
          Executes this Engine using a Map of associated strings and objects, then returns the output.
 EngineDefinition getDefinition()
          Returns the EngineDefinition.
 EngineState getState()
          Return the current state of this Engine instance.
 void note(String note)
          Adds a note to this Engine.
 void reset()
          Clears the content of the working memory for this Engine.
 
Methods inherited from interface com.ibm.rules.engine.observer.Observable
addObserver, addObserver, getSupportedObserverClasses, removeAllObservers, removeObserver, removeObserver
 
Methods inherited from interface com.ibm.rules.engine.service.EngineServices
getNumberOfServices, getService, getServiceByName, getServiceClasses
 

Method Detail

execute

EngineOutput execute(Map<String,Object> input)
                     throws EngineExecutionException,
                            EngineInvalidStateException,
                            IllegalArgumentException
Executes this Engine using a Map of associated strings and objects, then returns the output.

Throws:
EngineExecutionException - if there is a problem running this engine.
EngineInvalidStateException - if this engine is not in the correct state.
IllegalArgumentException - if input cannot be used by this engine.
Parameters:
input - The input.
Returns:
The output.

execute

EngineOutput execute(EngineInput input)
                     throws EngineExecutionException,
                            EngineInvalidStateException,
                            IllegalArgumentException
Executes this Engine using the input then returns the output.

Throws:
EngineExecutionException - if there is a problem running this engine.
EngineInvalidStateException - if this engine is not in the correct state.
IllegalArgumentException - if input cannot be used by this engine.
Parameters:
input - The input.
Returns:
The output.

getDefinition

EngineDefinition getDefinition()
Returns the EngineDefinition.

Returns:
The EngineDefinition.

reset

void reset()
Clears the content of the working memory for this Engine.


createInput

EngineInput createInput()
Creates an EngineInput object for this Engine. Use the object returned to parametrize Engine execution.

Returns:
A new engine input instance.

createInput

EngineInput createInput(EngineData data)
Creates an EngineInput object for this Engine. Use the object returned to parametrize Engine execution.

Parameters:
data - The EngineData that will be accessible using the input returned.
Returns:
A new engine input instance.
See Also:
EngineInput.getData()

note

void note(String note)
Adds a note to this Engine. This note is sent to the NoteObserver objects.

Parameters:
note - The note to add.
See Also:
NoteObserver

getState

EngineState getState()
Return the current state of this Engine instance.

Returns:
The state of this Engine.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013