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>
|
3) In the ActionClass i am calling
| Timer timer = executionContext.getTimer();
| Date date = timer.getDueDate();
|
Here i am getting a null pointer exception for timer. The timer object is not
available to me. I looked at the classes in org.jbpm.scheduler.impl.*, but
don't know where it fails. In Timer.execute see a call for
action.execute(executionContext); Before that
| // first fire the event if there is a graph element specified
| if (graphElement!=null) {
| graphElement.fireAndPropagateEvent(Event.EVENTTYPE_TIMER,
executionContext);
| }
|
Is the timer Object for sure set in the Execution context when the
fireAndPropogateEvent is called. Is there anything i am missing here.
Please help.
Thanks
Prash
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986810#3986810
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986810
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user