1.6. Lifecycles

While workflows determine what happens to an item up until the time it is published, the item's lifecycle determines what happens after the moment of publication. When an item is published, it is assigned a lifecycle by the publisher. A lifecycle consists of a series of lifecycle phases. Each phase has a start delay (time between publishing and start of phase) and duration. Publishing is discussed in greater detail in Chapter 4 Publishing Concepts

Each lifecycle phase has an associated LifecycleListener, which is associated with a particular action upon beginning and ending of the phase. Any phase defined via the CMS UI uses the PublishLifecycleListener for beginning and ending of the phase. This listener pushes the item live at the beginning and expires (unpublishes) the item at the end of the phase.

In theory, any action may be taken at the beginning and ending of a phase. Developers may write custom listeners which perform alternate actions, such as item archiving. However, these custom phases cannot be manipulated via the UI. Any lifecycle definitions which make use of custom phase listeners must be programmatically generated.