Promise in OutSystems
I'll do my research with ODC, as I lost my O11 PE.
List of Items
- follow a vanilla JavaScript tutorial for Promise
- asynchronous Actions in OutSystems (official doc)
- how JavaScript functions generated from Client Actions are wrapped with Promises
- If we use $resolve in an Event Handler of a UI element, we can delay the execution until the corresponding classes are attached to the tags. Why?
- link to my old Qiita article
This is an article explaining asynchronous JavaScript code in regards to OutSystems.
The limitation of callbacks: callback hell (a chain of nested callbacks deteriorates maintainability)
ES6 (ES2015) introduced Promises.
"How to use promises in OutSystems?" section describes how to use vanilla Promises in OutSystems, not
asynchronous Actions in OutSystems (official doc)
Defining Asynchronous JavaScript Code
As of writing this, there seems to be no ODC version of the document.
When one of "
reject()" predefined functions is used in a given JavaScript element, the client action the element belongs to will be considered asynchronous. resolve()" or "
-> A Client Action where a JavaScript element with $resolve or $reject as a whole is asynchronous.
A question is what will become of the code after $resolve? Does it continue asynchronously?