Hi,
I have written a JBPM Timer Action Handler.
STEPS:
1) Enable the JBPM Scheduler Servlet in web.xml
2) In the process definition define the timer tag.
<task-node name="First Task Task Task[9-1.1]"> <task name="First Task Task Task[9-1.1]" duedate="1 business days"> <assignment actor-id="jeromepater"/> <timer duedate="6 business hours"> <action class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy" name="tasktimer" config-type="bean"> <targetBean>updateEscalationForActor</targetBean> <factoryKey>jbpmConfiguration</factoryKey> </action> </timer> </task> <event type="task-start"> <action class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy" name="taskstart" config-type="bean"> <targetBean>taskStartEvent</targetBean> <factoryKey>jbpmConfiguration</factoryKey> </action> </event> <transition to="1-join"/> </task-node>
Timer timer = executionContext.getTimer(); Date date = timer.getDueDate();
// first fire the event if there is a graph element specified if (graphElement!=null) { graphElement.fireAndPropagateEvent(Event.EVENTTYPE_TIMER, executionContext); }