Cannot modify attribute IsToBeDeleted of a read-only object.
In an offline application we have a page where an image is uploaded. This image contains a Boolean “IsToBeDeleted” that is set to true if the image has to be deleted. During the sync this is catched in an after commit and the object is deleted. However, setting this Boolean in a nanoflow results in the following error: Cannot modify attribute IsToBeDeleted of a read-only object. We tried several scenario's with and without entity access applied to the entity, just applying the change and no commit, but in all cases the error is thrown.
To answer my own question:
The nanoflow is called from a template grid. Template grids are not editable by default so changing a variable in a nanoflow from this template grid throws this error as it is treated in the same way as trying to change a variable from an input field (which is not possible).