Wake timer while it is already running

Wake timer while it is already running

  

Hi There


What would happen if a use WakeTimer from Server action while the timer is already running?

The way I will be using it is following: Once a record is created, I store that user id in an entity and call the Wake timer action to call a few Web Services asynchronously and then delete that record from that entity. Now what will happen if a Timer a timer is running which was just called when User "A" was created and while it is calling Web Services for user "A", another User account "B" is created and WakeTimer action is called again by storing the user id in the entity. Will the timer start again once the previously initiated timer (which was initiated when User "A" was created) is finished running? Or will it start another instance in parallel? 


Thanks,
Gurvinder

https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/OutSystems_Platform_Timers_and_Asynchronous_Processes

Different timers can be executed at the same time, but the same timer never has more than one execution at a time.

But if you use Process it will be run in paralel.

And process can be configured to start automatically after a certain CreateEntity action is called.

Hi Harlin,


I've created a sample oml for my implementation, does it looks correct?


Thanks,

Gurvinder

Hi Gurvinder,

I think you should not use conditional start like that.

Instead of conditional start, there is Launch On property on Process, you should use that.

That process will be triggered automatically after Create<Entity> event.


There is a BPT class here: 

https://www.outsystems.com/learn/courses/17/master-class-on-modeling-business-processes-bpt/?StartCourse=False


Solution

When you call "Wake Timer" and the timer is currently running, it flags the timer to start again once it finishes. So it will finish what it is doing, then a few moments later start over again.


J.Ja

Solution

Hi gurvind,

For every timer trigger, there will be a entry in ossys table with running_since and running_by with jobid.

Thats why as 'ja' said, it will wait for the job to complete.

And starts the new thread again.

Thanks,

Sridhar