cancel
Showing results for 
Search instead for 
Did you mean: 

Workflows automation

mduduzi
Confirmed Champ
Confirmed Champ
Hi,

I have recently integrated ephesoft and alfresco. What I want to achieve is to start an advanced workflow for each document being scanned into a   particular folder in Alfresco. Is this possible

Kind regards
mdu
1 REPLY 1

jonash
Champ in-the-making
Champ in-the-making
Hi,

This is easy to do with a rule on the scan folder:

1. Create a script in "Data Dictionary/Scripts" that sets the parameters and executes the workflow.
2. Add a rule to the folder and choose "Execute script" as the action, select the script you created in step 1.

Here's an example of a script that starts an advanced workflow:


var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:parallelreview";
workflow.parameters.requiredApprovePercent = 100;
workflow.parameters["bpm:workflowDescription"] = "Please review and approve: " + document.name;
workflow.parameters["bpm:assignees"] = [people.getPerson("admin"), people.getPerson("cyber")];
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.execute(document);