Created the following web script to assign a unique identifier through aspects for each uploaded document :
docID = parseInt(space.properties["my:uniId"]);
NewDocID = docID + 1;
space.properties["my:uniId"] = NewDocID;
space.save();
document.properties["my:uniId"] = NewDocID;
document.save();
The above web script is assigned to space as a rule to apply for each upload.
Is the above web script is thread safe(If multiple users try to upload documents simultaneously using Alfresco Web Service API or through Alfresco Explorer, the above unique identifier will take care of concurrency?)