As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
I'd like to remove some properties or some aspects when user make upload a new version.
Hi:
Try with a content rule that executes a Javascript API script, removing the corresponding aspects and modifying properties. If the trigger for the rule ("when the document is modified") is not enough or valid for you, you will need to program a behaviour component that runs some java or javascript code for doing it.
Regards.
--C.
What event should I use for java version? onCreateVersion? beforeCreateVersion?
Both of them should be valid.
Behaviors/Policies | Alfresco Documentation
When I use this code, my aspect don't removed
public void onCreateVersion(QName qName, NodeRef nodeRef, Map<String, Serializable> map, PolicyScope policyScope) { policyScope.removeAspect(nodeRef, QName.createQName(PharmModel.NAMESPACE_PHARM_CONTENT_MODEL, PharmModel.ASPECT_SC_APPROVABLE)); }