You are here

workflow.html in Lightning Workflow 8.2

Same filename and directory in other branches
  1. 8.3 help/workflow.html
  2. 8 help/workflow.html

File

help/workflow.html
View source
<h2>Workflow in Lightning</h2>
<p>Lightning's Workflow component is based on Workbench Moderation. It allows you to put content into various <dfn>moderation states</dfn>, like Draft, Archived, Published, and so forth. You can define as many moderation states as you like. A moderation state is either <dfn>published</dfn> or <dfn>unpublished</dfn>, which determines whether or not its accessible to your sites visitors.</p>
<p>The moderation state of any given bit of content can be changed by means of <dfn>state transitions</dfn>, which allow you to define what changes are allowed. For instance, you might allow content editors to transition a piece of content from the Draft state to Needs Review, but only allow administrators to transition that same content from Needs Review to Published. Users can only make use of transitions to which they have access. Access is controlled by permissions.</p>
<p>Lightning ships with two content types -- Basic Page and Landing Page. Both have moderation enabled. There are four states: Draft, Needs Review, Published, and Archived. New content is created the draft state by default, but (depending on your permissions, of course) you can change it to a different state when you save it.</p>
<p>Enabling moderation for a content type means that every time you save changes to a piece of content, a new <dfn>revision</dfn> of that content is created. A revision is a snapshot of the content as it was at a certain point of time. It's important to note that a new revision is created <em>every time you save a piece of content</em>. Even if you didn't change anything. Even if you only changed basic things like the title or moderation state. Lightning maintains a complete history of every change ever made to any piece of content, plus useful information such as who changed what, when.</p>
<p>Confusingly, Drupal refers to the most recently created revision as the &quot;current revision&quot;. That's because it assumes that your most recent revision is published. In Lightning, by contrast, the most recent revision might <em>not</em> be the published one. It is entirely possible for you have created a piece of content, gone through several revisions, published it, then <em>created a new revision in the <strong>draft state</strong></em>. In this situation, the new draft revision is NOT published &mdash; only the most recent <strong>published</strong> revision is visible to your site's visitors. Newer, unpublished revisions are referred to as <dfn>forward revisions</dfn>.</p>
<p>When working on moderated content, you will see that the Save button allows you to transition the content's moderation state. Out of the box in Lightning, the button will read &quot;Save and Create New Draft&quot;, but that (as well as the other options the button gives you) may vary depending on the permissions you have. After saving the content, you'll be able to continue iterating it and making changes until you (or someone who the requisite permissions) transitions it to a published state. When there is more than one revision, you will see a Revisions tab when viewing the content (assuming you have the permissions to see it), which is a very basic overview of the content's revision history.</p>
<p>If you visit a piece of content in a published state, you can click the New Draft tab to create a forward revision. You will be able to edit and iterate over this new revision like you normally would, <em>without</em> affecting what your site visitors see. Only when you publish the draft will it be accessible to visitors.</p>