Version state graph of a PageData object.
I got several questions about versioning of the PageData object in EPiServer (mostly by people writing their own page providers). So I decided to create a simple script to find out exactly what is changed when saving a page using the Save method in DataFactory with different SaveActions..
State graph
Comments to state graph
Vocabulary:
Instance - means that properties in the saved instance are changed
Loaded – means the properties changed when loading a saved PageDataObject from the database.
FCV – ForceCurrentversion
FNV - ForceNewVersion
Id | From state | Save Action |
Changed built-in properties | New ver. |
|
Instance | Loaded | ||||
1 | Created | None Reject |
PageURLSegment PagePeerOrder |
||
2 | Created | Save Save|FNV |
PageLink PageGUID PageURLSegment PagePeerOrder PageLinkURL |
PageLink PageGUID PageURLSegment PagePeerOrder PageLinkURL PageCreated PageSaved PageChanged |
X |
3 | Created | CheckIn CheckIn|FNV |
PageLink PageGUID PageWorkStatus PageURLSegment PagePeerOrder PageLinkURL |
PageLink PageGUID PageWorkStatus PageURLSegment PagePeerOrder PageLinkURL PageCreated PageSaved PageChanged |
X |
4 | Created | Publish Publish|FNV |
PageLink PageWorkStatus PageURLSegment PagePeerOrder PageLinkURL |
PageLink PageWorkStatus PageURLSegment PagePeerOrder PageLinkURL PageGUID PageSaved PageChanged PageStartPublish PagePendingPublish |
X |
5 | CheckedOut CheckedIn Published |
None None|FNV None|FCV Reject Reject|FReject|FCV |
|||
6 | CheckedOut | Save | PageSaved | ||
7 | CheckedOut | Save|FNV | PageLink | PageLink PageSaved |
X |
8 | CheckedOut | CheckIn | PageWorkStatus | PageWorkStatus PageSaved |
|
9 | CheckedOut | CheckIn|FNV | PageLink PageWorkStatus |
PageLink PageWorkStatus PageSaved |
X |
10 | CheckedOut | Publish|FNV | PageLink PageWorkStatus |
PageLink PageWorkStatus PageSaved PageChanged PagePendingPublish PageStartPublish |
X |
11 | CheckedOut | Publish Publish|FCV |
PageWorkStatus | "PageWorkStatus PageSaved PageChanged PagePendingPublish PageStartPublish |
|
12 | CheckedOut | Save Save|FNV |
PageSaved | ||
13 | CheckedIn | Save|FCV CheckIn|FCV |
PageSaved | ||
14 | CheckedIn | CheckIn CheckIn|FNV |
PageLink | PageLink PageSaved |
X |
15 | CheckedIn | Publish Publish|FNV |
PageLink PageWorkStatus |
PageLink PageWorkStatus PagePendingPublish PageSaved PageChanged PageStartPublish |
X |
16 | CheckedIn | Publish|FCV | PageWorkStatus | PageWorkStatus PagePendingPublish PageSaved PageChanged PageStartPublish |
|
17 | CheckedIn | Save Save|FNV |
PageLink PageWorkStatus |
PageLink PageWorkStatus PageSaved |
|
18 | Published | CheckIn CheckIn|FNV |
PageLink PageWorkStatus |
PageLink PageWorkStatus PageSaved |
X |
19 | Published | CheckIn|FCV | PageWorkStatus | PageSaved | |
20 | Published | Save Save|FNV |
PageLink PageWorkStatus |
PageLink PageWorkStatus PageSaved |
X |
21 | CheckedOut CheckedIn Published |
Delete | PageDeleted PageParentLink |
* = when checking in a published version with SaveAction.ForceCurrentVersion the status of the version is not saved to the database it only changes on the instance.
*1 = when checking in a new created version with the status of the version is not saved to the database it only changes on the instance.
Default PageData objects values after creation with DataFactory.
ACL | FullAccess Administrators Read Everyone |
Value created by |
Properties | PageTypeID | From DataFactory->CreateDefaultPageData |
PageParentLink | From DataFactory->CreateDefaultPageData | |
PagePendingPublish | True | |
PageWorkStatus | CheckedOut | |
PageFolderID | DataBase | |
PageTypeName | From DataFactory->CreateDefaultPageData | |
PageMasterLanguageBranch | Parent | |
PageLanguageBranch | Parent | |
PageVisibleInMenu | True | |
PageChildOrderRule | 1 | |
PageStartPublish | Now | |
PageCreated | Now | |
PageLinkURL | From DataFactory->CreateDefaultPageData | |
PagePeerOrder | Database | |
PageShortcutType | PageShortcutType.Normal |
Wow, massive!
+1! Great stuff!
Nice!
I have to update this graph after I wrote unit test from it (that tests are going to available as open source after my vacation).
@mattias, or anyone else here... Does anyone have an updated copy of this for CMS9? Have the version status IDs changed since this was last posted? Thanks!