Dear Team,
I have to set automatic workflow,if any file uploaded to respective folder my workflow should start and send mail to appropriate person for approval.
i m trying to set Rule with Perform action->Execute script-> but when i create script then it is not showing in dropping
can u suggest me how to write script for workflow? and why script option not showing in drop down?
Please refer attachment.
please suggest !
You should put your .js file in Repository->Data dictionary->Script folder.
It would be visible.
Regards,
Kintu
Thanks I understand how to add script . i have attached the .js file but it doesn't work ..please refer below script.
function startWorkflow()
{
var workflowAction = workflow.getDefinitionByName("activiti$test_wf");
var package= workflow.createPackage();
var wfparams = new Array();
wfparams["model_prefix:req_props_name"] = value2;
wfparams["bpm:assignee"] = people.getPerson("ADMIN");
workflowAction.startWorkflow(package, wfparams);
}
}
startWorkflow();
here activiti$test_wf is custom id of workflow , as i m getting this script from net..how should i get my custom workflow ID.
Hi Aishwarya,
In this line, you need to add property of custom workflow model insted of "model_prefix:req_props_name". Or you can use OOTB properties like "bpm:comment", "bpm:startDate", "bpm_priority" etc.
wfparams["model_prefix:req_props_name"] = value2;
Did you register your custom workflow?
Regards,
Vidhi
hi vidhi,
thank you for your response, i have got script.
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.