use of org.jbpm.casemgmt.impl.wih.NotifyParentCaseEventListener in project jbpm by kiegroup.
the class CaseConfigurationDeploymentListener method onDeploy.
@Override
public void onDeploy(DeploymentEvent event) {
InternalRuntimeManager runtimeManager = (InternalRuntimeManager) event.getDeployedUnit().getRuntimeManager();
if (runtimeManager instanceof PerCaseRuntimeManager) {
List<CaseEventListener> caseEventListeners = getEventListenerFromDescriptor(runtimeManager);
logger.debug("Adding following case event listeners {} for deployment {}", caseEventListeners, event.getDeploymentId());
TransactionalCommandService commandService = transactionalCommandService;
if (commandService == null) {
commandService = new TransactionalCommandService(((SimpleRuntimeEnvironment) runtimeManager.getEnvironment()).getEmf());
}
CaseInstanceAuditEventListener auditEventListener = new CaseInstanceAuditEventListener(commandService);
caseEventListeners.add(auditEventListener);
caseEventListeners.add(new NotifyParentCaseEventListener(identityProvider));
CaseEventSupport caseEventSupport = new CaseEventSupport(identityProvider, caseEventListeners);
((PerCaseRuntimeManager) runtimeManager).setCaseEventSupport(caseEventSupport);
logger.debug("CaseEventSupport configured for deployment {}", event.getDeploymentId());
}
}
Aggregations