AnsweredAssumed Answered

editing document properties

Question asked by roseta on Feb 18, 2011
Latest reply on Apr 14, 2011 by sihnu
I would like to write in a property of the document involved in the workflow (with javascript) in a transition of my own advanced workflow. I've tried with the following piece of code, but it does't work! No erro shows in the log and everything goes on well, but the property stil stais in withe:

<transition name="Geology" to="geologyTask">
   <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <runas>admin</runas>
         <script>               
            <expression>

               bpm_package.children[0].properties[cv:tutor]="John";
               bpm_package.children[0].properties[cv:department]="Geology";
               bpm_package.children[0].save();
              
            </expression>
         </script>
   </action>
</transition>

I guess  bpm_package.children[0] isn't really the document involved in the workflow, but why everything works??? Could anyone help me with this, please???

Outcomes