AnsweredAssumed Answered

Archiving documents in the workflow

Question asked by bedo115 on May 11, 2012
Latest reply on Mar 1, 2013 by frederikheremans1

For my master thesis, I have to make a workflow with activiti and integrate it in alfresco.

I need to archive the attachement document in the workflow and it doesn't work.

I'm trying to create a script task with the script of the back-up (script in alfresco) :

// find the backup folder - create if not already exists
var backupFolder = space.childByNamePath("Backup");
if (backupFolder == null && space.hasPermission("CreateChildren"))
   // create the folder for the first time
   backupFolder = space.createFolder("Backup");
if (backupFolder != null && backupFolder.hasPermission("CreateChildren"))
   // copy the doc into the backup folder
   var copy = document.copy(backupFolder);
   if (copy != null)
      // change the name so we know it's a backup = "Backup of " +;;

When I deploy the workflow, I have no error.

When I execute the workflow, the variable "space" is unkown by alfresco or activiti (I don't know which one).

Have you a idea to resolve this error ?
Have you a idea to back-up a document with activiti ?

Thank you for your help

My configuration :

Ubuntu 11.04
Activiti 5.9
Alfresco Community 4.0