In $DogList there will be only 1 Dog. Effectively $NewDog_1 and $NewDog_2 are both Commited at their creation but the new Sync to Device action perform a kind of check before synchronizing the list or the object to the device as below.
If the object to synchronize to a device is deleted in the same microflow, sync to device activity will remove it from the offline database, if found. ( https://docs.mendix.com/refguide/sync-to-device )
So, $NewDog_1 is removed before syncing to the offline database.
At the end, the microflow will sync 1 dog to the offline database and we will found this dog alone in the $DogList in the Nanoflow: NF_SynchronizeDog.
1 dog; if the object to synchronize to a device is deleted in the same microflow, the sync will delete it. In this case 1 dog is deleted and the sync will remove it.
The $DogList in NF_SynchronizeDog is 1.
'If the object to synchronize to a device is deleted in the same microflow, sync to device activity will remove it from the offline database, if found' (https://docs.mendix.com/refguide/sync-to-device#5-limitations)
Both $NewDog_1 and $NewDog_2 are committed and then it is syncronized.So $NewDog_1 will be removed from the offline database.
Now the $DogList will contain only 1 object (i.e) $NewDog_2.
The $DogList is not affected by the delete action, since the list is synchronized and the deleted object is not removed from the list I expect 2 objects to be synched to the offline database.
The $DogList will be a size of 2; $NewDog_1 and $NewDog_2 Image
The deletion of $NewDog_1 has no effect on the $DogList in the microflow Image
In the NF_SynchronizeDog there is 1 Dog in the $Doglist Image
1.Initially DogList is created with no list values(Size:0)
2.Creating one NewDog_1 Object and committing it to database
3.Creating another NewDog_2 Object and committing it to database
4.Add the NewDog_1 to DogList(Size:1)
5.Add the another NewDog_2 to DogList(Size:2)
6.Sync ‘DogList’ to device
7.Delete the NewDog_1 object from Dog entity
Limitation:
If the object to synchronize to a device is deleted in the same microflow, sync to device activity will remove it from the offline database, if found.
There will be only 1 dog in the list.
See https://docs.mendix.com/refguide/sync-to-device#5-limitations
‘If the object to synchronize to a device is deleted in the same microflow, sync to device activity will remove it from the offline database, if found.’
Plus: i made a testapp with a count list activity, and the result was 1 dog.
0 dogs.
Reason: Autocommited and new objects get skipped.