Custom Workflows with SharePoint Designer


Although the templates you’ve seen thus far are quite useful for most processes your organization may have, you may find you need a workflow process that closely matches a unique business activity. You can do this using the SharePoint Designer application. This requires you to download the .NET Framework 3.0 from the Microsoft site. This framework features the Windows Workflow Foundation elements required to create a custom workflow solution.

For example, in the following Try It Out, you find there is no easy way to transition an advertising concept to production material. You therefore need to create a new column in the document library to flag client-approved concepts that are ready to become production material. Rather than create a custom view that flags items, you decide it’s easier to copy the documents directly into the document library that stores production materials. From there, you can launch other SharePoint workflow processes, such as translation management.

Try It Out-Create a Custom Workflow Solution in SharePoint Designer

image from book

For this example, you need to create a process to promote a concept document to a production material. You use SharePoint Designer with its easy-to-use wizard tool to create a custom workflow to first copy the approved concept material from the concept library to the production library, and then notify account managers of the update. SharePoint populates the document’s name in the message area of the automatically generated email message. This makes it easier for the account managers to identify what content they need to convert. You can add more lookup fields to include a direct link to the library so users can jump directly to the item from their email message. When you finish creating the workflow, you upload it to the Advertising site and associate it with the Advertising Concept document library. From there, you can run the process by creating a new document, setting the Production material column to Yes and launching the workflow.

  1. From the Advertising Concepts document library, choose Settings image from book Create Column.

  2. Enter Production Material for the column name.

  3. For column type, select Choice.

  4. Enter Yes and No as choice values.

  5. Select Radio Buttons as the display choice.

  6. Set the default value to No.

  7. Click the OK button. You are returned to the Advertising Concepts document library.

  8. Open SharePoint Designer.

  9. Select File image from book Open Site.

  10. Enter the URL of the advertising team site.

  11. Select File image from book New image from book Workflow as shown in Figure 5-30.

    image from book
    Figure 5-30

    Tip 

    Note if you do not see the Workflow option in your menu, you may need to download and install the .NET Framework 3.0 from the Microsoft site.

  12. Name your workflow Production Material Promotion.

  13. Select the Advertising Concepts library for the list to which the workflow should be attached.

  14. Click the Next button. The Workflow Designer window changes, as shown in Figure 5-31.

    image from book
    Figure 5-31

  15. For Step Name, enter Copy Document to Production Library.

  16. Select Conditions image from book Compare Advertising Concepts field.

  17. Click the field link and select Production Material.

  18. Select the value field as shown in Figure 5-31, and select Yes.

  19. Select Actions image from book Copy List Item.

  20. Click the first This List link. Select Current Item as shown in Figure 5-32, and click the OK button.

    image from book
    Figure 5-32

  21. Click the second This List link. Select the Advertising Materials library.

  22. Select the Add Workflow Step link.

  23. For Step Name, enter Notify Account Managers.

  24. From the Actions menu, select Send an Email.

  25. Select the This Message link.

  26. Click the address book to the right of the To field.

  27. Select the Approvers group and click the Add button.

  28. Click the OK button.

  29. For Subject, enter the following:

    Important  

    New Advertising Material Available

  30. Click in the message body window and select the Add Lookup to Body button.

  31. For Source, select Current Item, and for Field select Name.

  32. Click the OK button.

  33. Enter the following message after the lookup field as shown in Figure 5-33.

    image from book
    Figure 5-33

    Important  

    has been added to the Advertising Materials library for your use.

  34. Click the OK button.

  35. Click the Finish button.

  36. To test your workflow, create a new document in the Advertising Concepts library and set the Production Material field to Yes. Then from the workflow menu, select the Production Material Promotion workflow and click the Start button.

image from book




Beginning SharePoint 2007. Building Team Solutions with MOSS 2007
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 (Programmer to Programmer)
ISBN: 0470124490
EAN: 2147483647
Year: 2007
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net