cancel
Showing results for 
Search instead for 
Did you mean: 

New content not stored on the new storage drive

luyanda
Champ in-the-making
Champ in-the-making
I created enabled the content-store-selector-context.xml file in C:Alfresco/tomcat/shared/classes/alfresco/extension and added the aspect and the property name in share-config-custom.xml file in C:Alfresco/tomcat/shared/classes/alfresco/web-extension. I applied the aspect and created a rule to store new content into the new storage specified in the contentstore selector. But still i can't get it right.

Please assist me.

I'm using Alfresco Enterprise 4.1.4
10 REPLIES 10

luyanda
Champ in-the-making
Champ in-the-making
Hi Parzgnat,

Thanks for your reply.

I did follow them but the only thing now is; the content is still store on the default directory. Yet i want it to be stored to the new store.
Let me attach the files that i have configured.

Please help me if there's any configuration that i missed.

parzgnat
Star Contributor
Star Contributor
Luyanda,

I think that the issue is that you need to add the cm:storeSelector aspect to your document before you set the cm:storeName property.


var props = new Array(1);
props["cm:storeName"] = "content";
document.addAspect("cm:storeSelector", props);


I hope this helps.

luyanda
Champ in-the-making
Champ in-the-making
Parzgnat,

It fails when i apply the script to a rule by first adding the aspect to the document and then apply the script.

I've been working on this for a while now, please help me out if there are any tricks i can apply for it to work. Because now it wants me to apply it manually if i take out the script and run a rule that adds the cm:storeSelector.

Please also check the attached picture as the error i got.

luyanda
Champ in-the-making
Champ in-the-making
This is how it should work "By applying the cm:storeSelector aspect and setting its cm:storeName property to the name of a selectable store, the content will be automatically moved from its current location to the new store. The store does not, therefore, store content itself, it defines and manages those stores that are available for selection."

Hope it will help on finding a way to rectify my problem.

parzgnat
Star Contributor
Star Contributor
I'm not sure what you mean by "It fails when i apply the script to a rule by first adding the aspect to the document and then apply the script."  Can you please post the code that you're executing to add the aspect and set the content store?

luyanda
Champ in-the-making
Champ in-the-making
I do not have any code that does that.
I created a rule that applies the cm:storeSelector to the content but now i want to set the content store by default may select storeA as in content-store-selector-custom.xml file.

Any suggestion?

rfernandes
Confirmed Champ
Confirmed Champ
Hi Luyanda

If you are using Alfresco Enterprise 4.1 you are most probably a customer and so you can leverage Alfresco support directly. In any case if you in place of just adding the aspect execute a script with the content Parzgnat mentioned before you will be able to set the store property of the aspect and accomplish what you want. Remember that the default value for the store you setup on the content store selector configuration just inform Alfresco about which storage to use by default. So if you dont want to move the content to other storage you don't need to set to worry about adding the aspect or setting the property because it will use your default storage automatically.

Best
Rui Fernandes

luyanda
Champ in-the-making
Champ in-the-making
Thanks guys for your response.

Parzgnat and Rui Now it does something but what i have noticed is it it saves the content to the default and the one i have setup "storeA" based on the script that i have.

var props = new Array(1);
props["cm:storeName"] = "storeA";
document.addAspect("cm:storeSelector",props);
document.save();

How can i resolve this issue?