Information Technology Reference
In-Depth Information
Per Process Instance Runtime Manager
The Per Process Instance Runtime Manager takes care of registering the specific KIE
session where a process was created. Each runtime engine returned from the manager will
later on use the same session that created a specific process instance, as shown in the fol-
lowing diagram:
The jBPM6 code base provides a factory method to create a Per Process Instance Runtime
Manager. A code section from the per-process-instance-runtime-manager
project for this chapter where this factory method is being used is shown here:
RuntimeManager manager = RuntimeManagerFactory.
Factory.get().
newPerProcessInstanceRuntimeManager (
runtimeEnvironment, "node-identifier");
As you can see, it receives two parameters. The second one is optional, and identifies a
runtime manager uniquely, in the same way as we explained for the Singleton Runtime
Manager.
The get factory method instantiates a PerProcessInstanceRuntimeManager ob-
ject. This object will keep a reference of which session started which process instance. If it
is a nonpersistent environment, the reference will be kept in an internal HashMap . If it is
Search WWH ::




Custom Search