This topic describes the different states a content version can have.
A content item that supports different statuses implements IVersionable. The interface contains a property Status that specifies the current status of the content version. A content version can have one of the following different statuses:
- NotCreated. The version has not been saved yet.
- CheckedOut. The currently edited version
- AwaitingApproval. The editor is done and has marked the version as ready for approval
- Rejected. The version did not pass the approval
- CheckedIn. The version is approved and ready for publish
- DelayedPublished. The version will be automatically published at a future date and time
- Published. The version is published
- PreviouslyPublished. The version has been published but is now replaced with a different version
A state transition can programatically be specified by parameter SaveAction in the call to IContentRepository.Save. Below are the different SaveAction that can be specified for state transitions and the outcome of the transition. The transition will be applied to the current version unless the status is published or previously published, in which case a new version is created.
- Default/None. Saves a version maintaining the current status unless a new version is created. In this case the new version is created in a checked out state. (Default has replaced None in CMS 10)
- Publish. Publishes a version.
- Schedule. Schedule a version for automatic publishing at a later date. (New in CMS 10)
- CheckOut. Checks out a version to indicate that it is being worked on. (New in CMS 10)
- CheckIn. Checks in a version indicating that it is ready to be published
- RequestApproval. Saves a version to a state indicating that it is ready to be approved
- Reject. Rejects a version. This is normally done during an approval review.
- Save. Save action which outcome will depend on the current status. Will in some cases maintain the status and in other cases check out the current version.
The state transition in the SaveAction can be combined with some option flags to specify how the Save operation should be performed. The flags are:
- ForceNewVersion. Specifies that the content saved should be created as a new version.
- ForceCurrentVersion. Specifies that the save should update the existing version.
- SkipValidation. Specifies that the content should be saved without performing the usual validation.
- SkipSetCommonDraft. Specifies that the version should not be set as common draft (the version used by default in the CMS edit user interface)
- DelayedPublish. Used in combination with SaveAction. CheckIn to specify that the version should be automatically published at a future date and time. (Deprecated in CMS 10)
Locked content versions
A version can be locked for updates or transitions by implementing interface IContentLockEvaluator. Versions currently in state AwaitingApproval and where there is an approval definition specified for the version are locked for updates by default. Updates can be forced by specifying SaveAction.SkipValidation. An IContentLockEvaluator implementation should be registered in IOC container to be consumed by CMS. See also Content approvals for more information.