[SOLVED]Modifying file description/tags

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2013 04:00 AM
Hi,
I'm new to Alfresco, and trying to implement an Advanced Workflowfor for past month. Currently I'm struggling to find a way to update the description and tags of a file by executing a script inside a process definition. Is there a way to this through:
i can add aspects and modify them, but can't find something to update the decription or a tag.
Thanks in advance.
I'm new to Alfresco, and trying to implement an Advanced Workflowfor for past month. Currently I'm struggling to find a way to update the description and tags of a file by executing a script inside a process definition. Is there a way to this through:
bpm_package.children[0]
i can add aspects and modify them, but can't find something to update the decription or a tag.
Thanks in advance.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2013 10:34 AM
Hello,
if you can update and add aspects I don't understand why you can't find something to update the description or tag. Any child of the bpm_package is a script node and has the API documented in the <a href="https://wiki.alfresco.com/wiki/4.0_JavaScript_API#ScriptNode_API">wiki</a>. So to update a description you would use
and for updateing tags
Regards
Axel
if you can update and add aspects I don't understand why you can't find something to update the description or tag. Any child of the bpm_package is a script node and has the API documented in the <a href="https://wiki.alfresco.com/wiki/4.0_JavaScript_API#ScriptNode_API">wiki</a>. So to update a description you would use
var child = bpm_package.children[0];child.properties["cm:description"] = "New Description";child.save();
and for updateing tags
var child = bpm_package.childre[0];child.setTags(["Tag 1", "Tag 2"]);
Regards
Axel

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2013 10:59 AM
Hi,
Guess i wasn't looking in the right place. Thanks for clearing this out, works just fine !
cheers
Leszek
Guess i wasn't looking in the right place. Thanks for clearing this out, works just fine !
cheers
Leszek
