You could also model a second process with a timer start event that and a single service task that starts the actual process. Then you don’t have the timer event in the actual process model.
Thanks @Ingo_Richtsmeier, a little followup question… How do I unschedule a job? The TimerEntity class doesn’t seem to have a method to do this. The method
public void createNewTimerJob(Date dueDate) {
// create new timer job
TimerEntity newTimer = new TimerEntity(this);
newTimer.setDuedate(dueDate);
Context
.getCommandContext()
.getJobManager()
.schedule(newTimer);
}
provokes me to hack a similar code to unschedule, and it might work as this all happens in an event listener => the command context may exist. Still I am afraid to use internals, @thorben obviously doesn’t encourag this =)
upd or is there a non-context way to get my hands on the Job Manager?..
@thorben, thanks. I am trying to make Camunda to start a process upon a task due date.
The task may eventually be deleted without being executed, so I need to unschedule the process starter if it wasn’t yet started (and delete if it was)