Information Technology Reference
In-Depth Information
Understanding the runtime environment
Runtime managers provide you with a strategy to access different levels of isolation for
your runtime, but it depends on another component to define all the configurations that al-
low the runtime to run in a specific way. The component that allows you to define these
configurations is called the runtime environment , which is a grouping of all the different
elements required for the process runtime. In the runtime environment, you can configure
several things:
• Whether your engine will use persistence (we will see persistence configurations in
detail in Chapter 8 , Implementing Persistence and Transactions ) or if it will run in
memory only
• The knowledge definitions you will use in the runtime
• The specific user group callback object to connect the Human task component to a
user and groups data source
The following code section defines the RuntimeEnvironment interface:
public interface RuntimeEnvironment {
KieBase getKieBase();
Environment getEnvironment();
KieSessionConfiguration getConfiguration();
boolean usePersistence();
RegisterableItemsFactory getRegisterableItemsFactory();
UserGroupCallback getUserGroupCallback();
ClassLoader getClassLoader();
void close();
}
As you can see, there are methods to provide all the different components involved in
providing the necessary information to the runtime to run correctly, including the KIE ses-
sion configuration properties, class loaders, and runtime connectors, which are defined in-
side the registerable items factory . This is explained in the next section.
Registerable items factory
The runtime environment has a particular subcomponent that takes care of registering all
the different connectors to external systems. This subcomponent is called Register-
Search WWH ::




Custom Search