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:
- Right click on your project file within the solution. Select Properties
- Select the Signing tab
- Check the box next to Sign the Assembly
- From the drop-box, select New
- Provide a Key file name. I like to use the name of my assembly, but whatever will do
- If you wish to prevent anyone from signing the assembly, make use of the password fields
- Close the properties window
- Build the assemblies
- 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:
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:
- Using Windows explorer, navigate to C:\Windows\Assembly
- 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:
- Log into the portal with a FIM Administrator account
- Go: Administration --> All Resources --> Active Information Configuration
- Click New
- On Common Attributes tab, enter in the following fields
- Description - Give it a nice description of what it does
- Display Name - Likewise, give it a nice name to be displayed
- On the Extended Attributes tab, enter in the following fields
- Activity Name - Enter in in the EXACT name space of the activity
(e.g. FIM.CustomWorkflowActivitiesLibrary.Activities.RequestLoggingActivity) - 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) - Type Name - Enter in the EXACT name space of the class that implements IActivitySettignsPart
- Is Authentication Activity - Check it if this activity should be available in Authentication workflows.
- Is Authorization Activity - Check it if this activity should be available in Authorization workflows.
- Is Action Activity - Check it if this activity should be available in Action workflows.
- Activity Name - Enter in in the EXACT name space of the activity
- Click Submit
STEP VI: Reset IIS
And that is it... All things considered, not too bad.