1 Reply Latest reply on Dec 4, 2006 12:57 PM by Cutberto Ocampo

    need help to set a task

    Blai Francés Newbie

      Hi you there,

      I am testing JBPM and in doing so I am building my first application. I mean to set a task that would send emails. I looked throughout this forum and all docs at hand but no luck in finding an answer to my problem: I want to know how to set a task that send emails within the XML configuration file and how can I provide the task handler class the parameters needed to do so.
      Honestly I haven`t found a clear example.

      May anyone help me?

      Thanks a lot for your help.


        • 1. Re: need help to set a task
          Cutberto Ocampo Newbie

          To declare an action that sends mails as you "enter" a task:

           <task-node name="1a revision contrato">
           <task name="revision_contrato_1">
           duedate="5 seconds"
           repeat="7 days">
           class='com.timers.test.MailSender' />

          Here's a snippet from MailSender class:

          public class MailSender implements ActionHandler {
           public void execute(ExecutionContext executionContext) throws Exception {
           MailSender ms = new MailSender();

          Also, in order to activate timers, I'm declaring the next in my web.xml file:


          If you have the jbpm.war in the same app server, you don't need to declare it.