AnsweredAssumed Answered

MailTask and ExecutionListener field injection

Question asked by pitagoras on Jul 11, 2012
Latest reply on Jul 16, 2012 by frederikheremans1
I´m trying to define a listener over a mail task, with the purpose of storing the fields of a the sent mail in a local database.

So I define in my MailTask:

    <serviceTask id="sendQuoteMail" name="Send Quote" activiti:type="mail">
        <activiti:executionListener event="start" class="delegates.MailSaver"></activiti:executionListener>
        <activiti:field name="to" expression="${}"></activiti:field>
        <activiti:field name="from" expression=""></activiti:field>
        <activiti:field name="subject" expression="your quote ${quote.businessKey}"></activiti:field>
        <activiti:field name="html">

And define a class:

public class MailSaver implements ExecutionListener {

   private String from;
   private String to;
   private String subject;
   private String html;
   private String text;

   public void notify(DelegateExecution arg0) throws Exception {

        public void setFrom(String from) ….
        … and all other public gettrs and setters here…

I´m using activiti-engine 5.9
I tried also to bind the listener to the 'end' event.

The listener is called but no field is injected to the listener.
Am I missing something?
Thank you!