Content versions
Describes the various states a content version can have.
Version status
Version status properties let you track where a content item is in the editorial workflow.
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 has one of the following 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 publishing.DelayedPublish– Deprecated. Replaced bySaveAction.Schedule. Do not use in new implementations.Published– The version is published.PreviouslyPublished– The version was published but is now replaced with a different version.
Status transitions
Status transitions control how content moves between workflow states using SaveAction parameters.
A state transition is programmatically specified by parameter SaveAction in the call to IContentRepository.Save. Below are the different SaveAction values for state transitions and the outcome of the transition. The transition is applied to the current version unless the status is published or previously published, in which case a new version is created.
DefaultorNone– Saves a version maintaining the current status unless a new version is created. In this case, the version is created in a checked-out state. (Defaulthas replacedNonein CMS 10.)Publish– Publishes a version.Schedule– Schedules a version for automatic publishing at a later date. (Since CMS 10.)CheckOut– Checks out a version to indicate it is being worked on. (Since 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 whose outcome depends on the current status. In some cases, it maintains the status. In other cases, it checks out the current version.
The state transition in the SaveAction is combined with option flags to specify how the save operation is 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 UI).DelayedPublish– Used in combination withSaveAction.CheckInto specify that the version should be automatically published at a future date and time. (Deprecated in CMS 10.)
Locked content versions
Locked content versions prevent unauthorized updates or transitions, ensuring approval workflows complete without interference.
A version is locked for updates or transitions by implementing interface IContentLockEvaluator. Versions currently in state AwaitingApproval and where an approval definition is specified for the version are locked for updates by default. Updates are forced by specifying SaveAction.SkipValidation. An IContentLockEvaluator implementation should be registered in the IoC container to be consumed by Optimizely CMS. See also Content approvals.
NoteIn CMS 13,
IContentVersionRepository.Deleterequires anAccessLevelparameter. Ensure that delete operations specify the appropriate access level.
Content events
Content events let you intercept and customize behavior during language conversion scenarios.
CMS 13 introduces additional content lifecycle events related to language conversion:
IContentEvents.ConvertingContentLanguage– Triggered before content is converted to another language.IContentEvents.ConvertedContentLanguage– Triggered after content has been converted to another language.
Use these events to customize or intercept content behavior during language conversion scenarios.
Updated 18 days ago
