Dear Team,
I have written java script for Review and Approval workflow process (activiti$activitiReviewPooled),
Now i need to move files from the current folder to an "approval" folder when the files are approved or to the "rejection" folder when the files are rejected.
What should i do in script,
Please refer the script and suggest!
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiReviewPooled";
workflow.parameters["bpm:workflowDescription"] = "Please assign approver for "+ document.name;
workflow.parameters["bpm:groupAssignee"] = people.getGroup("GROUP_cadgroup");
workflow.parameters["bpm:sendEMailNotifications"] = true;
workflow.execute(document);
That logic you have to write in taskListner(complete).
Ex.
<userTask id="reviewTask" name="Review Task"
activiti:formKey="wf:activitiReviewTask">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
//Move file logic
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
Can u suggest me in which location i should write this file?
If you are using custom workflow then you need to write this code in bpmn file.
If you are using OOTB workflow then you need to override bpmn file of that workflow.
Hi,
I am new to alfresco,
i don't know whether should i create file & how can i execute ,
I have created this script file as test.js and stored in Repository-> Data dictionary -> Scripts folder and
set rule for folder as:
perform action-> execute script-> test.js
can u suggest me in brief ?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.