Any Datahub Transaction handling best practices?

1
We are excited about the further enhanced Datahub capabilities and the ability to Write, Update and Delete objects in remote entities found in MX9.18 and later. We are looking into the idea of having a central key data app that shares data via Datahub to the consuming apps. A topic we are wondering about is how to handle transactions? The documentation provided on https://docs.mendix.com/data-hub/ doesn't talk about transactions. What if you have for example: - an object model consisting of 3 remote entities, e.g. Edition 1:n Originator 1:1 Affilitation - you need to add an Originator and the Affiliation of the Originator via Datahub to an Edition How can you ensure either both the Originator and Affiliation objects are committed via datahub?  Thanks in advance! Rob
asked
2 answers
0

Hi Rob,

 

At the moment, Mendix 9.19, every external entity send to service microflow activity is a separate transaction. You’ll need to independently save each entity, so 2 send activities in your microflow.

 

We are working on two capabilities that will extend how you can handle this in a single transaction: writing of external entities including associated external entities (using odata batch), and OData actions enabling you call custom persistence logic with multiple objects.

 

Andrej

answered
0

Thanks Andrej, I can't wait to see that implemented/working!

answered