use of org.drools.core.event.ProcessCompletedEventImpl in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireAfterProcessCompleted.
@Override
public void fireAfterProcessCompleted(final KogitoProcessInstance instance, KieRuntime kruntime) {
final ProcessCompletedEvent event = new ProcessCompletedEventImpl(instance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.afterProcessCompleted(e1));
}
}));
}
use of org.drools.core.event.ProcessCompletedEventImpl in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireBeforeProcessCompleted.
@Override
public void fireBeforeProcessCompleted(final KogitoProcessInstance instance, KieRuntime kruntime) {
final ProcessCompletedEvent event = new ProcessCompletedEventImpl(instance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.beforeProcessCompleted(e1));
}
}));
}
Aggregations