The Rollback Activity, according to the documentation, undoes uncommitted changes and deletes objects that have yet to be committed. I do not believe the rollback microflow action will undo changes to non-persistent entities that are never committed. The platform has not stored the values that existed before the user changed them in the editable page.
What would you like the user to be able to do here? Is it possible you need persistent entities in your workflow?
To make sure the custom cancel button works correctly you have to make sure the object is committed before showing the page.
This holds for both persistent and non-persistent objects as far as I know.
After the rollback bring the object that is presented in the form to the desired state again by either reloading it from the database or creating anew and then showing the page again.
I first tried commiting the non persistent entity. And I saw that the roll back didn't work. Then I changed it to a persistent entity and tried to commit and rollback on cancel. Its still not rolling back. Not sure what I'm doing wrong. Please advise.
Here are the details.
Following is my entity:-
Commit the changes after mapping the entity from a rest service as shown below.
Custom cancel microflow that rollback the changes.