[jboss-user] [JBoss jBPM] - Re: need help to set a task
cocampo
do-not-reply at jboss.com
Mon Dec 4 12:57:37 EST 2006
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991059#3991059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991059
More information about the jboss-user
mailing list