4 Replies Latest reply on Jul 24, 2009 9:25 AM by Tej jbpm

    Custom mail class

    Tej jbpm Novice


      I wrote a custom mail class but it is not being called..

      My code in jbpm.cfg.xml is

      <string name='jbpm.mail.class.name' value='com.your.mail.custom.Mail' />

      My Mail Class extends from the actionHandler of jbpm

      public class Mail implements ActionHandler {
      here i override soem of the methods

      But it is not being executed..am I missing something?

        • 1. Re: Custom mail class
          Ronald van Kuijk Master

          The JpdlXmlReader class does this:

           String mailClassName = Mail.class.getName();
           if (JbpmConfiguration.Configs.hasObject("jbpm.mail.class.name"))
           mailClassName = JbpmConfiguration.Configs.getString("jbpm.mail.class.name");
           else if (JbpmConfiguration.Configs.hasObject("mail.class.name"))
           mailClassName = JbpmConfiguration.Configs.getString("mail.class.name");
           Delegation delegation = new Delegation(mailClassName);

          So you could try setting the param to mail.class.name (see no reason why that would make a difference though). Or check whether your config file is picked up at all.

          You can always set a breakpoint in this class when running unittests and see what happens.

          • 2. Re: Custom mail class
            Swati S Newbie

            i tried with extending existing mail class.. then i put this class in classes folder of jbpm-console war. and set mail.class.name property to custom class... it worked... start the services after making changes....

            • 3. Re: Custom mail class
              Ronald van Kuijk Master

              Oh I forgot to say something. Configuring a new Custom mail class *only* takes effect when you deploy a new process!!!! Processes that are already deployed will use the old mail provider. Maybe that is your issue

              • 4. Re: Custom mail class
                Tej jbpm Novice

                oh yeah..that was the issue..i had not deployed the process again.though I bounced the server..

                Thanks everybody...:)