use of org.activiti.cloud.api.process.model.impl.events.CloudBPMNTimerScheduledEventImpl in project activiti-cloud by Activiti.
the class CloudRuntimeEventRegistry method buildRegistry.
public Map<String, Class<?>> buildRegistry() {
List<RuntimeEvent<?, ?>> eventImplementations = new ArrayList<>();
eventImplementations.add(new CloudBPMNActivityStartedEventImpl());
eventImplementations.add(new CloudBPMNActivityCancelledEventImpl());
eventImplementations.add(new CloudBPMNActivityCompletedEventImpl());
eventImplementations.add(new CloudBPMNErrorReceivedEventImpl());
eventImplementations.add(new CloudBPMNSignalReceivedEventImpl());
eventImplementations.add(new CloudBPMNTimerFiredEventImpl());
eventImplementations.add(new CloudBPMNTimerCancelledEventImpl());
eventImplementations.add(new CloudBPMNTimerScheduledEventImpl());
eventImplementations.add(new CloudBPMNTimerExecutedEventImpl());
eventImplementations.add(new CloudBPMNTimerFailedEventImpl());
eventImplementations.add(new CloudBPMNTimerRetriesDecrementedEventImpl());
eventImplementations.add(new CloudBPMNMessageWaitingEventImpl());
eventImplementations.add(new CloudBPMNMessageReceivedEventImpl());
eventImplementations.add(new CloudBPMNMessageSentEventImpl());
eventImplementations.add(new CloudIntegrationRequestedEventImpl());
eventImplementations.add(new CloudIntegrationResultReceivedEventImpl());
eventImplementations.add(new CloudIntegrationErrorReceivedEventImpl());
eventImplementations.add(new CloudProcessDeployedEventImpl());
eventImplementations.add(new CloudProcessCreatedEventImpl());
eventImplementations.add(new CloudProcessStartedEventImpl());
eventImplementations.add(new CloudProcessCompletedEventImpl());
eventImplementations.add(new CloudProcessCancelledEventImpl());
eventImplementations.add(new CloudProcessSuspendedEventImpl());
eventImplementations.add(new CloudProcessResumedEventImpl());
eventImplementations.add(new CloudProcessUpdatedEventImpl());
eventImplementations.add(new CloudSequenceFlowTakenEventImpl());
eventImplementations.add(new CloudStartMessageDeployedEventImpl());
eventImplementations.add(new CloudMessageSubscriptionCancelledEventImpl());
eventImplementations.add(new CloudTaskCreatedEventImpl());
eventImplementations.add(new CloudTaskUpdatedEventImpl());
eventImplementations.add(new CloudTaskAssignedEventImpl());
eventImplementations.add(new CloudTaskCompletedEventImpl());
eventImplementations.add(new CloudTaskSuspendedEventImpl());
eventImplementations.add(new CloudTaskActivatedEventImpl());
eventImplementations.add(new CloudTaskCancelledEventImpl());
eventImplementations.add(new CloudTaskCandidateUserAddedEventImpl());
eventImplementations.add(new CloudTaskCandidateUserRemovedEventImpl());
eventImplementations.add(new CloudTaskCandidateGroupAddedEventImpl());
eventImplementations.add(new CloudTaskCandidateGroupRemovedEventImpl());
eventImplementations.add(new CloudVariableCreatedEventImpl());
eventImplementations.add(new CloudVariableUpdatedEventImpl());
eventImplementations.add(new CloudVariableDeletedEventImpl());
return eventImplementations.stream().collect(Collectors.toMap(event -> event.getEventType().name(), this::findInterface));
}
use of org.activiti.cloud.api.process.model.impl.events.CloudBPMNTimerScheduledEventImpl in project activiti-cloud by Activiti.
the class TimerEventConverterTest method createTimerScheduledEvent.
private CloudBPMNTimerScheduledEventImpl createTimerScheduledEvent() {
// given
ProcessInstanceImpl processInstance = createProcess();
BPMNTimerImpl timer = createBPMNTimer(processInstance);
CloudBPMNTimerScheduledEventImpl event = new CloudBPMNTimerScheduledEventImpl("eventId", System.currentTimeMillis(), timer, timer.getProcessDefinitionId(), timer.getProcessInstanceId());
appendEventInfo(event, processInstance);
return event;
}
use of org.activiti.cloud.api.process.model.impl.events.CloudBPMNTimerScheduledEventImpl in project activiti-cloud by Activiti.
the class CloudTimerProducerTest method onEventShouldConvertEventToCloudEventAndAddToAggregator.
@Test
public void onEventShouldConvertEventToCloudEventAndAddToAggregator() {
// given
BPMNTimerFiredEventImpl eventFired = new BPMNTimerFiredEventImpl(new BPMNTimerImpl());
CloudBPMNTimerFiredEventImpl cloudEventFired = new CloudBPMNTimerFiredEventImpl();
given(eventConverter.from(eventFired)).willReturn(cloudEventFired);
// when
cloudTimerFiredProducer.onEvent(eventFired);
// then
verify(eventsAggregator).add(cloudEventFired);
BPMNTimerScheduledEventImpl eventScheduled = new BPMNTimerScheduledEventImpl(new BPMNTimerImpl());
CloudBPMNTimerScheduledEventImpl cloudEventScheduled = new CloudBPMNTimerScheduledEventImpl();
given(eventConverter.from(eventScheduled)).willReturn(cloudEventScheduled);
// when
cloudTimerScheduledProducer.onEvent(eventScheduled);
// then
verify(eventsAggregator).add(cloudEventScheduled);
}
Aggregations