The Workflow System
Editorial Rating:
LiveModern uses a "Content Mangement System" (CMS) called Plone to publish its content. This article, for advanced users, explains how the workflow system of content management works in Plone.
Workflow is the process used to manage objects (i. e., content, such a web page, an image, etc.) in a website. An example is a company's press release: an employee writes a press release and submits it to an editor for review before it is published on the website. This review process is called a workflow and is used by site managers to ensure that site content is correct. Plone has a very powerful and flexible default workflow system that is built around Object States and User Roles.
Object States
An object's state determines whether it is available to the various types of users defined in Plone, and what other states that object can be transitioned to. Plone's default workflow includes four states: visible, pending, published and private. Site managers and developers can create custom states.
- By default, objects are created in the
visiblestate. All users can find visible objects through the search function and can access them directly by visiting the object url. Visible objects do not show up in the navigation tree. Visible objects within private folders are still visible to all users and available through the search function. Visible objects are editable by their owners and site managers. Pendingobjects have been submitted for publishing by site members. From an end-user standpoint, they behave like objects in the visible state. The difference between the two types is that pending objects are flagged for review; site reviewers are prompted to publish or reject pending objects. Pending objects are editable only by managers.Publisheditems are visible to all site visitors. They appear in search results and the navigation tree. When a News Item becomes published it becomes visible under the News tab and also in the News box. Published items are editable only by managers, but can be retracted by owners for editing (retracting reverts an object to the visible state).- Objects in the
privatestate are visible and editable only by their owners and others with manager access to the folder in which they exist. They will not appear in search results or on the navigation tree for other users. Private items are editable by managers.
Note: Although most objects have their own states, some inherit their states from their parent objects. Forums (rarely used on this website) are an example of this behavior. Forums within visible or published folders are available to all users through the search function. Forums within private folders are only available to users with access to that private folder.
User Roles
Plone uses roles to define what different users can see and do. In this way, Plone builds security into every aspect of its operation. The roles defined in a default Plone installation include anonymous, member, owner, reviewer and manger.
- Anyone who visits the site and does not log in takes on the
anonymousrole. In public sites, anonymous users can see published, pending and visible content by directly visiting a url or by searching, however only published content is visible on the site navigation tree. Membersare users who have registered and logged in to the site. Members have the added ability to create content in their own folder, which is then submitted to site reviewers to be published. In public sites, members can see the same content as anonymous users, but only members are allowed to add content. Members may also set their own preferences.- As a
reviewer, you can publish or reject content submitted by members. When a reviewer logs in, if there is content to be reviewed a "pending" message will appear in their personal bar. A review list also appears in the right-hand column of the page. Reviewers have access to the same content as members. - Members have the
ownerrole for all content they create. This allows them to edit the content, submit or retract it, or make it private. Assigning the owner role to other users is not recommended. - Site
managerscan see content in all states (visible, pending, published and private). In addition to all the capabilities of the member and reviewer, managers can add, edit, delete and move content. Managers can also add, edit and delete users and assign them roles.
Plone inherits the role model from Zope. Please refer to the Zope Book for further information.
Transitions - Changing Object States
Owners and managers can change the states of objects they control. The states that are available are controlled by pre-defined transitions. For example, site members can submit visible objects for review or make them private and site reviewers can publish submitted items or reject them. Site managers can also customize this portion of the workflow system.
To change an object's state in contents view, check the box next to the name of the object to be changed and then click the change status button at the bottom of the page. Scroll to the bottom of the Publishing Process page and choose the desired state, then click submit.
One can also change states in item view. Simply click on the state tab, scroll to the bottom of the page, choose the desired state and click submit.
Local Roles
Site managers can give specific users additional rights in certain sections of the website. This can be accomplished by assigning local roles to folders. Managers and owners have permission to assign local roles.
To assign a local role, switch to contents view of a given folder and click Local Roles on the content tab. Search for the name of the user to whom you wish to assign a role, and check the box above their name. The choose the role to assign from the drop-down list and click "assign local roles to selected users".
This same interface can be used to delete a local role.
Publishing an object
Object owners can alter and edit objects in the visible state. Once an owner finishes editing an object, it can be published by clicking the State tab. This opens a publishing form that gives you several options:
- Status—Tells you the current state of the object.
- Effective Date and Expiration Date—The effective date is the first day an object should be made available and the expiration date is the last day. Searches and navigation only show objects within this date range. Leaving these items blank makes an object infinitely available.
- Comments—Here you can enter any comments or reason for the change in state you are requesting. These comments will be preserved in the change log for the object.
- Change State—The states to which a user can move an object. The states available here will depend on your role. Members can submit objects or make them private. Once submitted, objects are available to users with reviewing priveleges, who can then publish or retract them.
Reviewing objects
If you have reviewing privileges, when you log in to your Plone web site, you will be presented with a indication if any objects are awaiting review. This shown in the personal bar. Select this link to get a list of the objects ready for review, then select each object to review it. Click on the publishing tab and you will be presented with a form like the one above. At this point you have basically two choices - either approve an object and publish it (the publish option) or reject it (the reject option). If you reject the object you will probably want to provide a comment to the user explaining why you have rejected it.
Editing an object after it has been published
Managers may edit objects that are in any state. Members cannot edit an object after it has been published; they must first move it back into a visible state by retracting it. To do this, this click on the publishing tab for the object and click retract. Then you can edit the object as much as you wish and resubmit it. This ensures that the review process is maintained for objects that have been edited.
This work is licensed under a Creative Commons License. Cite/Attribute Resource.
Blogs