OData, Send External Object Problem From Native Applicaiton

1
Hello All,  I have faced below challenge while developing a native app, I have 2 applications: 1- Application A: web application that contains eServices 2- Application B: Native application that should also have the same eservices built in application A  eService data should exist in one database only, So I have published needed entities from application A using OData and consumed them in application B (the native app) then use ‘send’ activity to send the data to A the problem is: On the submit for the eservice from app B(the native app) I need to ‘send’ the external entity object  to A, BUT I cannot use ‘send’ activity in nanoflow and from the microflow I cannot access the client data that was entered by end user. Synchronize activity doesnt work for external entities! Any Ideas?  
asked
1 answers
0

Since you can only use the 'Send' activity in a microflow, you will need to call a microflow from the nanoflow in your native app. You can access the data that was synced from the device to the server by retrieving it, or use a non-persistent entity to pass the data from the mobile device directly to the microflow. Copy the data from the non-persistent entity to a new or retrieved external entity and send it.

 

Another scenario could be to use an after-commit event on a persistant "helper" entity. The helper entity can have the same attributes as the external object. Just commit and sync, and copy the values to the external entity in the event handler flow. This method will give you less control so proper error handling is recommended.

 

P.S. I do believe Mendix is working on making this a lot easier in the future but have not communicated any official timelines.

answered