Querying execution during create task event

We have EventListener that listens to taskEntity.getEventName() == “create” so that we can send a signal event like:

    runtimeService.createSignalEvent(TASK_SIGNAL_NAME)
                        .executionId(taskEntity.getExecutionId())
                        .send();

However, we get incident in Cockpit saying:

org.springframework.transaction.UnexpectedRollbackException: Transaction silently rolled back because it has been marked as rollback-only

For any other event other than create, we were able to filter execution and prevent this error by:

    runtimeService.createExecutionQuery()
                    .signalEventSubscriptionName(TASK_SIGNAL_NAME)
                    .executionId(taskEntity.getExecutionId)
                    .singleResult()

But this doesn’t work during create task event, as it returns nothing.

  1. Why?
  2. Any idea how to prevent this error incident?

Thanks in advance!