I am updating my current application to axon 4.6.1. I get a cyclic dependency error:
camunda-bpm-taskpool version: 3.3.2
Camunda BPM version: 7.17.
Description of your use case: (detailed description or executable reproducer, e.g. GitHub repo)
Current Behaviour
The dependencies of some of the beans in the application context form a cycle:
createTaskCommandHandler defined in URL [jar:file:/Users/jangalinski/.m2/repository/io/holunda/polyflow/polyflow-taskpool-core/3.3.2/polyflow-taskpool-core-3.3.2.jar!/io/holunda/polyflow/taskpool/core/task/CreateTaskCommandHandler.class]
↓
taskAggregateRepository defined in class path resource [io/holunda/polyflow/taskpool/core/TaskPoolCoreConfiguration.class]
┌─────┐
| eventStore defined in class path resource [org/axonframework/springboot/autoconfig/AxonServerBusAutoConfiguration.class]
↑ ↓
| springAxonConfiguration defined in class path resource [org/axonframework/springboot/autoconfig/InfraConfiguration.class]
↑ ↓
| springAxonConfigurer defined in class path resource [org/axonframework/springboot/autoconfig/InfraConfiguration.class]
↑ ↓
| processDefinitionAggregate$$Registrar
↑ ↓
| processDefinitionAggregateRepository defined in class path resource [io/holunda/polyflow/taskpool/core/TaskPoolCoreConfiguration.class]
└─────┘
Wanted Behaviour
polyflow can be used with axon 4.6.
Possible Workarounds
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
Despite circular references being allowed, the dependency cycle between beans could not be broken. Update your application to remove the dependency cycle.
Scenario
I am updating my current application to axon 4.6.1. I get a cyclic dependency error:
Current Behaviour
Wanted Behaviour
polyflow can be used with axon 4.6.
Possible Workarounds