use of org.activiti.api.process.model.BPMNActivity in project Activiti by Activiti.
the class SignalThrowCatchTest method testProcessWithThrowSignal.
@Test
public void testProcessWithThrowSignal() {
securityUtil.logInAs("user1");
ProcessInstance processInstance = startThrowSignalProcess();
assertThat(RuntimeTestConfiguration.collectedEvents).extracting(RuntimeEvent::getEventType).containsExactly(ProcessRuntimeEvent.ProcessEvents.PROCESS_CREATED, ProcessRuntimeEvent.ProcessEvents.PROCESS_STARTED, BPMNActivityEvent.ActivityEvents.ACTIVITY_STARTED, BPMNActivityEvent.ActivityEvents.ACTIVITY_COMPLETED, BPMNSequenceFlowTakenEvent.SequenceFlowEvents.SEQUENCE_FLOW_TAKEN, BPMNActivityEvent.ActivityEvents.ACTIVITY_STARTED, BPMNActivityEvent.ActivityEvents.ACTIVITY_COMPLETED, BPMNSequenceFlowTakenEvent.SequenceFlowEvents.SEQUENCE_FLOW_TAKEN, BPMNActivityEvent.ActivityEvents.ACTIVITY_STARTED, BPMNActivityEvent.ActivityEvents.ACTIVITY_COMPLETED, ProcessRuntimeEvent.ProcessEvents.PROCESS_COMPLETED);
assertThat(RuntimeTestConfiguration.collectedEvents).filteredOn(event -> event.getEventType().equals(BPMNActivityEvent.ActivityEvents.ACTIVITY_STARTED)).filteredOn(event -> ((BPMNActivity) event.getEntity()).getActivityType().equals("throwEvent")).extracting(event -> ((BPMNActivity) event.getEntity()).getActivityType(), event -> ((BPMNActivity) event.getEntity()).getProcessInstanceId()).contains(tuple("throwEvent", processInstance.getId()));
}
Aggregations