kie-server Marshaller retains the old version classes so they are used on the REST call. It will result in "rule is not fired" in the below scenario:
- Create KieConatiner in kie-server with 1.0-SNAPSHOT version and enable KieScanner
- [Build&Deploy] in business-central
- Access kie-server -> works correctly
- mvn deploy via command line (e.g. mvn clean install deploy -DaltDeploymentRepository=guvnor-m2-repo::default::http://localhost:8080/business-central/maven2/)
- Access kie-server -> rule is not fired because of different versions of the same Fact class
Marshaller is disposed on KieContainerInstanceImpl.updateReleaseId() but not on KieScanner update.
Doesn't the comment in the method explain this problem?
// marshallers need to disposed in case the container was updated with different releaseId
// proper solution is to attach listener directly to the KieScanner and dispose the marshallers,
// but those listeners are not (yet) available, so this is a temporary hackish "solution"
But KieScannerEventListener is now available since RHDM 7.0 and BRMS 6.4.4.