public interface KieBase extends KieBaseEventManager
The KieBase is a repository of all the application's knowledge definitions. It will contain rules, processes, functions, type models. The KieBase itself does not contain runtime data, instead sessions are created from the KieBase in which data can be inserted and process instances started.
Modifier and Type | Method and Description |
---|---|
Set<String> |
getEntryPointIds()
Returns the set of the entry points declared and/or used in this kie base
|
FactType |
getFactType(String packageName,
String typeName)
Returns a reference to the
FactType identified by the given package and type names. |
KiePackage |
getKiePackage(String packageName)
Returns a reference to the
KiePackage identified by the given name. |
Collection<KiePackage> |
getKiePackages()
Returns a collection of the
KiePackage s that exist in this KieBase . |
Collection<? extends KieSession> |
getKieSessions()
Returns a collection of the
KieSession s that exist in this KieBase . |
Process |
getProcess(String processId)
Returns a reference to the
Process identified by the given processId |
Collection<Process> |
getProcesses()
|
Query |
getQuery(String packageName,
String queryName)
Returns a reference to the
Query identified by the given package and query names. |
Rule |
getRule(String packageName,
String ruleName)
Returns a reference to the
Rule identified by the given package and rule names. |
KieSession |
newKieSession()
Creates a new
KieSession using the default session configuration. |
KieSession |
newKieSession(KieSessionConfiguration conf,
Environment environment)
Creates a new
KieSession using the given session configuration and/or environment. |
StatelessKieSession |
newStatelessKieSession()
Creates a new
StatelessKieSession using the default session configuration. |
StatelessKieSession |
newStatelessKieSession(KieSessionConfiguration conf)
Creates a new
StatelessKieSession using the given session configuration. |
void |
removeFunction(String packageName,
String functionName)
Removes a function from the specified package.
|
void |
removeKiePackage(String packageName)
Removes a
KiePackage and all the definitions it contains from the KieBase |
void |
removeProcess(String processId)
Removes a process.
|
void |
removeQuery(String packageName,
String queryName)
Removes a query from the specified package.
|
void |
removeRule(String packageName,
String ruleName)
Removes a rule from the specified package.
|
addEventListener, getKieBaseEventListeners, removeEventListener
Collection<KiePackage> getKiePackages()
KiePackage
s that exist in this KieBase
.KiePackage getKiePackage(String packageName)
KiePackage
identified by the given name.packageName
- the name of the KiePackage
to returnKiePackage
identified by the the given name or null if package not found.void removeKiePackage(String packageName)
KiePackage
and all the definitions it contains from the KieBase
packageName
- the name of the KiePackage
to removeRule getRule(String packageName, String ruleName)
Rule
identified by the given package and rule names.packageName
- the package name to which the rule belongs toruleName
- the name of the ruleRule
object or null if not foundvoid removeRule(String packageName, String ruleName)
packageName
- the package name to which the rule belongs toruleName
- the name of the ruleQuery getQuery(String packageName, String queryName)
Query
identified by the given package and query names.packageName
- the package name to which the query belongs toqueryName
- the name of the queryQuery
object or null if not found.void removeQuery(String packageName, String queryName)
packageName
- the package name to which the query belongs toqueryName
- the name of the queryvoid removeFunction(String packageName, String functionName)
packageName
- the package name to which the function belongs tofunctionName
- the name of the functionFactType getFactType(String packageName, String typeName)
FactType
identified by the given package and type names.packageName
- the name of the package the fact belongs totypeName
- the name of the typeFactType
identified by the parameters or null if not found.Process getProcess(String processId)
Process
identified by the given processIdprocessId
- the id of the processProcess
identified by the given processId or null if process not found.void removeProcess(String processId)
processId
- the id of the processCollection<Process> getProcesses()
KieSession newKieSession(KieSessionConfiguration conf, Environment environment)
KieSession
using the given session configuration and/or environment.
Either one can be null and it will use a default.
Don't forget to KieSession.dispose()
session when you are done.conf
- session configurationenvironment
- environmentKieSession
KieSession newKieSession()
KieSession
using the default session configuration.
Don't forget to KieSession.dispose()
session when you are done.KieSession
Collection<? extends KieSession> getKieSessions()
KieSession
s that exist in this KieBase
.
Be careful as sessions are not thread-safe and could be in use elsewhere.KieSession
sStatelessKieSession newStatelessKieSession(KieSessionConfiguration conf)
StatelessKieSession
using the given session configuration.
You do not need to call KieSession.dispose()
on this.conf
- session configurationStatelessKieSession
StatelessKieSession newStatelessKieSession()
StatelessKieSession
using the default session configuration.
You do not need to call @{link #dispose()} on this.StatelessKieSession
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.