1

I'm purging all unused content on old server Alfresco 5.1.
Now in Alfresco database is about 15 000 completed and active workflows associated with documents.
I would find out how to remove these workflows instances.

I tried to use standard command delete all workflows imeanit in workflow console, but it doesn't work (it runs very slowly and with errors). I can check count of workflow instances in Activity Explorer.

Also I tried to use some ready JS scripts. For example, one of them:

var workflowDefinitions = workflow.getAllDefinitions();
    for (i in workflowDefinitions) {
       var workflowDefinition = workflowDefinitions[i]
       logger.error("Def:" + workflowDefinition.id);
       var workflowInstances = workflowDefinition.activeInstances;
       for (j in workflowInstances) {
          wfInst = workflowInstances[j];
          logger.error("   Inst:" + wfInst.id);
          wfInst['delete']();
       }
    }
}

Unfortanly, it doesn't work for me too!

I know that modifying Alfresco sql db directly is not so good way. However, I have question, is it possible to remove all workflows by deleted required entries (activiti) in sql database?

ERemarque
  • 497
  • 3
  • 16

0 Answers0