Delete Object in Nanoflows

5
Hi all, does anyone know why there is no Delete action in Nanoflows? (See docs) Edit: The use case we had was deleting a non-persistent commited object (yes this is possible) Or is this a planned feature? regards, Fabian
asked
6 answers
3

Hi,

Its currently not added because the main goal/use case of nanoflows was oflfine apps, and they dont support delete because of possible unsolvable sync conflicts.

For online there are use cases, but a delete requires a call to the server/database, making microflows possibly a better than a nanoflow. However its on the backlog to discuss this and possibly allow this only in online profiles.

answered
5

Hi Fabian,

Probably you are already aware of this, but a work-around is to use rollback.

This will only work if you have not commited the object before.

-Andrej

answered
4

A workaround that uses javascript actions can be found in the app store

https://appstore.home.mendix.com/link/app/111380/

answered
2

it makes no sense when you can create then you can not delete.

answered
1

For 2020 we will look if we can support deleting properly in offline-first app. For now using a boolean attribute flag is the way to go so that you can also handle sync conflicts.

answered
0

Hi Fabian,

Because Nanoflows are for logic on the client side only, whereas Microflows are executed on the server side. A Delete action would delete an object from the database which is on the server side, so this is why it's not available in Nanoflows.

In Andrej's answer he suggests using Rollback in a Nanoflow if the object hasn't been committed before. If the object hasn't been committed then it doesn't exist on the server, hence why this case works in a Nanoflow.

answered