<commit_before># Setting up a simple CMS workflow
Since workflows can vary greatly across websites, there's no default workflow. 

You will need to configure the workflow in the ‘workflows’ admin interface. Here, we'll create a simple ‘Review and Approve’ workflow with the following features:
1. Content Authors make a change and request approval from Content Publishers.
1. An email is sent to the Content Publishers for Approval.
1. Content Publishers can view and then reject or approve the change.
1. An email is then sent to Content Authors to notify them of the rejection or that the content is to be published.

![Flow diagram of advanced workflow objective](_images/advancedworkflow-review-and-approve.jpg)

## **Step 1. Set up user groups**
CMS Administrators must first set up user groups to be configured in the Workflow, _see_ [http://userhelp.silverstripe.org/en/for-website-administrators/changing-and-managing-users](http://userhelp.silverstripe.org/framework/en/for-website-administrators/changing-and-managing-users) _for setting up users and groups in the Secuirty admin_. 

For this example workflow we have the following user groups set up: 
1. Content Authors
-- The users creating and maintaining content on the website. These users will change content and apply for approval.
1. Content Publishers
-- The users who will review and approve any content changes on the website before they are published to the live web site.

You must ensure the above user groups have the following permissions checked:

![Workflow permissions](_images/advancedworkflow-checked-permissions.jpg)

Once your user groups are set, you can apply Workflow actions to these user groups. 

See [more on workflow permissions.](workflow-permissions.md)

<div class="note" markdown="1">Note: Any user with ‘full administrative rights’ set will see all Workflow action buttons in the CMS, plus they will have the ability to Publish and Draft content regardless of whether or not a workflow is configured_ _on a page.</div>

## **Step 2. Create a Workflow Definition**
There is no default workflow in SilverStripe CMS since actual workflows vary greatly across web sites and hence one must be created. 

### Using a workflow template (optional)
Workflow provides a simple "Review and approve" template that can be selected when setting up a Workflow Definition. 
This is a 2 step workflow (one person authors content and another approves and publishes it) that you can use as a starting point for more complex workflows.
Once you have added a template, you will need to configure it with your custom settings.

![](_images/create.png)

![](_images/actions.png)

Now continue to "Step 4. Assigning Users to the Workflow" below.

### Defining your own workflow
1. To create a Workflow Definition, select the _Workflows_ admin in the Left Hand Menu to show the Workflow administration.

![Workflow CMS section](_images/advancedworkflow-modeladmin.jpg)

2. Click on ‘Add Workflow Definition’ to bring up the Workflow form.

![Add Workflow Definition](_images/advancedworkflow-workflowdefinition.jpg)

Enter:
**Title**
The title for your workflow.

**Description**
A summary of your workflow.

**Choose from Template (optional)**
As detailed above, a template can be selected here. 

3. Click ‘Save’ 

Note: You must save your workflow definition before you can add workflow actions.<commit_msg>Misc changes<commit_after># Setting up a simple CMS workflow
Since workflows can vary greatly across websites, there's no default workflow. 

You will need to configure the workflow in the ‘workflows’ admin interface. Here, we'll create a simple ‘Review and Approve’ workflow with the following features:
1. Content Authors make a change and request approval from Content Publishers.
1. An email is sent to the Content Publishers for Approval.
1. Content Publishers can view and then reject or approve the change.
1. An email is then sent to Content Authors to notify them of the rejection or that the content is to be published.

![Flow diagram of advanced workflow objective](_images/advancedworkflow-review-and-approve.jpg)

## **Step 1. Set up user groups**
CMS Administrators must first set up user groups to be configured in the Workflow, _see_ [http://userhelp.silverstripe.org/en/for-website-administrators/changing-and-managing-users](http://userhelp.silverstripe.org/framework/en/for-website-administrators/changing-and-managing-users) _for setting up users and groups in the Secuirty admin_. 

For this example workflow we have the following user groups set up: 
1. Content Authors
-- The users creating and maintaining content on the website. These users will change content and apply for approval.
1. Content Publishers
-- The users who will review and approve any content changes on the website before they are published to the live web site.

You must ensure the above user groups have the following permissions checked:

![Workflow permissions](_images/advancedworkflow-checked-permissions.jpg)

Once your user groups are set, you can apply Workflow actions to these user groups. 

See [more on workflow permissions.](workflow-permissions.md)

<div class="note" markdown="1">Note: Any user with ‘full administrative rights’ set will see all Workflow action buttons in the CMS, plus they will have the ability to Publish and Draft content regardless of whether or not a workflow is configured on a page.</div>

## **Step 2. Create a Workflow Definition**
There is no default workflow in SilverStripe CMS since actual workflows vary greatly across web sites and hence one must be created. 

### Using a workflow template (optional)
Workflow provides a simple "Review and approve" template that can be selected when setting up a Workflow Definition. 
This is a 2 step workflow (one person authors content and another approves and publishes it) that you can use as a starting point for more complex workflows.
Once you have added a template, you will need to configure it with your custom settings.

![](_images/create.png)

![](_images/actions.png)

Now continue to "Step 4. Assigning Users to the Workflow" below.

### Defining your own workflow
* To create a Workflow Definition, select the _Workflows_ admin in the Left Hand Menu to show the Workflow administration.

![Workflow CMS section](_images/advancedworkflow-modeladmin.jpg)

* Click on ‘Add Workflow Definition’ to bring up the Workflow form.

![Add Workflow Definition](_images/advancedworkflow-workflowdefinition.jpg)

* Enter:

**Title**
The title for your workflow.

**Description**
A summary of your workflow.

**Choose from Template (optional)**
As detailed above, a template can be selected here. 

* Click ‘Save’ 

### Note:
You must save your workflow definition before you can add workflow actions.
{'fraction_non_alphanumeric': 0.061788617886178863, 'fraction_numerical': 0.003695491500369549, 'mean_word_length': 4.743633276740238, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5204588', 'n_tokens_mistral': 1767, 'n_tokens_neox': 1656, 'n_words': 927}