use of org.activiti.api.runtime.event.impl.BPMNSignalReceivedEventImpl in project Activiti by Activiti.
the class ToSignalReceivedConverter method from.
@Override
public Optional<BPMNSignalReceivedEvent> from(ActivitiSignalEvent internalEvent) {
BPMNSignalReceivedEventImpl event = new BPMNSignalReceivedEventImpl(toSignalConverter.from(internalEvent));
event.setProcessInstanceId(internalEvent.getProcessInstanceId());
event.setProcessDefinitionId(internalEvent.getProcessDefinitionId());
return Optional.of(event);
}
use of org.activiti.api.runtime.event.impl.BPMNSignalReceivedEventImpl in project Activiti by Activiti.
the class SignalReceivedListenerDelegateTest method onEventShouldCallOnAvailableListenersWhenIsASignalEvent.
@Test
public void onEventShouldCallOnAvailableListenersWhenIsASignalEvent() {
// given
ActivitiSignalEventImpl internalEvent = new ActivitiSignalEventImpl(ActivitiEventType.ACTIVITY_SIGNALED);
BPMNSignalReceivedEventImpl signalReceivedEvent = new BPMNSignalReceivedEventImpl();
given(converter.from(internalEvent)).willReturn(Optional.of(signalReceivedEvent));
// when
listenerDelegate.onEvent(internalEvent);
// then
verify(firstListener).onEvent(signalReceivedEvent);
verify(secondListener).onEvent(signalReceivedEvent);
}
Aggregations