question above was in referen eto timers setting
Hi, did you get to a solution? I would like to do the same, but I have only been able to change the created Timer dueDate (using a Duration object).
The string with the duedate can be found in the JBPM_ACTION table, that's where I want to change it, but I just dont know how. Thanks!
can you put solution about how you did for due date. I was busy with other thing so didn't worked on above issue. But, will let you know if I find any solution.
jBPM guru, this seems to be very common requirement. Any pointer how we can achive this?
What I could do easily was set a new dueDate of an already existing Timer "instance" (a record in the JBPM_TIMER table) using a Duration object, but not the dueDate string in the JBPM_ACTION table. What I did is as follows:
//Any duration: String dueDate = "30 seconds"; // parses the dueDateStr: BusinessCalendar businessCalendar = new BusinessCalendar(); Duration duration = new Duration(dueDateStr); Date dueDate = businessCalendar.add( new Date(), duration ); timer.setDueDate(dueDate); jbpmSession.getSession().update(timer);
You have to wrap that in the respective transaction handler code (beginTX, commit, rollback).
Seems like the jbpm API doesnt have a method to set the dueDate in the definition of the Timer (JBPM_ACTION table).. :S