Publishing a Custom Work Flow Activity to FIM 2010: Step-by-step

I have had a couple of newer FIM consultants ask me how to "get their custom activities into FIM". Having not found a relatively concise AND comprehensive blog entry on it, I thought I'd put one together.

You must do the following to upload a custom activity to the FIM Portal and configure it so that it appears in the Workflow Designer:

STEP I: Sign the assembly that contains your work-flow activity with a strong name.

Since many FIM guys come from an infrastructure background (opposed to an AppDev one), below are the steps on how to this

How to do this:

  1. Right click on your project file within the solution. Select Properties
  2. Select the Signing tab
  3. Check the box next to Sign the Assembly
  4. From the drop-box, select New
  5. Provide a Key file name. I like to use the name of my assembly, but whatever will do
  6. If you wish to prevent anyone from signing the assembly, make use of the password fields
  7. Close the properties window
  8. Build the assemblies
  9. You're done! You now your assembly has a strong name!

STEP II: Install the assembly to the Global Assembly Cache (GAC) on FIM Service server.

For those Non-DevHeads, there are three ways to do this. I am only going to cover the way I like to do it, which is through the GACUtil tool, but if you want to know the other ways. You can find them here: How to: Install an Assembly into the Global Assembly Cache

How to do this:

  1. Open up the Visual Studio Command Prompt
    (i.e. Start --> All Programs --> Visual Studio --> Visual Studio Tools --> Visual Studio Command Prompt)

    (or if you don't have Visual Studio installed on that server)

    Open a command prompt with administrative rights and execute the following command:
      

    2. Run the following command:
    "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil" /I <Full path and name to your signed assembly>

    3. Open up windows explorer or a command prompt with admin rights and copy your assembly to:
    "C:\Windows\Assembly"

STEP III: Gather your Assembly information

How to do this:

  1. Using Windows explorer, navigate to C:\Windows\Assembly
  2. Right click on your assembly and write down the Name, Version, Culture, and PublicKeyValues values.

STEP IV: Start and stop the FIM Service.

How to do this:

If you need help with this, then stop what you are doing immediately ;-)

STEP V: Create an Activity Configuration Information resource that references the activity.

How to do this:

  1. Log into the portal with a FIM Administrator account
  2. Go: Administration --> All Resources --> Active Information Configuration
  3. Click New
  4. On Common Attributes tab, enter in the following fields
    1. Description - Give it a nice description of what it does
    2. Display Name - Likewise, give it a nice name to be displayed
  5. On the Extended Attributes tab, enter in the following fields
    1. Activity Name - Enter in in the EXACT name space of the activity
      (e.g. FIM.CustomWorkflowActivitiesLibrary.Activities.RequestLoggingActivity)
    2. Assembly Name - Enter in the full assembly name, including the Version, Culture, and PublicKeyValues as described in the GAC. Use the following format:
      <Name value>, Version=<value>, Culture=<value>, PublicKeyToken=<value>
      (e.g. LoggingActivitiesLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2j3j93m33sm2mi923)
    3. Type Name - Enter in the EXACT name space of the class that implements IActivitySettignsPart
    4. Is Authentication Activity - Check it if this activity should be available in Authentication workflows.
    5. Is Authorization Activity - Check it if this activity should be available in Authorization workflows.
    6. Is Action Activity - Check it if this activity should be available in Action workflows.
  6. Click Submit

STEP VI: Reset IIS

And that is it... All things considered, not too bad.