Hello !
I removed camunda reactor which is deprecated and archived to use the standard spring boot eventing bridge described in the documentation. Everything runs fine except the tests.
The method annotated with @EventListener is never called in my tests. I tried to call it manually but then the Context in camunda-engine is null and produces an NPE.
Here is my listener :
@Component
class WorkflowTaskListener(private val taskDefinitions: WorkflowTaskDefinitionSource) {
@EventListener(condition = "#delegateExecution.bpmnModelElementInstance.elementType.typeName==‘userTask’")
fun onTaskEvent(delegateTask: DelegateTask) {
val taskDefinition = taskDefinitions.findByName(delegateTask.taskDefinitionKey)
...
This is never called in my tests.
This is my configuration file :
internal class CamundaTestEngineConfiguration() :
StandaloneInMemProcessEngineConfiguration() {
init {
databaseSchemaUpdate = DB_SCHEMA_UPDATE_TRUE
jobExecutorActivate = false
isDbMetricsReporterActivate = false
this.historyLevel = HistoryLevel.HISTORY_LEVEL_FULL
with(processEnginePlugins) {
add(SpinProcessEnginePlugin())
}
}
}
Do I have to keep implementing TaskListener ? The notify method isn’t called either when I rename onTaskEvent
to notify
in order to override the TaskListener method