Information Technology Reference
In-Depth Information
The Mapper interface, as you can see, has two different implementations depending on
whether you use database persistence or not. The MaintainMappingListener im-
plementation will use the reference to said Mapper object to store the reference:
public void beforeProcessStarted(ProcessStartedEvent event)
{
String processId =
event.getProcessInstance().getProcessId();
if (mapper.findContextId(ksessionId) == null) {
mapper.saveMapping(
ProcessDefContext.get(processId),
ksessionId);
}
}
After the KIE session, the getRuntimeEngine method in the RuntimeManager in-
terface, which is either created or loaded, creates a new TaskService instance using
the same methods we saw in Chapter 6 , Human Interactions . The context domain (a pro-
cess definition ID) has no relevance for the Human task component, so no special treat-
ment is done to keep different instances for each task service. However, this could be eas-
ily done and kept under a mapping as well through a custom mechanism to have a full
separation of runtime functionality.
Search WWH ::




Custom Search