10-09-2017 05:56 AM
I've been approaching the topic custom models lately. I've created a rudimentary custom model with the model manager from the Admin Tools. Now I wanted to start over agein and delete the first model. However, Alfresco denies deactivating or deleting any component of the model, i.e. no custom type or aspect can't be deleted. On the attempt to remove a property, it says "We couldn't update the model right now. Try sharing the following details with your IT team. Failed to validate property delete, property {modelname}aspectname is in use" - the corresponding exception in the alfresco.log says
ERROR [org.alfresco.rest.framework.webscripts.ResourceWebScriptPut] [http-nio-8080-exec-7] c3dc2fef-2934-4566-a0ae-edab78ce6369 : [org.alfresco.rest.api.impl.CustomModelsImpl.updateModel(CustomModelsImpl.java:1304), org.alfresco.rest.api.impl.CustomModelsImpl.updateTypeAspect(CustomModelsImpl.java:504), org.alfresco.rest.api.impl.CustomModelsImpl.updateCustomType(CustomModelsImpl.java:460), sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) (...)
Trying to deactivate the model results in an error "We couldn't deactivate model ' Model 'xyz' is in use and cannot be deleted or deactivated." The exception in the logfile is very similar to the one above. However, Alfresco shows no results searching for any occurrences of my model and I'm pretty sure that's correct since I applied the type of only one document to my model and deleted this document later on.
Any ideas on how to solve this would be greatly appreciated...
10-09-2017 06:24 AM
Hi,
Did you delete that document from Trashcan? If not, then try after deleting that document from Trashcan.
Thanks,
Kalpesh
10-09-2017 06:58 AM
Hi,
thanks for the answer. I followed your advice and double-checked the trashcan: as owner of the file and again as administrator. The file is gone but the error messages remain the same.
It seem like one has to wait a few seconds - now it's working: I can deactivate and delete my model. Thanks alot!!! Ticket will be market as solved.
Regards,
Christian
11-04-2020 08:50 AM
Unfortunately, I've run into the same problem again. Only this time, there are no more instances of the custom model around, not even in the trashcan. However, the error message is telling me that 'the model is in use and cannot be deleted or deactivated.'.
Is there any way to find out to which instance the above mentioned message is referring to? The correspondig exception in the alfresco.log doesn't really help...
Thanks in advance!
11-04-2020 10:08 AM
You can check that all the namespaces/types/aspects defined in your model are not in use.
Explore our Alfresco products with the links below. Use labels to filter content by product module.