08-20-2008 05:48 AM
fileNode.addAspect("cm:generalclassifiable");and now I'd like to add a category defined with the web client, say 'XXX'.for each (cl in classification.getAllCategoryNodes("cm:generalclassifiable")){
if(cl.name == "XXX"){
cl.createAssociation(fileNode,"cm:categories");
}
}but I get the following error:Failed to run Actions due to error: Found 2 integrity violations: The association target type is incorrect: Target Node: workspace://SpacesStore/26bff27f-6e9c-11dd-b8be-7d0580fc6f2a Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}category_root], name={http://www.alfresco.org/model/content/1.0}categories, target class={http://www.alfresco.org/model/content/1.0}category, source role=null, target role=null] Required Target Type: {http://www.alfresco.org/model/content/1.0}category Actual Target Type: {http://www.alfresco.org/model/content/1.0}content The association source type is incorrect: Source Node: workspace://SpacesStore/25f1899a-3e13-11dd-81b1-2be2a0263bea Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}category_root], name={http://www.alfresco.org/model/content/1.0}categories, target class={http://www.alfresco.org/model/content/1.0}category, source role=null, target role=null] Required Source Type: {http://www.alfresco.org/model/content/1.0}category_root Actual Source Type: {http://www.alfresco.org/model/content/1.0}category
for each (cl in classification.getAllCategoryNodes("cm:generalclassifiable")){
if(cl.name == "XXX"){
fileNode.createAssociation(cl,"cm:categories");
}
}gives me Failed to run Actions due to error: Found 1 integrity violations: The association source type is incorrect: Source Node: workspace://SpacesStore/83b0abc2-6e9c-11dd-b8be-7d0580fc6f2a Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}category_root], name={http://www.alfresco.org/model/content/1.0}categories, target class={http://www.alfresco.org/model/content/1.0}category, source role=null, target role=null] Required Source Type: {http://www.alfresco.org/model/content/1.0}category_root Actual Source Type: {http://www.alfresco.org/model/content/1.0}content
08-26-2008 01:13 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.