AnsweredAssumed Answered

Moving files to an arbitrary folder

Question asked by kerkira67 on Nov 29, 2006
Latest reply on Dec 1, 2006 by davidc
I am writing a process in which the files belonging to the workflow package are automatically copied or moved to particular folders during transitions.

At the moment I am able to move files to folders which reside under the initiator's home. Here is the code I use to move files to the "ComunicazioniPerUffPresidente" folder under the initiator's home:

<script>
  var userhome = initiator.properties['cm:homeFolder'];
  var dest = userhome.childByNamePath("ComunicazioniPerUffPresidente");
  for (var i = 0; i &lt; bpm_package.children.length; i++)
     {
          bpm_package.children.move(dest);
      }
</script>

I would like to do the same for a user called "uff-presidente", but I haven't find any help within the documentation. In particular, I would like to copy files to the "ComunicazioniDaiDirigenti" folder under uff-presidente's home. The people API is not available in the Community Edition, so I am not able to get the reference to the home folder of the "uff-presidente" user.

Can you help me please?

Thanks
Roberto

Outcomes