AnsweredAssumed Answered

How can I show an aspect property?

Question asked by raptus on Feb 5, 2010
Latest reply on Feb 16, 2010 by rptapas
Hello all!
My problem is very simple (I guess)… how can I get a property as a String in a script in the workflow definition??

I have added a property aspect called "notes" to the "REVIEW TASK" in the review-approve workflow. Now I want to show the text that the owner of the task add in.

My objective is to send an e-mail with that annotation to an user after the approvation…. the script is this:

<script>
         var mail = actions.create("mail-attach");
                mail.parameters.to = "email@email.com";
                                          mail.parameters.from = bpm_assignee.properties["cm:email"];
               mail.parameters.subject = "EMAIL NOTES" ;
                                          for (var i = 0; i &lt; bpm_package.children.length; i++) {
                  var doc = bpm_package.children[i];
                  var myTemplate = companyhome.childByNamePath("/Data Dictionary/Email Templates/Notify Email Templates/mymail.ftl");
                  var args = new Array();
                                                    
                  args["notes"] =    ???????????????????????????????????
                  var result = doc.processTemplate(myTemplate, args);
                  mail.parameters.text = result;
                  mail.execute(doc);
               }
            
                           
                </script>

How can I access to an aspect-workflow-model property and retrieve a String?

Thanks in advance,
Raptus

Outcomes