Creating Custom Actions

Follow these steps to create custom actions and make them available in SharePoint Designer and in the SharePoint solution(s):

Writing your action:
  1. Start writing your action; inherit from the the Activity class
  2. Define your static Dependency Properties that points to your public properties
  3. Override the Execute method
  4. Compile it: MyNamespace.MyActivity
  5. Assign a strong name to your library

Distribute your library:

  1. "GACC" your assembly - or assemblies. Your activity my relay on other assemblies and then these must be added ass well. Add the same assemblies to the SafeControl section in web.config.
  2. Add your library to the authorizedTypes section in the sharepoint application web.config
  3. Make your activity available to SharePoint designer by adding it to the \12\template\1033\workflow\wss.actions file, and placing your action definition inside the Action section
  4. Reset IIS

Of you go:

  1. Open SharePoint designer
  2. Select your activtity and add the defined parameters.
  3. Great!!! .... hopefully ... debug!

Articles with more details:

Possible errors with solutions:


1 comment:

paulshaver said...

This looks like something I need to do, but am not sure.

I've got a News Feature that I need an approval workflow on. The only thing that strays from the out of the box scenario is that I need to allow the user to select an approver from an approver list.