cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving values from properties file in processdefinition.

darklord
Champ in-the-making
Champ in-the-making
hi folks,

           how can i retrieve messages from properties file in processdefinition.xml. actually i have written some code that sends email to approvers. i want to load the content of email from a properties file i have created at my own "customWorkflow.properties" . i tried many things but no success yet.

<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <runas>admin</runas>
            <script>
               <expression>  
                        var mail = actions.create("mail");
                        mail.parameters.to = initiator.properties["cm:email"];
                        mail.parameters.subject = "Content Approved";
                        comment = "";
         if (token.comments.size() > 0)
         comment = token.comments.get(0).message;
                        mail.parameters.text = "User has Approved the Content.!" + "\n" + "Comments : \"" +    token.comments.get(0).message + "\"" + "\n" + "Description : \"" +    bpm_workflowDescription + "\"";
                        mail.execute(bpm_package);
               </expression>
            </script>
         </action>

"User has Approved the Content" message should be retreived from a property file as mentioned rather than hard coding it in processdefinition.xml
Just to show you my xmlns entry, if required
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="scwf:MyCom">
thanks,
1 REPLY 1