Skip timer waiting time

Hi guys

I was wondering what is the best practice to skip a timer. We sometimes wait for something to happen and then fire the task, e.g a response. When the response happens within a minute but the timer waits longer we get stuck. How shall this be handled? My idea was a complex gateway waiting either for a timer event or a message event whilst the latter gets invoked when the response is there earlier. I also thought about a process instance modification moving the toking one task further after the timer task. What’s the best practice?

Hi Tristan,

Your problem description is not clear to me. Why do you use a timer at all when you wait for an incoming message? Could you maybe rephrase this or give an example?

Thanks,
Thorben

@thorben

Thanks for your quick reply. Let’s put it the other way round. We apply for anything and wait for the approval. The approval shall trigger the next user task to take information on the approval made. In case there is no approval after 2 days the user gets the form to call the other party and ask for the approval information. That’s why we have the timer (and kn most of the cases the information is not available before the timer fires). But we don’t want to have the user task on the task list before the 2 days are over.

Thanks for the clarification. Your idea using an event-based gateway sounds reasonable. As an alternative, you can use a receive task with an attached interrupting timer boundary event. This variant is maybe a little easier to understand. I recommend against using process instance modification for implementing regular-case business logic, as it makes it intransparent to people seeing only the model.

1 Like