As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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
ContCentric
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?
Vidhi
hi vidhi,
thank you for your response, i have got script.