When an InvalidItemStateException is thrown (either at write-time or save-time) an application may wish to resolve the conflict. The standard solution is to do the following:
If the Item in question has unsaved changes pending, make a temporary copy of it.
refresh(false) the original Item, thus discarding the recent changes (including the one which caused the conflict).
Merge the changes recorded in the temporary copy with the now up-to-date Item object.
In those repositories that support it, applications may avoid such conflicts by using the locking mechanism (see 8.4 Locking).