cancel
Showing results for 
Search instead for 
Did you mean: 

How can I show an aspect property?

raptus
Champ in-the-making
Champ in-the-making
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
1 REPLY 1

rptapas
Champ in-the-making
Champ in-the-making
Hi,
    I believe your requirement is to get the value of note filed from the workflow.Do the same u need to do in following ways.

<script>
<variable name="note" access="read" />
            
   <expression>
               logger.log("Note value is =" + note);
   </expression>

<script>

Inside the expression use ur code…….