cancel
Showing results for 
Search instead for 
Did you mean: 

WebScripts and VersionHistory

zafarale
Champ in-the-making
Champ in-the-making
Hi All,
       I am working with the scenario where i cannot customize default installation, yet need to provide CRUD api for content.
<ul>
<li>One of the requirement is to show audit trail of the document even after its deleted</li>
<li>Maintain the version history, even after content will be uploaded again with the same name after deletion.
</ul>

So my upload webscript uploads version history enabled, i can show version history, but not when docemnt is deleted or reinstated/re uploaded after deletion.

Any Ideas will be appreciated.
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Alfresco has audit functionality which is the first answer.

Keeping versions after the node has been deleted is not normal behaviour.   But I,m sure something can be switched off.    However it's probably better if you never delete a node for your case.   So instead of deleting it you mark it as deleted.   How will you access the version history if you delete a node?

zafarale
Champ in-the-making
Champ in-the-making
Thats exactly i am working for, adding arbitrary property "action" and setting it to last action, but when i try to retrieve arbitrary property it returns null, even though it has set it.

   upload = targetFolder.createFile(field.filename);

   upload.properties.content.write(field.content);
   upload.properties.content.setEncoding("UTF-8");
   upload.properties.content.guessMimetype(field.filename);
   upload.properties.action="uploaded";
   //upload.properties.title = title;
   //upload.properties.description = description;
   upload.save();


and in my mind i can exclude all content mark as deleted when listing list of all contents but collate version history once a content is created again with the same name

zafarale
Champ in-the-making
Champ in-the-making
Can someone suggest the best way to mark content for business logic purposes only.

mrogers
Star Contributor
Star Contributor
Stick an aspect on it.