COMMITTED - a new set of business rule events (v.23)

 

One of the new features in version 2023 is the new set of "COMMITTED" events, supported by the user business rules.

All the events (except the document specific ones) and their invocation order now look like this:

  • CREATENEW
  • ATTRIBUTECHANGING / ATTRIBUTECHANGED
  • (AGGREGATE CLIENT) COMMIT
  • (AGGREGATE CLIENT) COMMITTED

mceclip1.png

Wait a minute, what's the difference between the new COMMITTED and COMMIT?

Yes, the order of invocation, but there's one essential detail:

COMMITTED occurs AFTER the entity is actually saved to the database. This means that when COMMITTED occurs, it's guaranteed that its related entity is already updated (or created). "Physically".

When to use COMMITTED?

The main use case is when you need to be sure that the update (or creation) of the entity has completed.

This is especially useful (and needed) for data synchronization scenarios where the external application has to be notified (e.g., via a webhook) when an entity changes (or is created).

 

mceclip0.png

 

---

More information is available in our official documentation:

https://docs.erp.net/tech/advanced/user-business-rules/index.html

https://docs.erp.net/tech/advanced/user-business-rules/events/committed.html

https://docs.erp.net/tech/advanced/user-business-rules/events/client-committed.html

https://docs.erp.net/tech/advanced/user-business-rules/events/aggregate-client-committed.html

https://docs.erp.net/dev/domain-api/data-sync/index.html

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk