cancel
Showing results for 
Search instead for 
Did you mean: 

Add task names to document metadata

sihnu
Champ in-the-making
Champ in-the-making
Hello,

I would like to add a script to my processdefinition task that will write a task name to a metadata field of an applied document when the task gets completed. I found out that you could use this: taskInstance.id to refer to task name. Anyway if I try this I get error it being null. This is my script:

<script>              
   bpm_package.children[0].properties[te:taskName]=taskinstance.id
   bpm_package.children[0].save();        
</script>

Any help would be appreciated.
2 REPLIES 2

sihnu
Champ in-the-making
Champ in-the-making
Please, could anyone help me with this? I'm stuck… I recently got sending email from workflow working and now I would like to add the task comment to the email where the user could write some information about the task. Please this is the final part I would like to add to my custom workflow.

Help would really be appreciated.

granddams
Champ in-the-making
Champ in-the-making
Hy,

I've a similar problem, how update metadata with script in the processdefinition?
I'd like to modify metadata fields with textareas of the workflow wizard, is it possible?
A method setProperty on a node doesn't yet exist, is there others tracks?

Thanks


EDIT : pb solved! I just missed two brackets after method save Smiley Sad
see this topic : http://forums.alfresco.com/en/viewtopic.php?t=5127
PS : I use activiti on alfresco 3.4e.