Nick Hadlee's Blog on SharePoint and Other Occasional Rants…

Custom ASPX forms for SharePoint Workflows Part 1
June 27, 2009, 12:34 pm
Filed under: Cutomisation, Development, SharePoint, Workflow

Recently I needed to build a relatively simple notification workflow that included a custom form when the workflow was initially added to a list. In SharePoint workflow terminology, this is called an association form.

Super Quick Forms Overview

This is from the Workflow Forms Overview on MSDN. “[Forms] enable you to make your workflows more dynamic and flexible. Forms enable you to gather information from users at predefined times in the workflow’s life, as well as let users interact with the tasks for that workflow.” That all sounds great so what next?

If you are using MOSS then there are two options; InfoPath or ASP.NET (ASPX forms from now on). If you are using WSS then there is only one option; ASP.NET.

The difference between the two options is the amount of complexity involved to get them working and the level of flexibility each option provides. InfoPath forms are easier to implement but much less flexible. ASPX forms are much harder to implement but provide all the flexibility and robustness of the .NET framework.

Online Help for ASPX Forms Development

Perhaps it is just my search skills but I could find very little good information about how to implement the ASPX forms via the official channels. On MSDN there is a How to: Implement a SharePoint Workflow with ASP.NET Forms article which describes itself as a “high-level description” and also the Developer Introduction to Workflows for Windows SharePoint Services 3.0 and SharePoint Server 2007. A post on the SharePoint Team blog provides some other good overview material but it is still a little light on detail.

With a bit more searching I came across Serge Luca’s 15 part tutorials on workflow – these are not just on ASPX forms but provide examples about all sorts of workflow development tasks. Step 9, step 14 and step 15 are the posts specifically about ASPX forms. Serge’s examples are based on the Collect Feedback Workflow project which is part of the Office SDK (I came across a post by Andy Burns saying they had taken it out of the SDK so he has a link to a version in his post if you need it). Beware that the SDK project has a few bugs in it that need to be fixed.

Serge has also done a series of presentations on Microsoft Belux (a Belgium MSDN resource? I think the homepage is in Flemish but Serge’s presentations are all in English) that map closely to his series of posts.

In part 2 I will describe the notification workflow that I built and post some code examples including the bug fixes needed for the SDK workflow project.

%d bloggers like this: