The workflow functionality bundled with the Liferay Forms and Workflow suite comes with one pre-installed workflow definition called the Single Approver Workflow. This workflow requires one approval before an asset can be published. One of the conveniences of using Liferay’s workflow engine is that any roles specified in the workflow definition are created automatically when the definition is deployed. This provides a level of integration with the portal that third party engines cannot match. The Single Approver Workflow contains three roles, each with different scopes. You can deduce the scope of each role by its name: Site Content Reviewer, Organization Content Reviewer and Portal Content Reviewer.
A word about designing workflows. If you are a CE customer, you’ll have to get comfortable working with XML to create workflow definitions. There’s a tutorial in the documentation for developers that will help you learn how to do that.
Workflow Assets
Many of the assets in Liferay DXP are enabled for workflow. Configure workflow or these assets in Control Panel → Configuration → Workflow Configuration:
- Blogs Entry
- Calendar Event
- Comments
- Message Boards Message
- Page Revision
- User
- Wiki Page
Configure workflow for these assets at the site level in Site → Configuration → Workflow Configuration:
- Blogs Entry
- Calendar Event
- Comments
- Message Boards Message
- Page Revision
- Wiki Page
What’s the difference? As with most scoped activities, the higher level setting (in the Control Panel) sets the default behavior. It’s overridden at the more granular level (in the site menu).
User doesn’t appear on the site list because adding users is strictly a portal-wide administrator activity. Only assets that can be added and configured at the site level (for example, those that are accessed from the site menu) have workflow configuration controls at the site level.
Some assets that are workflow enabled are only configured in their respective application. Web Content articles are workflow enabled from the folder settings menu:
Enable workflow on Dynamic Data List entries in each list’s Add form:
Enable workflow for each individual form’s entries from the Form Settings screen:
Workflow Behavior
Most of the resources listed above behave just as you might expect with workflow enabled: The Publish button for the resource’s Add form is replaced by a Submit for Publication button, and instead of instant publication, the asset has its status set as Pending and must proceed through the workflow before publication.
Page revisions are slightly different. Page revisions only occur in staging environments that have Page Versioning enabled. When a Page Variation or Site Page Variation is created, its creator must click Submit for Publication at the top of the page, and the variation must be approved in the workflow, before it can be published to the live site.