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

    Custom mail class

    tejjbpm

      Hi

      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 {
      etc..etc..
      here i override soem of the methods
      
      }


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

        • 1. Re: Custom mail class
          kukeltje

          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
            swatis

            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
              kukeltje

              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
                tejjbpm

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

                Thanks everybody...:)