@Test void testEntityCreatedWithWrongEntityClass() { FlowableEngineEntityEvent engineEntityEvent = Mockito.mock(FlowableEngineEntityEvent.class); JobEntity job = Mockito.mock(JobEntity.class); Mockito.when(engineEntityEvent.getEntity()) .thenReturn(job); errorProcessListener.entityCreated(engineEntityEvent); Mockito.verifyNoInteractions(eventHandler); }
@Override protected void entityCreated(FlowableEngineEntityEvent event) { Object entity = event.getEntity(); if (entity instanceof DeadLetterJobEntity) { handleWithCorrelationId(event, () -> handle(event, (DeadLetterJobEntity) entity)); } }
ErrorProcessListener extends AbstractFlowableEngineEventListener { @Override protected void entityCreated(FlowableEngineEntityEvent event) { Object entity = event.getEntity(); if (entity instanceof DeadLetterJobEntity) { handleWithCorrelationId(event, () -> handle(event, (DeadLetterJobEntity) entity)); } } }
ErrorProcessListener extends AbstractFlowableEngineEventListener { @Override protected void entityCreated(FlowableEngineEntityEvent event) { Object entity = event.getEntity(); if (entity instanceof DeadLetterJobEntity) { handleWithCorrelationId(event, () -> handle(event, (DeadLetterJobEntity) entity)); } } @Inject  ErrorProcessListener(OperationInErrorStateHandler eventHandler); }
ErrorProcessListener extends AbstractFlowableEngineEventListener { @Override protected void entityCreated(FlowableEngineEntityEvent event) { Object entity = event.getEntity(); if (entity instanceof DeadLetterJobEntity) { handleWithCorrelationId(event, () -> handle(event, (DeadLetterJobEntity) entity)); } } @Inject  ErrorProcessListener(OperationInErrorStateHandler eventHandler); @Override boolean isFailOnException(); }
ErrorProcessListener extends AbstractFlowableEngineEventListener { @Override protected void entityCreated(FlowableEngineEntityEvent event) { Object entity = event.getEntity(); if (entity instanceof DeadLetterJobEntity) { handleWithCorrelationId(event, () -> handle(event, (DeadLetterJobEntity) entity)); } } @Inject  ErrorProcessListener(OperationInErrorStateHandler eventHandler); @Override boolean isFailOnException();  }