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.
- Custom Approval Workflows Infrastructure (Site Collection Scoped)
- Custom Approval Workflows Infrastructure (Web Scoped)
- 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.
- Due duration (days)
- Option to end on document change
- Option to End on First Approval
- Task Title
- Task Assignment Email Subject
- Task Assignment Email Body
- Task Cancellation Email Subject
- Task Cancellation Email Body
- Task Overdue Email Subject
- 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.
Upon association, the following manual steps are required for the workflow to work as expected.
- Enable "Workflow 2013 Task" Content Type on Workflow Task list associated with the workflow.
- Activate the web scoped feature "Workflows can use app permissions"
- 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)
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
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.
Please check with your legal department before enabling the jquery scripts on the end user solution.