Is there any way to achieve Delete functionality using nanaflows in Hybrid offline profiles ?

1
Hi All,         I have one Test entity listview. Using listen to widget properties, I am passing the Test entity object as input parameter to my nanaflows. Obviously, It will not Support persistable entity object as input parameter in Microflow call from nanaflows. So I created one Helper entity which is non persistable. In Helper entity I am creating one HelperID attribute which is unique one. In my Test entity also having Unique attribute which is TestID. I am passing Test entity object as parameter, then I am creating object for Helper entity mapping the HelperID with TestID. Now I can able to give input parameter to microflow call activity. Based on the HelperID I am retrieving the Test entity object.  So my question is, Can we able to use the delete functionality inside the Sub microflow ? Will it reflect in  my Offline Profiles list view ? Or Did anyone achieved the delete functionality using nanaflows in Offline profiles ? And one more doubt is, How to get live logs information when I try to access the application in Offline mode. Or else How to debug nanaflows activities using Chrome Console ? Is this possible ?
asked
2 answers
3

AFAIK deleting objects is not possible from nanoflows in offline. It is something that Mendix plans to add at some point https://www.mansystems.com/blog/everything-you-need-to-know-about-mendix-mobile-2.0
For now, your best option is to use a so called soft-delete. WIth soft-delete you use a boolean attribute on the object to mark it as deleted without actually deleting it from the database. Then you need to make sure that any grid or retrieves respect this boolean flag and do not retrieve objects that are flagged as deleted.

Hope this helps

answered
3

That's a lot of questions :)

The recommended way to delete an object currently is to use flags (a boolean that indicates if an object is deleted, used in an event microflow on synchronisation). Mendix did announce during MxWorld that deleting objects from a nanoflow will become available out-of-the-box soon.

If you delete an object in a microflow call from a nanoflow, the object will be deleted from the Mendix database, but still exist on your mobile device's database until you perform a full synchronisation. 

About the logging. Mendix also announced the debugger will become available for nanoflows soon. Until then you will need to use your own logging in your nanoflows to debug your flows. 

answered