Creating state flows
This section lists the best practices recommended for state flows. These are provided as tips and guidance, rather than complete instructions.
-
First, consider all possible processes required to review a product. If certain product types require a distinct flow, you need to create a new state flow that triggers only for those product types.
-
Always display the full state flow on the product details page, for a better user experience.
-
Change the master layout of product details pages to display a state machine viewer and an entity details component that shows state flow-specific properties, such as assignee.
-
If the reviewer group is different for each product, use dynamic user groups.
For detailed instructions for configuring page components, see Page components
Adapt a state flow to specific content types
Different content types might need different state flows. For instance, technical marketing content might need a different review flow than corporate marketing content.
To adapt a state flow to specific content types:
-
If your flow is not related to a built-in content type, create a new content type.
-
Create an action of Type Start state machine to start the new state flow.
-
Create then configure a trigger with Entity creation and Entity modification as Objective.
-
Set a trigger condition to apply the new state flow to specific content types. Make sure to set a condition to not trigger the default CMP content approval for these specific content types.
-
Add the new action as a trigger action of Type Post.
Create a product review flow
A commonly used state flow is the product review state flow. The following procedure demonstrates best practices for creating and adapting one.
To create a product review state flow:
-
Create taxonomy values for the built-in M.PCM.ProductStatus taxonomy. Typical statuses are: Created, Under review, Rejected, Approved, and Archived.
-
Configure security rules for each product status. That means that you should define which user groups have permissions to read, update, or delete products, depending on their state. For example, a user group can read Created and Under Review products, while another group can only read Approved products.
-
Create the initial state flow that will represent your company's product review process.
-
Assign user groups to each state.
-
Assign the users you want to take part in this state flow to the M.Builtin.SM.Everyone user group, which provides access to state flow actions and components.
-
Create an action of Type Start state machine that starts the product review state flow.
-
Change the master layout of all product details pages to display a state machine viewer and the state flow actions.
-
Create and configure a trigger with Entity creation as the Objective and In process as the Execution type.
-
Add the new action as a trigger action of Type Post.
Create a template review flow for Publisher
You can use state flows to review smart print templates for Sitecore Content Publisher. This example uses the taxonomy name Chili.Publication.Status.
To create a review flow for Sitecore Content Publisher templates:
-
Create a taxonomy for the template life cycle, containing the values Created, In review, Rejected, and Approved. Call it Chili.Publication.Status, and assign a unique color to each taxonomy value.
-
Create a relation between the life cycle taxonomy and the M.Chili.Publication schema definition called, for example, StatusToChiliPublication.
-
Create and enable a template review state flow that reflects the template review process at your company, called, for example, M.Chili.Publication.
-
Assign the users who participate in this state flow to the M.Builtin.SM.Everyone user group, which provides access to state flow actions and components.
-
Create a user group for Sitecore Content Publisher administrators. Because upload packages and actions for editing templates are only visible to M.Builtin.Chili.Administrators, if you need a reviewer group with extended permissions such as review or edit, you need to define it in a new user group called, for example, Chili.SuperAdmin and assign the following permissions:
-
Chili.Publication.Status with In Review status: Read, Update, DownloadOriginal, DownloadPreview, and ViewNotWatermarked.
-
Chili.Publication.Status with Approved status: Update and Delete.
-
Chili.Publication.Status with Created or Rejected status: Read, Update, Delete, DownloadOriginal, DownloadPreview, and ViewNotWatermarked.
-
Portal.Page: Annotation detail: Read.
-
Chili.Publication.Status: Read.
-
-
Update the M.Builtin.Chili.Everyone user group to give it Read permission for Approved templates.
-
Assign user groups to each state.
-
Create an action of Type Start state machine that starts the template review state flow.
-
Create and configure a trigger with Entity creation as Objective and In process as Execution type.
-
Set a condition to trigger the template review flow when the state is Created, then add the new action as a trigger action of Type Post.
-
Enable and display the template review flow on all relevant pages:
Page
To do
Template details page
-
Add state flow actions and a state machine viewer.
-
Update the Creation component to assign the Created publication status at creation.
-
Update the Details component to disable the state flow properties.
Template creation page
-
Update the Details component to disable the state flow properties.
Template search page
-
Update the output settings to show the publication status as a badge based on the color of the taxonomy.
-
Add a horizontal facet to filter based on Chili.Publication.Status.
-