Custom Activity not working in SharePoint Designer

I have recently been working on some custom workflow activities for use in a SharePoint application we are building. The aim is to surface these in SharePoint Designer (SPD) as a set of reusable workflow components. The process of building and deploying an activity from Visual Studio (in this case 2005) is quite well documented on MSDN and in blogs like Todd Baginski’s. There are also some useful open source custom activities on CodePlex as well. With a broad bush the steps are:

  1. Create the custom activity;
  2. Register the activity dll in the GAC on the SharePoint server;
  3. Register the activity dll in the <authorizedTypes> section of the web.config on the SharePoint server;
  4. Register the activity for use in SharePoint Designer via the wss.actions file on the SharePoint server;

I created my activity as described and was able to compile it without error. I could load it into a Workflow project in Visual Studio 2005, drop it onto the workflow design surface and promote the properties correctly so the activity itself seemed to be correct. My problem was that after following the instructions for making it available in SPD I couldn’t utilise it in a workflow. This was symptomised by the fact that after creating the new workflow when I open the available Actions I can see my custom activity but once I select it and add it to the workflow nothing happens, it just doesn’t appear in the workflow designer. There are no errors and nothing I can see that provides any clues to what is happening.

After stepping through the entire process a number of times and verifying I had configured everything correctly I still didn’t have a clue what the problem was. I downloaded a CodePlex custom activity that had plenty of feedback about how good it was and tried loading that and still had the same behaviour.

Finally I sorted out where the problem was. It turns out that I hadn’t registered the activity in the correct web.config on the SharePoint server. My development site was running on a specific port (5050) and I hadn’t taken this into account when locating the web.config to update. I should have been updating C:\Inetpub\wwwroot\wss\VirtualDirectories\5050\web.config. Once I did this I was able to add the custom activity to the workflow designer in SPD with out a problem and continue building my workflow.


Leave a comment

Filed under Microsoft Office Sharepoint Server 2007

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s