[jboss-user] [JBoss jBPM] - Re: Best way to structure a business process with a delay.

brado do-not-reply at jboss.com
Fri Oct 6 21:45:25 EDT 2006


Hello gygerl, 

I dont know how to work out your declarative approach -- I used a programmatic approach to creating my timer inside my node's ActionHandler, as follows:


  | Date dueDate = <set your due date here>;
  | timer.setDueDate(dueDate);
  | timer.setTransitionName("mytransitionname");
  | timer.setGraphElement(executionContext.getEventSource());			timer.setTaskInstance(executionContext.getTaskInstance());
  | timer.setToken(executionContext.getToken());
  | SchedulerService schedulerService = (SchedulerService) Services.getCurrentService(Services.SERVICENAME_SCHEDULER);
  | schedulerService.createTimer(timer);
  | 

That seemed to work fine for me. Hope that helps.

Cheers,

Brad

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976715#3976715

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976715



More information about the jboss-user mailing list