1 2 Previous Next 24 Replies Latest reply on May 14, 2009 4:28 AM by Tej jbpm

    Timer for mail node or task node??

    Tej jbpm Novice

      Hi

      I want an email as specified by the mail node to repeat every 24 hours until the task has been completed. The structure is

      start

      mail node - which sends an email that task is assinged to a person

      task node - which required the person to approve or deny

      Here I want the mail node to repeat sending the email to the person until the task node is actioned.

      Where do i Configure the timer - is it task node or email node? If i configure in email node it does not work as it automatically transitions to the task node..If i specify in task node it works but it uses a standard text format fromt the jbpm.mail.templates.xml file (task-assign template)..

      What i ideally want is the same email content in email node to be repeated until the task is actioned? Could anybody help me on this please??????

        • 1. Re: Timer for mail node or task node??
          Swati S Newbie

          don't use mail node.
          second in task node use timer,

          put mail action tag inside this timer tag..
          no need to create seperate mail node. use mail action in timer tag.
          It will take mail action after every 20 seconds.

          • 2. Re: Timer for mail node or task node??
            Tej jbpm Novice

            thanks for your reply.

            I use reminder in task node to remind about the task..but it is using a standard template from task-reminder in mail templates.

            And how do I use mail action in timer? I am new to jpdl - could you please explain me a bit more on what to define where?

            thanks

            • 3. Re: Timer for mail node or task node??
              Swati S Newbie

               

              <task name="task1">
               <timer name='reminder1' duedate='20 seconds' repeat='30 seconds'>
               <mail template="task-assign"/>
               </timer>
               </task>
              


              • 4. Re: Timer for mail node or task node??
                Swati S Newbie

                you can define as many templates you want in jbpm.mail.templates.xml . use the name of template present in this file in your mail action tag.
                read documents...

                • 5. Re: Timer for mail node or task node??
                  Ronald van Kuijk Master

                  Swatis,

                  You are wrong, the reminder template is fixed

                  • 6. Re: Timer for mail node or task node??
                    Ronald van Kuijk Master

                    Ok small addition... what you use is not really a reminder on a task, it is a separate timer. You can get kind of the same kind of functionality then and indeed use custom templates. The template for the real reminder (on the task) is fixed.

                    • 7. Re: Timer for mail node or task node??
                      Swati S Newbie

                      you didn't get what i said..I said we can use timer in node and we can define mail action in this timer. This mail action can pick up any template defined in attribute "template" of mail from jbpm.mail.templates.xml file. And reminder tag which we use in processdefinition.xml picks up "task-reminder" template.

                      • 8. Re: Timer for mail node or task node??
                        Swati S Newbie

                        you are right about reminder template is fixed but the example i gave uses mail action not reminder action.

                        • 9. Re: Timer for mail node or task node??
                          Swati S Newbie

                          and you can modify the existing template as you please...

                          • 10. Re: Timer for mail node or task node??
                            Tej jbpm Novice

                            I tried putting mail action in task node(not task as you had mentioned) but now my deployment fails..

                            here is the code..could you spot anything wrong?


                            <timer duedate="2 minutes" name="reminder" repeat="yes">
                             <mail name="notification" template="custom-test"/>
                            </timer>


                            • 11. Re: Timer for mail node or task node??
                              Tej jbpm Novice

                              just to add to what i said..i could not specify this in the diagram properties window..i had to manually edit the processdefinition.xml file .

                              i hope that is the right way to do it?

                              • 12. Re: Timer for mail node or task node??
                                Ronald van Kuijk Master

                                if your deployment fails there probably is an error in the logging. Would be great if you could post that

                                • 13. Re: Timer for mail node or task node??
                                  Tej jbpm Novice

                                  This is the error log

                                  2009-05-13 11:20:24 StandardWrapperValve[GDP Deployer Servlet]: Servlet.service() for servlet GDP Deployer Servlet threw exception
                                  org.jbpm.jpdl.JpdlException: [[ERROR] line 271: cvc-complex-type.2.4.a: Invalid content was found starting with element 'mail'. One of '{"urn:jbpm.org:jpdl-3.2":action, "urn:jbpm.org:jpdl-3.2":script}' is expected., at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:172)
                                   at org.jbpm.jpdl.par.JpdlArchiveParser.readFromArchive(JpdlArchiveParser.java:51)
                                   at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
                                   at org.jbpm.graph.def.ProcessDefinition.parseParZipInputStream(ProcessDefinition.java:198)
                                   at org.jbpm.web.ProcessUploadServlet.handleRequest(ProcessUploadServlet.java:89)
                                   at org.jbpm.web.ProcessUploadServlet.service(ProcessUploadServlet.java:56)
                                   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
                                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
                                   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
                                   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                                   at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
                                   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
                                   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                                   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
                                   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                                   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
                                   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                                   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                                   at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                                   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                                   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
                                   at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
                                   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
                                   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
                                   at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
                                   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
                                   at java.lang.Thread.run(Thread.java:595)



                                  • 14. Re: Timer for mail node or task node??
                                    Swati S Newbie

                                    put timer tag inside you task tag which is child node of task-node

                                    <task-node name="take some action">
                                    <task name="task1">
                                    <timer name="send mail" duedate="20 seconds" repeat="10 seconds">
                                    <mail template="task-assign">
                                    </timer>
                                    </task>
                                    </task-node>
                                    
                                    


                                    Yes we can add this in xml file only. GPD doesnotr provide user inteface for configuration.

                                    1 2 Previous Next