cancel
Showing results for 
Search instead for 
Did you mean: 

get a document from Alfresco

luisg
Champ in-the-making
Champ in-the-making
Hi all.

I developed a web service with 4 transactions:
1 - create space in Alfresco;
2 - upload document to alfresco;
3 - get document properties and content;
4 - erase a document.

All the transactions work well. But I noticed a odd behavior. If I upload a document to Alfresco (with transaction 2) and, after that I try to get the document properties and content (transaction 3) or erase the document (transaction 4) it will not work! But if I wait almost a minute and try again, works fine.
Is this a normal behavior? Seems to me that I need to do an update to alfresco repository.
Any of you have / had the same problem) how can I solve this?

someone can help me? Smiley Indifferent

Thanks

Luis
4 REPLIES 4

norgan
Champ in-the-making
Champ in-the-making
Maybe this has to do with the need to index the newly uploaded files first in lucene

luisg
Champ in-the-making
Champ in-the-making
Hi, and thanks for your reply.

Are you telling me that this is a normal behavior? That any way I can solve this?
I use the code given in alfresco wiki to create and upload a document (http://wiki.alfresco.com/wiki/IngresTutorial_Alfresco_Web_Service_API_for_Java#Create_and_upload_a_d...).
Any of you have the same problem?

Thanks

Luis

tara_b
Champ in-the-making
Champ in-the-making
I know that if I change one of the properties of a document in the web console - say, author - i have to wait around 30 seconds for it to be included in any searches.  It seems that Alfresco takes a while to re-index after a change, so I would assume you'd have the same issue with adding a new document.

luisg
Champ in-the-making
Champ in-the-making
H Tara_B, and thanks for your rely.
Yes, that exactly the problem I have. When I add a document he only become available after around 30 seconds. That was freaking me out, but now I can see that this is not something I'm doing wrong.
If someone know if there is a way to solve this, please let me know.

Thanks

Luis