How to activate a timer after other timer that is in a different app

Hi, I have 2 diferents apps. 

App 1 has a core module with entities.

In App 2 I have other entities that reference App 1 entities (fk)

I have a timer that executes every day in App 1 and it is a timer to bootstrap information to the entities.

I need to execute a timer in App 2 to bootstrap this entities after the execution of the first timer.

How can I execute the App 2 timer after the App 1 timer? 


Thanks!

Hi!

App 2 is an depedencie from App 1, right? In you case you can call a public action (in App2) to wake the timer in App 1 but you will have a circle reference.
Can you develop both timers in App 2? In that case you will not break the architecture validation (circle reference).

Hope it helps!


BR,

Luis

Solution

Hi Adrian ,

You can create a rest api in App2 and use Wakeuptimer action inside that , call the API  at the end of your App1 timer and the api will execute the App2 timer.

Regards,

-PJ-


Solution

Hi Adrian,

What I suggest is:

  1. Create a public server action in the App1 with the logic the same as the timer1.
  2. Create a server action in the App2 with the logic the same as the timer2.
  3. Create an engine module in App2.
  4. Create a daily timer in the App2 engine module.
  5. Inside the timer, put the server action created in the App1 and the server action created in the App2 sequentially.

Be careful that the 1. and 2. are server actions with the same logic of the timers, not timers itself. Then, you have a timer that runs daily with the App1 action and after that, the App2 action, like you pretend.

Best Regards!

Bruno Marques wrote:

Hi Adrian,

What I suggest is:

  1. Create a public server action in the App1 with the logic the same as the timer1.
  2. Create a server action in the App2 with the logic the same as the timer2.
  3. Create an engine module in App2.
  4. Create a daily timer in the App2 engine module.
  5. Inside the timer, put the server action created in the App1 and the server action created in the App2 sequentially.

Be careful that the 1. and 2. are server actions with the same logic of the timers, not timers itself. Then, you have a timer that runs daily with the App1 action and after that, the App2 action, like you pretend.

Best Regards!


Hi, can you explain me what is an engine module?  Thanks!

It's a module that contains all the application asynchronous processes, like BPT's and Timers. It's not a type of module, it's more like a question of architecture so that the modules be more organized by functionality.

In your case, you will create, for example, a Blank module and then, create the Timer that contains the two server actions created in App1 and App2. For the future, when you need to create more Timers or BPT's you should use this module.

Best Regards!