To create a reusable workflow, the site that will house the workflow must be opened from SharePoint Designer 2010, and then the workflow is designed, tested, and published to the site. It can then added to a list or library on that site and is then ready for use. The following example creates a reusable workflow that is triggered whenever the word “rush” is found in the title field of a document. The application in this example is a collaboration site where managers (User1 and User2) need to review and provide feedback on documents in different libraries before they can be released to marketing. Complaints had occurred before when User1 and User2 weren’t responsive enough, so the workflow was created. If a user thinks his or her document deserves “rush” status, he or she simply needs to add that text to the title field, and the workflow will initiate, and User1 will be informed of the task, and once he completes it, User2 will be assigned a task. Auditing information will track the responsiveness of both User1 and User2.
This workflow takes advantage of the Start Feedback Process action in SharePoint Designer 2010, which contains the logic and functionality of the Collect Feedback workflow that is a standard workflow in SharePoint Server 2010. So, this is an example of a workflow within a workflow that enables even relatively novice workflow designers to take advantage of the standard workflows provided out of the box.
Follow these steps to open a SharePoint 2010 site and create this site workflow:
Figure 28.13. Opening a site from Designer 2010.
Figure 28.14. Naming the Reusable workflow in Designer 2010.
Reusable Workflow – Rush in Title
, and a description if desired. In this case, the description is entered as follows: This workflow will escalate any item with 'rush' in its title
. Leave Content Type set to All, and click OK.if current
and press Enter; Designer will determine that you want to enter If current item field equals value. Alternatively, you can click the Condition button and choose If Current Item Field Equals Value.rush
and press Enter. The results will look like Figure 28.15.
Figure 28.15. Setting conditions for the workflow in Designer 2010.
Start feedback
and press Enter. Designer 2010 will interpret this to mean Start Feedback Process. The results will be the same as Figure 28.16. This action effectively imbeds a Collect Feedback workflow within this Reusable Workflow, which provides significant functionality within the workflow, as will be demonstrated upon completion of the workflow.
Figure 28.16. Workflow action after adding Start Feedback process in Designer 2010.
User1;User2
in this example). Leave One at a Time (Serial) selected in the field to the right of Participants.Rush Item Escalated
.This item's title contained the word 'rush' and so has been escalated for review and processing
.Figure 28.17. Defining participants in the Start Feedback Process action in Designer 2010.
In this next section, the workflow will be initiated, and started, to display the functionality without completing the entire workflow. To test the workflow, follow these steps:
Figure 28.18. Choosing and configuring the workflow from Library Settings.
Rush in Title Workflow Automatic
).rush
to the Title field, and save.Figure 28.19. Email informing document owner of workflow start.
Figure 28.20. Email informing workflow participant of workflow
The rest of the workflow won’t be covered here, but it gives User1 a change to provide feedback on the document and then once approved, a task will be created for User2 and that user will be given a chance to provide feedback.