cancel
Showing results for 
Search instead for 
Did you mean: 

Business Rule to remove a category

bellzerr
Champ in-the-making
Champ in-the-making
We use assigned categories to search for classes of documents as they are moved from one folder to the next in the workflow process. But once we "approve" a revision and move the doc back UP to another folder, we want to REMOVE a category with a business rule. We can do it manually from the details view but how can we use a business rule to remove or delete a category from a document?
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
You can write a script (JavaScript) rule that removes the category. Nodes that have a category assigned to them have the 'cm:generalclassifiable' aspect on them and the categories assigned are stored in the multi-value property called 'cm:categories'. You can manipulate (clear) that property in the javascript rule.
http://wiki.alfresco.com/wiki/JavaScript_API

Thanks,

Kevin

rochi
Champ in-the-making
Champ in-the-making
A less efficient solution that does not require coding is:
- remove Aspect Classifiable (this removes all the Categories)
- add Classifiable Aspect
- link to Categories

Obviously this approach works if you can loose all the old categories and put new ones

Regards,
-rochi