Disable the AfterCreateVersionPolicy in Java is not Working
I am facing a issue not able to disable the afterCreateVersionPolicy in my custom service is not working.
In my project we are defined the policy afterCreateVersionPolicy and doing some bussiness logic, in my custom service i need to execute that policy when node is creating version so i am disabling it through behaviour filter that is not working code as below.
behaviourFilter.disableBehaviour(nodeRef,ContentModel.ASPECT_VERSIONABLE); Map<QName, Serializable> versionProperties = new HashMap<QName, Serializable>();
Re: Disable the AfterCreateVersionPolicy in Java is not Working
With your call to disableBehaviour you are only disabling behaviours for that particular node that have been bound on the aspect cm:versionable. You are not disabling afterCreateVersion itself - you are just disabling any behaviour using that aspect during the call to policyComponent.bindClassBehaviour(). If you want to disable a very specific behaviour, you can use the JavaBehaviour object to explicitly disable/re-enable it.