Symptoms
The user attempted to revert a form to a previous version by following this article: http://help.k2.com/kb001311, using the K2 Service accounts credentials in the K2 database.
Anyhow he kept receiving the following error when trying to execute the Form.mRevertToVerision stored procedure in the K2 database:
"NotCheckedOut,F,,FORMID],,NAME],,SYSTEMNAME]"
Diagnoses
The error has been analysed and reproduced on a local Denallix VM hosting 4.6.9.
It turned out that the form must be in a checked out state in order to be able to revert to a previous version using the Form.mRevertToVersion stored procedure.
Resolution
1. Check out the Form in K2 Designer and go through the wizards by clicking "Next" all the way through and "Finish" at the end (the form should remain in a checked out state!).
2. Rerun the Form.mRevertToVersion stored procedure in the K2 database using the right paramteres.