AnsweredAssumed Answered

Localizing email notification in workflow javascript

Question asked by robinflow on Jul 28, 2008
Latest reply on Aug 7, 2008 by sbuckle
Hi all!
I'm sending an email notification at each transition of the workflow, and I was wondering wether it's possible to localize the header and the content of the email. I'm using the sample javascript found on the WorkflowAdmin wiki page:

           var mail = actions.create("mail");
           mail.parameters.to = initiator.properties["cm:email"];
           mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
           mail.parameters.from = bpm_assignee.properties["cm:email"];
           mail.parameters.text = "It's done";
           mail.execute(bpm_package);

So let's say I'd like to change the text: "It's done" to something else; what is the way to turn it into a variable associated with a message in the properties file? In other words: how would I need to change this line, and besides adding it to the custom-messages.properties file, what else is there to do, to make it work?

Outcomes