Custom Workflow For start an workflow and send an email to user

cancel
Showing results for 
Search instead for 
Did you mean: 
aishu
Active Member

Custom Workflow For start an workflow and send an email to user

Jump to solution

Dear Team,

I need workflow for when documents get imported/updated then workflow should start and mail has to send to user, So i have created script file for custom workflow, please refer following script for custom workflow:

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("user1");
workflow.parameters["sendEMailNotifications"] = true;
workflow.execute(document); 

but when i set to- Action->Execute script->Scipt name then workflow is assigned to user but mail not send to particular user, can u suggest how to add script for mail also in this script,

Kindly suggest!

1 Solution

Accepted Solutions
krutik_jayswal
Senior Member II

Re: Custom Workflow For start an workflow and send an email to user

Jump to solution

Update below line

workflow.parameters["sendEMailNotifications"] = true;

in to 

workflow.parameters["bpm:sendEMailNotifications"] = true;

View solution in original post

2 Replies
krutik_jayswal
Senior Member II

Re: Custom Workflow For start an workflow and send an email to user

Jump to solution

Update below line

workflow.parameters["sendEMailNotifications"] = true;

in to 

workflow.parameters["bpm:sendEMailNotifications"] = true;

aishu
Active Member

Re: Custom Workflow For start an workflow and send an email to user

Jump to solution

Dear Krutik Jayswal,

thank you for you Response, now mail successfully sent to user.