Additional Ribbon Sample: Custom Ribbon Tab generated by a delegate control that lists all associated list workflows and allow to start a workflow on a selected list item. (Part 3)

In the last weeks I’ve extended the sample project that I’ve created for “Ribbon Customization”. You find the project source code on Codeplex:

The related articles on my blog are:


I’ve created a new feature for my sample project: With a delegate control a Ribbon tab will be created dynamically on list view pages if there are workflows associated with the list. For every associated workflow a button will be created. -  But only for workflows that can be started manually.

To use the demo follow these steps:

1. Create a sharepoint site http://sharepoint.local/sites/ribbon.

2. Download the project from codeplex and deploy it.

3. Create one ore more workflows on the Shared Documents library at http://sharepoint.local/sites/ribbon using SharePoint Designer 2010. (I just added two list workflows on Shared Documents and added a simple “Add Comment” step to both of them.)

4. Open the document library. Upload at least one document. You get:

image

You see the “Workflows” tab Smile ??

image

OPEN IT!!

The dynamically generated workflow buttons are disabled!

image

NOW SELECT THE DOCUMENT!!

Now the workflow buttons are enabled!

image

CLICK ONE WORKFLOW BUTTON!!

You get a result window:

image

(It can contain an error message if one occurred.)

 

THAT’S ALL.

Next steps:

  • An error occures if the workflow is already associated with the item. It would be possible to create a server request while “enable check” to check on the server whether the workflow is already associated to the item.
  • Tests. Tests. Tests. => It’s not in a stable state!!

Leave a Reply

Your email address will not be published. Required fields are marked *