Sharepoint: Creating custom Workflow to approve page or document

One of the common question in the developer community “”how to customize the default approval workflow for page or document from browser?”” I hope, “”This post is related to answer this question””.
When we create a web application or sub site under this web app, by default MOSS creates one default workflow: [Parallel Approval] for the page or document list library but there is no workflow for custom list (document or image) library. You have to set a custom workflow for the custom list library as the same way if you want to create a custom workflow for the page.  
Here, Parallel approval is MOSS standard approving workflow where approval request comes to approver to approver parallely if you added multiple approvers in the Approver group. When designer create or change something and request for publish as major or minor version, If any one of them accept the request then the page or document become publish.  
If the requirement is to customize approval by different level of approver one after another and finally approved and published by the last approver, then it is necessary to add a customize workflow. How is it possible to do that?
  Custom workflow for Approving & Publishing page:
Let’s say, it is necessary to publish page after Creation and Modification using custom workflow among different level of approvers such as first approve by approver 1, then by approver 2 and so on … finally by approver N. 
Solution: You have to make a custom workflow by assigning different level of approver and configuring workflow settings. You have to use the following steps to make custom workflow.
1.      At first, you have to check “Enable user-defined workflow for this site?” is “Yes” or “No’. If “No” then set “Yes” and press OK. 

2.      Go to Customize Page settings by Site Action à Site Settings à Modify Page Library Settings

3.      Go to Workflow Settings under Permission and Management
4.      Remove default workflow by clicking on Remove a workflow or you can keep it if you want to create custom workflow as additional workflow to start manually. But it is better to remove it to understand this example.
5.      Create a new workflow by clicking on Add a workflow
6.      Do the following Configuration
a.      Workflow:         Approval
b.     Name:                 Custom Approval
c.      Task List:            Workflow Task
d.     History List:        Workflow History
e.     Start Option:     Start this workflow to approve publishing a major version of an item.
Note: It means that this workflow will also start for the item created or changed. The first check box (manually started) has to be checked on, if you keep the default workflow (Parallel Approval) as it is. I mean if you do not remove the default workflow.

7.      Press Next
8.      Then Customize Workflow: assign Approvers & you can leave other options as it is for simplicity
9.      Press OK
Your custom workflow should be created now. Now it is ready to test your custom workflow. Do the following steps to test your workflow.
1.      Create or edit a page under this site.
2.      Check-in as major version
3.      You can see the workflow status from the page header by Workflow à View Workflow Status à Custom Approval under Running Workflow
4.      If your workflow is additional with the default or you configured as manually then you have to start it manually from Workflow à Start a Workflow
5.      Anyway, you should see the following screen-shot one after another if there are two approvers according to my example. When first approver Roberto approved the page then you will see the 2nd screen –shot that the request is assign to next approver (administrator).

6.      When Administrator accepts the page the workflow will be completed and status will change from in progress to complete. The page will be visible to all if it is major version.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s