Hi everyone,

I want to implement a event scheme between modules and I need to know if something already exists or if someone knows a way of doing it.

So, first of all the use case:

  • Module 1 calls module 2
  • Module 2 calls an external service asynchronously
  • After this external service finishes call Module 2 callback
  • Module 2 calls module 1
  • Module 1 process the result

And now the questions:

  • How can I wait for the result if I'm on a screen?
  • How can I link all these components in a way that will be easy if I want to add a Module 3 equal to Module 1?
  • If I'm module 1, how can I be notified  by module 2?

I look forward for your replies.


Hello Filipe,

You have to be very careful with the use case as you've described it, from your language it sounds like you would be introducing circular dependencies.

A few questions:

  • How expensive (time consuming) is this external service call?
  • Is the external service calling back to Module 2 via some HTTP call, or by a different means?
  • Have you checked out the OutSystems Architecture Patterns course? (specifically this module: https://www.outsystems.com/learn/lesson/1226/core-module-patterns/)
  • Does Module 1 need to call Module 2 synchronously, or can it call it asynchronously and then poll to see if an update is ready?