use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireBeforeNodeTriggered.
@Override
public void fireBeforeNodeTriggered(final KogitoNodeInstance nodeInstance, KieRuntime kruntime) {
final ProcessNodeTriggeredEvent event = new KogitoProcessNodeTriggeredEventImpl(nodeInstance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.beforeNodeTriggered(e1));
}
}));
}
use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireBeforeSLAViolated.
@Override
public void fireBeforeSLAViolated(final KogitoProcessInstance instance, KogitoNodeInstance nodeInstance, KieRuntime kruntime) {
final SLAViolatedEvent event = new SLAViolatedEventImpl(instance, nodeInstance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.beforeSLAViolated(e1));
}
}));
}
use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireAfterVariableChanged.
@Override
public void fireAfterVariableChanged(final String name, final String id, final Object oldValue, final Object newValue, final List<String> tags, final KogitoProcessInstance processInstance, KogitoNodeInstance nodeInstance, KieRuntime kruntime) {
final ProcessVariableChangedEvent event = new KogitoProcessVariableChangedEventImpl(name, id, oldValue, newValue, tags, processInstance, nodeInstance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.afterVariableChanged(e1));
}
}));
}
use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireAfterSLAViolated.
@Override
public void fireAfterSLAViolated(final KogitoProcessInstance instance, KogitoNodeInstance nodeInstance, KieRuntime kruntime) {
final SLAViolatedEvent event = new SLAViolatedEventImpl(instance, nodeInstance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.afterSLAViolated(e1));
}
}));
}
use of org.kie.kogito.internal.process.runtime.KogitoNodeInstance in project kogito-runtimes by kiegroup.
the class KogitoProcessEventSupportImpl method fireBeforeVariableChanged.
@Override
public void fireBeforeVariableChanged(final String id, final String instanceId, final Object oldValue, final Object newValue, final List<String> tags, final KogitoProcessInstance processInstance, KogitoNodeInstance nodeInstance, KieRuntime kruntime) {
final ProcessVariableChangedEvent event = new KogitoProcessVariableChangedEventImpl(id, instanceId, oldValue, newValue, tags, processInstance, nodeInstance, kruntime);
unitOfWorkManager.currentUnitOfWork().intercept(WorkUnit.create(event, e -> {
if (hasListeners()) {
notifyAllListeners(event, (l, e1) -> l.beforeVariableChanged(e1));
}
}));
}
Aggregations