Monday, November 15, 2010

Custom Workflow for Propercasing

Just finishing up my custom workflow for propercasing text in a workflow for FIM 2010. Below you can see a screenshot of the workflow.

The main purpose of the workflow is to take an input string (could be some FIM 2010 grammar like [//Target/FirstName] [//Target/LastName]) and apply the casing rules specified in the workflow to do propercasing like turning CHRIS O'DONNEL into Chris O'Donnel. The reason why I'm doing this workflow is that I have a lot of customers that use a mainframe for hosting users (HR system) and many of the old mainframe systems will only allow letters in capital - and that doesn't look nice when flowed into Active Directory. Also, just taking the first letter and capitalizing this and lowercasing the rest won't do the trick for a guy like Chris O'Donnell and therefore the workflow has some custom settings for handling this.

The 'Destination' should be either the Target attribute, i.e. [//Target/DisplayName] or a workflow parameter, i.e. [//WorkflowData/ProperlyCasedName].
You're able to specify words that should always be in lowercase, prefixes that will uppercase the following letter and words that should always be in a certain fixed case, like MHz.


If you would like to give it a test run and I'd very much appreciate some feedback for finalizing it. I'll make the released version available as soon as I get some feedback and finish the final testing. If you would like a version, please send me an mail and I'll send you the binaries in a .ZIP-file.

To have the workflow available in the FIM Portal, please follow the section 'Building the Assembly and Loading it into the FIM Portal' in this TechNet article (find it almost at the end of the article).

When creating the new Activity Information Configuration, you'll need this information for the configuration -

Activity Name: Inceptio.FIM.Activities.ConvertToPropercaseActivity
Assembly Name: Inceptio.FIM.Activities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fbba0d5fa1bd8867
Type Name: Inceptio.FIM.Activities.WebUIs.ConvertToPropercaseActivitySettingsPart


I use the following small script for putting the .DLL's into the GAC -

gacutil /i "Inceptio.FIM.Activities.dll"
gacutil /i "Inceptio.FIM.Activities.BuildingBlocks.dll"

Let me know, if you have any problems and I look forward to hear your feedback. Give it a run...