Information Technology Reference
In-Depth Information
Understanding the role of the runtime
manager
The runtime manager's main role in an application is to provide an application-wide point
to access process runtimes (all the necessary interconnected services to execute a process
execution within a specific domain). The nature of those runtimes and how many different
runtimes can exist in a particular domain is a decision that each of the runtime manager im-
plementations available has to make. By default, a runtime will be composed of two main
components: the KIE session where the process is executed and the Human task component
where human tasks will be handled. Both are grouped and returned from the runtime man-
ager through the RuntimeEngine interface:
public interface RuntimeManager {
RuntimeEngine getRuntimeEngine(Context<?> context);
void disposeRuntimeEngine(RuntimeEngine engine);
String getIdentifier();
void close();
}
public interface RuntimeEngine {
KieSession getKieSession();
TaskService getTaskService();
}
Runtime managers will return a specific number of runtime engines, depending on their
specific nature. There is a singleton implementation that will return a single session for all
required runtimes in an application, no matter how many you ask. On the other hand, there
is a runtime manager for each process instance that will provide a separate session for each
process instance started in the runtime. The following diagram shows how the classes in-
volved in the runtime manager component interact with each other:
Search WWH ::




Custom Search