AnsweredAssumed Answered

Automatically start approval workflow after doc import and afterwards move to archive

Question asked by sandorv on Oct 22, 2015
Latest reply on Nov 2, 2015 by rahulmackdani
Hey guys,

The case:

I'm using Ephesoft with CMIS export to upload my documents into Alfresco which I got working just fine. But I want to add an extra step in our invoice-approval workflow.

It's actually very simple but I can't get it to work entirely.

The GROUP (which is called Approvers) should be able to approve a invoice, this approval workflow should start right after it is imported into Alfresco repository and after approval this document should be moved from Inbox to Archive so that the end-user in the company knows which invoice can be payed etc…

So far I'm able to get the document to start approval for 1 user (sander), but not a group, using this script:

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiReview";
workflow.parameters["bpm:workflowDescription"] = "Please assign approver for "+ document.name;
workflow.parameters['bpm:assignee']=people.getPerson("Sander");
workflow.parameters["sendEMailNotifications"] = false;
workflow.execute(document);

But that's all i got to work, I also have an aspect in my content model called "approve" which I maybe can use to start archive-rule (something I was randomly thinking should be used).

Fingers crossed if there's anybody who can help me! (ps my scripting skill = zero :()

Outcomes