This content has been marked as final.
Show 1 reply
-
1. Re: need help to set a task
cocampo Dec 4, 2006 12:57 PM (in response to blai)To declare an action that sends mails as you "enter" a task:
<task-node name="1a revision contrato"> ... <task name="revision_contrato_1"> <timer name="send_mail" duedate="5 seconds" repeat="7 days"> <action class='com.timers.test.MailSender' /> </timer> </task> ... </task-node>
Here's a snippet from MailSender class:public class MailSender implements ActionHandler { ... public void execute(ExecutionContext executionContext) throws Exception { MailSender ms = new MailSender(); ... ms.send(); ...
Also, in order to activate timers, I'm declaring the next in my web.xml file:<servlet> <servlet-name>JbpmThreadsServlet</servlet-name> <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet>
If you have the jbpm.war in the same app server, you don't need to declare it.
Regards.