Defining a workflow

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Workflow settings can be managed in Site Manager -> Development -> Workflows.

 

The workflow you create in this chapter will be used for all examples in the next chapters. It will look like this:

 

Any editor can create a news item in the /News section of the web site.
Then, the news item must be approved by one of the members of the role PR Managers. The users authorized to approve the document in the given step are also authorized to modify the document in the given step.
Approved news item is published on the web site.

 

clip0522

 

Creating testing users and roles

 

Before we configure the workflow, we will create testing users. Go to Site Manager -> Administration -> Users and click New user. Create a new user with following details:

 

User name: Alice
Full name: Alice Murphy
E-mail: <your e-mail>
Enabled: yes
Is editor: yes

 

Go to the Sites tab and assign the user to the appropriate web site.

Go to the Roles tab and assign the user to the CMS Editors role of the given web site.

 

Create another user with following details:

 

User name: Bob
Full name: Bob Johnson
E-mail: <your e-mail - you may want to use a different e-mail>
Enabled: yes
Is editor: yes

 

Go to the Sites tab and assign the user to the appropriate web site.

Go to the Roles tab and assign the user to the CMS Editors role of the given web site.

 

Go to Site Manager -> Administration -> Roles, choose the appropriate site from the top drop-down-list and click New role. Enter the following details:

 

Role display name: PR Managers
Role code name: PRManagers

 

Switch to the Users tab and add user Bob Johnson to this role.

 

As you can see, Alice is the news editor (because of the CMS Editors role) and Bob is the PR Manager who will approve the news (PR Managers role) and can also edit the news (CMS Editors role).

 

 

 

Please note

 

The PR Managers role has no permissions set for the purpose of this example. This means that if a user was a member of only this particular role, she would not be able to perform a full range of tasks such as creating, editing or deleting documents, etc. In your real website, you would probably want to go to Site Manager -> Administration -> Permissions and give the user role appropriate permissions, especially those for Module CMS Content.

 

See also chapter Permissions for modules and documents for detailed information on how to do this.

 

 

Defining a new workflow

 

Go to Site Manager -> Development -> Workflows, click New workflow and enter the following values:

 

Display name: News approval
Code name: newsapproval

 

Click OK to create the workflow.

 

 

Defining workflow steps

 

Choose the Steps tab and create a new workflow step:

 

Display name: Approval
Code name: Approval

 

Click OK and choose the Roles tab in the Workflow properties dialog. Choose the appropriate web site in the drop-down list and select the PR Managers role and click OK. Now the PR Managers are authorized to edit, approve and reject documents in the newly created step.

 

When you see the list of workflow steps now, it looks like this:

 

devguide_clip0391

 

As you can see there are always three default steps:

 

Edit - the first step when the document is created or modified after it was published.
Published - the document is published on the live site. When you edit such a document, it's automatically moved to step Edit.
Archived - the document is not published on the live site, but it remains in the content repository.

 

As you can see, the custom steps are placed between the Edit and Published steps. You can change the order of the steps using the up/down arrows (if there's more than one custom step).

 

Defining workflow scope

 

The workflow scope defines which documents the workflow should be applied to. Switch to the Scopes tab, choose the appropriate web site from the drop-down list and click New workflow scope. Enter the following details:

 

Starting alias path: /news (this is the section of the web site for which the workflow will be applied)
Document type: News
Culture: (all)

 

Click OK.

 

devguide_clip0436

 

We have configured the workflow process for the news documents. In the next chapter, you will learn how the workflow works in our sample scenario.

 

Workflow's documents overview

 

On the Documents tab, you can see a list of documents that are using the workflow. By clicking a document in the list, you will be redirected to the document in CMS Desk -> Edit.

 

The following actions can be performed with actions in the list. These actions are also useful if you want to finish the documents' workflow:

 

Publish and finish workflow - the new version of the document will be approved and published
Remove workflow and keep currently published data - the original version of the document remains published and all the changes will be discarded

 

Based on the selection in the first drop-down list, these actions can be performed for:

 

All documents - the action will be performed with all documents
Selected documents - the action will be performed with documents selected by the check-boxes (Enabled)

 

devguide_clip0437

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?defining_a_workflow.htm