org.mule.module.bpm
Interface RulesEngine

All Superinterfaces:
NameableObject, NamedObject
All Known Implementing Classes:
Drools

public interface RulesEngine
extends NameableObject

A generic interface for any Rules Engine. Theoretically, any Rules Engine can be "plugged into" Mule if it implements this interface.

See Also:
MessageService

Method Summary
 Object assertEvent(Rules ruleset, Object event, String entryPoint)
          Add an event to the event stream.
 Object assertFact(Rules ruleset, Object fact)
          Assert a fact in the knowledge base.
 Object createSession(Rules ruleset)
          Create a provider-specific session for interacting with the Rules Engine.
 void disposeSession(Object session)
          Dispose of a provider-specific session if necessary.
 void retractFact(Rules ruleset, Object fact)
          Retract a fact from the knowledge base.
 void setMessageService(MessageService messageService)
          Inject a callback so that the Rules Engine may generate messages within Mule.
 
Methods inherited from interface org.mule.api.NameableObject
setName
 
Methods inherited from interface org.mule.api.NamedObject
getName
 

Method Detail

setMessageService

void setMessageService(MessageService messageService)
Inject a callback so that the Rules Engine may generate messages within Mule. This method is REQUIRED.

Parameters:
messageService - An interface within Mule which the rules may call to generate Mule messages.

createSession

Object createSession(Rules ruleset)
                     throws Exception
Create a provider-specific session for interacting with the Rules Engine. This method is REQUIRED.

Parameters:
ruleset -
Returns:
an initialized rules session
Throws:
Exception

disposeSession

void disposeSession(Object session)
                    throws Exception
Dispose of a provider-specific session if necessary. This method is OPTIONAL.

Parameters:
session - - an initialized rules session
Throws:
Exception

assertFact

Object assertFact(Rules ruleset,
                  Object fact)
                  throws Exception
Assert a fact in the knowledge base. This method is REQUIRED.

Parameters:
ruleset -
fact - to assert
Returns:
a handle to the fact for future reference
Throws:
Exception

retractFact

void retractFact(Rules ruleset,
                 Object fact)
                 throws Exception
Retract a fact from the knowledge base. This method is REQUIRED.

Parameters:
ruleset -
fact - to retract
Throws:
Exception

assertEvent

Object assertEvent(Rules ruleset,
                   Object event,
                   String entryPoint)
                   throws Exception
Add an event to the event stream. This is used for CEP. This method is OPTIONAL.

Parameters:
ruleset -
event -
entryPoint - for the event stream
Returns:
a handle to the event for future reference
Throws:
Exception


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.