Workflow is a tool that allows you to streamline the process of content creation and publishing. It lets you better manage the content lifecycle of your project.
Only the Owner(s)/Admin(s) of a stack can define a Workflow, depending on the content requirements of the stack.
Note: Each stack can have only one Workflow.
Defining a Workflow involves defining ‘Workflow Stages’ as well as ‘Publish Rules’. Read on to understand what both of these elements mean and how they work.
Workflow Stages are the states of the content lifecycle which your content (entries) pass through on their way to being published. These might include, for example, ‘Draft’, ‘Ready for Review’, ‘Needs Changes’, ‘Add Media Files’, ‘Needs SEO’, ‘First Review Done’, and ‘Complete’.
Contentstack provides two default stages: Draft and Complete. Owners/Admins can add custom stages between these two default stages, depending on the content requirements of the stack. Learn how to add Workflow Stages.
Once added and enabled, these stages are visible on every entry of all the content types of the stack. They help content managers identify the levels which content has to go through, and then push content from one stage to another.
Whenever a new entry is created by a user, it is always assigned the ‘Draft’ stage. Users can work on a stage, and then assign the next stage to other users along with a Due Date and a Note. Learn how to manage/change Workflow Stages.
Every time an entry is assigned to a user, it is added as a new task in the assignee’s ‘My Task’ section. From this section, the user can go to the entry, work on it, and then assign it to another user. Similarly, the process continues until the entry reaches the end of the content creation lifecycle (i.e., ‘Complete’ stage). Learn about ‘My Tasks’.
Publish Rules are approval rules that you can add to entries of a content type. This includes adding users as publishing approvers. Once such a rule is in place, any entry of the selected content type cannot be sent for publishing on a specific environment without the approval of approvers.
A rule is typically made of five parameters: Environment, Content Type, Action, Language, and Approver. By defining a rule, you are adding one or more approvers to publish or unpublish action of an entry to an environment. This rule can be specific to a content type or a language.
Once a rule is in place, whenever a content manager attempts to publish/unpublish an entry on the specified environment, an approval request will first be sent to the user(s) added as approvers. Only if the request is approved can the content manager publish the entry to the specified environment.
Before you get started with setting up a Workflow, it’s important to know a few things about Workflows.
Setting up a Workflow involves adding ‘Workflow Stages’ and adding ‘Publish Rules’ for the stack. Let’s look at how you do this.
If you are the Owner or Admin of a stack, you can add Workflow Stages by following the steps below:
Note: You can add a maximum of 18 custom stages. This means that a workflow cannot have more than 20 stages (including ‘Draft’ and ‘Complete’).
This will enable the workflow feature for all entries of all the content types of the stack.
To update Workflow Stages, perform the steps given below:
To delete Workflow Stages, perform the steps given below:
You can enable or disable the ‘Workflow Stages’ feature for your stack at any time. To enable/disable Workflow Stages, perform the steps given below:
A Publish Rule is adding a rule for publishing or unpublishing an entry. Adding a rule includes adding an approver for actions (publish/unpublish) to be performed on the entries of specific content types in specific environments, or the stage at which the entry can be published/unpublished.
Setting up ‘Publish Rules’ in your Workflow is optional. To set Publish Rules, follow the steps given below:
This will save the Publish Rule. You can add multiple rules for your Workflow.
To update an existing Publish Rule from your Workflow, follow the steps given below:
This will update the Publish Rule.
To delete an existing Publish Rule from your workflow, follow the steps given below:
Once you define ‘Workflow Stages’ and ‘Publish Rules’, content managers can start working with Workflows. In the next section, we will learn how content managers can use Workflows.
If, for a particular stack, ‘Workflow Stages’ are enabled and ‘Publish Rules’ have been added, you can see the Workflow details in the entries in the right-hand side panel, under ‘Status’.
Under ‘WORKFLOW DETAILS’, you will find the current stage of the entry along with the due date, and the user to whom the entry stage is 'Assigned to'.
To see the Publish Rules, click on the 'Publish Rules' button at the bottom of the page. This opens the PUBLISH RULE(S) panel, with all the details, on the right-hand side of the entry page. However, these rules will be visible only if the rules have been applied to the content type associated with the the entries you are viewing.
In the following guide, we will understand how content managers can use Workflows in entries, assuming that ‘Workflow Stages’ are enabled and certain ‘Publish Rules’ have been added in a workflow.
When you create a new entry and save it, the entry is, by default, assigned the ‘Draft’ stage, with no users in ‘Assigned to’ and no due date.
Once you are done working on a particular stage of an entry (for e.g., Draft), you can change the stage of the entry (for e.g., Ready for Review) and assign a user to work on the next stage. You can also add a due date for the next stage. Let’s look at how it’s done.
This will update the Workflow Stage of the entry.
As soon as an entry stage is assigned to a user, it is added as a new task in the ‘My Task’ section of the assignee. Learn more about My Tasks.
If a ‘Publish Rule’ has been set for a particular content type(s)/language(s), you will see it under the ‘Publish Rules’ section. There are two ways to send an entry for publish/unpublish approval.
Once a request has been sent, you will see the current status of the request (Pending approval, Approved, Rejected) in the same section.
The ‘My Tasks’ page is a list of all your pending tasks. Whenever someone assigns you to work on a workflow stage on an entry, or if someone sends you an entry for publish/unpublish approval, it is added to your ‘My Tasks’ page. Each stack has a separate ‘My Tasks’ section.
To navigate to your ‘My Tasks’ section, follow the steps given below:
Tasks remain in your stack’s ‘My Tasks’ section until they are completed. To complete tasks, you need to perform the action that is required for the task. Let's look at the various ways in which tasks can be completed.
You can refine tasks based on certain filters. Let’s look at the filters that you can use.
This filter lets you refine tasks based on the action that is required by you. Some of the values that you can select here are ‘Approved’, ‘Pending’, and ‘Rejected’.
By Assigned Stages
You will see the list of all the stages that are available in your workflow. If you select any stage, Contentstack will filter all the entries of which the selected stage is assigned to you.