This project is read-only.


SharePoint 2013 doesn’t provide any out of the box Approval or Publishing Approval Workflows as like 2010. Moreover the workflow has been completely re-architectured in 2013 based on CSOM. The Custom workflow provides an option of enabling workflows on any list with a custom association form to configure input parameters and task alert email parameters. The additional highlight is the workflow provides multilingual capabilities. Moreover the publishing approval workflow can be enabled on publishing sites by enabling just one feature. Provides an additional option of configuring the global settings thru a common configuration list.

Upon deployment, the solution enables the following 3 features.

  1. Custom Approval Workflows Infrastructure (Site Collection Scoped)
  2. Custom Approval Workflows Infrastructure (Web Scoped)
  3. Configure Publishing Approval Workflow - For Windows Based Authentication (Web Scoped)

Custom Approval Workflows Infrastructure (Web Scoped)

If you would like to enable workflow on a non-publishing site, this is the only feature you need to activate. The feature basically deploys the Approval Workflow, associated resources and forms. Upon activation you will be able to see the workflow listed on any list workflow settings.

Upon association the workflow does provides an association page 2, where it does provide an option to fill the following parameters.

  1. Approvers
  2. Due duration (days)
  3. Option to end on document change
  4. Option to End on First Approval
  5. Task Title
  6. Task Assignment Email Subject
  7. Task Assignment Email Body
  8. Task Cancellation Email Subject
  9. Task Cancellation Email Body
  10. Task Overdue Email Subject
  11. Task Overdue Email Body

During first time configuration the fields will be filled with default values. If you would like to change the values, please ensure you don’t remove the place holders from the default values.

Upon submission the workflow will be configured on the given list.

Important Note:
Upon association, the following manual steps are required for the workflow to work as expected.

  1. Enable "Workflow 2013 Task" Content Type on Workflow Task list associated with the workflow.
  2. Activate the web scoped feature "Workflows can use app permissions"
  3. Enable permission for the workflow to access the content on the SharePoint.

Custom Approval Workflows Infrastructure (Site Collection Scoped)

Required only when you need to enable publishing workflows. Can be activated only on the Root site collection. Upon activation, the feature deploys a "Workflow Global Settings" list with the following items.

  • ApprovalWorkflowApproversSharePointGroup - Approvers|Administrators
    • Use this entry to configure the default approvers group associated with the publishing approval. The values can be | (or) or & (And) splitter. Can have multiple values. However doesn’t support mixed splitters. (both | and &)
  • ApprovalWorkflowDefaultDurationDays - 7
    • Default number of duration days.
  • EnablePublishingApprovalWorkflowOnLists - Pages, Images, Documents
    • Lists on Publishing site for which the approval workflow needs to be enabled.

Configure Publishing Approval Workflow - For Windows Based Authentication (Web Scoped)

This feature configures publishing approval workflows as per the above configuration settings on a publishing site. Upon activation the feature performs the following actions on the web.

1. Associates the workflow on Pages, Images and Document Libraries.
2. Uses the email templates from resource files.
3. Since SharePoint 2013 supports triggering of workflow only on Item Added, Updated or Manual, there is no option of triggering the workflow on Item Major check-ins, hence the approval action can be handled only thru the event receivers.

  • Associates the following event receivers on the lists to handle all the possible scenarios of approval actions.
    • Item Updating
    • Item Updated
    • Item CheckedIn
  • Approval Actions Supported
    • Approval Override (Direct Approval/Reject) thru ribbon (cancels the in progress workflow)
    • Cancel Approval (Cancels the in progress workflow)
    • Approval/Rejection thru workflow task.

4. Activates the dependency feature - "Workflows can use app permissions"
5. Enables Trust to the workflow - (Automation of enabling permission for the workflow to access the SharePoint)

More Information

Workflow Services WCF Service
The solution includes a WCF service which provides some management capabilities like approval/Rejection. As the 2013 workflows are CSOM based these actions are not possible directly from the workflow. Hence those capabilities are achieved thru the server based services.

Jquery (OpenSource) - Work with your Legal Dept

The solution leverages Jquery to perform some operations on the association form to provide enhanced features.
However the script files are not included as part of the solution.

For the solution, in order to work/behave as expected the following Jquery .js files need to be included in the solution path \layouts\customapprovalworkflow\scripts\ before compilation and deployment.

  1. jquery-1.8.2.js
  2. jquery-1.8.2.min.js

Please check with your legal department before enabling the jquery scripts on the end user solution.

Last edited Sep 11, 2013 at 5:36 PM by thirumurugan, version 3