Thursday, April 30, 2009

Henrik Nilsson's RegexReplaceActiviy

Henrik just made a great post about his RegexReplaceActivity. In it, he shows you how to capture the power of regular expressions (pun intended :).

While you're developing and tuning your regular expressions, it's handy to have a quick way to test them. I'd like to point you to a phenomenal online resource for testing regex patterns:

If you paste Henrik's sample regex pattern into the site, and then type a date into the text box, it'll highlight the pattern that's matched. Then, if you hold your mouse over the highlighted pattern, it'll show you the groups that are captured. Instant gratification!

Tuesday, April 28, 2009

How to use EnumerateResourcesActivity in RC0

Last week during my webinar, I wasn't sure how to use the EnumerateResources or EnumerateResourceIteration activities. I thought I'd tie up some loose ends and try to crack this case. Thanks to Henrik and Nima, I was able to get the EnumerateResourcesActivity to work. Turns out that the Iteration activity will be removed from RTM.

Per Henrik's advice, EnumerateResources has the wrong designer, so when you add the activity to a custom workflow, you'll notice that it's closed and you can't add any children to it.

You can work around this by opening the Designer.cs file and adding a code activity to it manually. First, add a CodeActivity to the class:

private CodeActivity codeActivity1;

Next, add the code activity to EnumerateResources in InitializeComponent, before the last line, "this.CanModifyActivities = false;".

#region Workaround
this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
// codeActivity1

this.codeActivity1.Name = "codeActivity1";
this.codeActivity1.ExecuteCode += new System.EventHandler(this.logIteration);


Then, create a "logIteration" method in your main class file, and call the GetCurrentIterationItem method from EnumerateResources:

private void logIteration(object sender, EventArgs e)
// Log the Resource properties to a string
StringBuilder buffer = new StringBuilder();
buffer.AppendLine("TotalResultsCount : " +

ResourceType currentItem = EnumerateResourcesActivity.GetCurrentIterationItem(
(CodeActivity)sender) as ResourceType;

if (currentItem != null)
// Resource properties
foreach (KeyValuePair<string, ResourcePropertyInfo> property in currentItem.ResourceProperties)
// Attribute name
// Attribute type
// Value
object val = currentItem[property.Key];
if (val != null)

// Finally, do something with the log message
string output = buffer.ToString();

That's it. Don't forget to bind the XPathFilter property on the EnumerateResourcesActivity. Perhaps I'll add an example to our activity library.


Friday, April 17, 2009

ILM 2 password client install snafu

I encountered the following error while attempting to install the password reset client from the ILM 2 program folder (C:\Program Files\Microsoft Identity Management\Web Portals\WSSDir\PasswordManagementClient\ilm-client.msi). I couldn't find much help from an internet search, but David Lundell pointed out my problem. It was a silly but honest mistake, so I thought I'd document it.

Office integration requires Smart Tags .Net Programmability Support. Please install it from the Office CDs (under Office Tools) and try again.

It turns out that, in my haste, I had selected all the defaults of the installation, which is an honest mistake. Since I was installing this on the dev server box for testing, I didn't have Office installed, yet I left the Office Integration component selected for install. The simple answer is to deselect this option during install.

Hope this helps!

ILM2/FIM Custom Workflow Development Webinar

I'll be hosting a webinar geared toward development next week. Please attend and bring your burning questions!


Thursday, April 23rd


(LiveMeeting links will be
sent to all registrants)

Joe Zamora, Ensynch Senior Developer, Identity and Access Management

9am-10am Pacific/Arizona
10am-11am Mountain
11am-12pm Central
12pm-1pm Eastern


Custom Workflows in Identity Lifecycle Manager "2" - Ask the Experts!

You’re invited to attend an informational webinar and technical overview of custom workflows, features and functions available in Identity Lifecycle Manager “2” (ILM 2). This webinar is designed for technical experts who want to gain an understand of the features and benefits of ILM 2 custom workflows to achieve information technology operational efficiency. ILM 2 will dramatically change the way organizations manage information. There is a lot to be excited about, and a spectrum of new features that you’ll need to understand to intelligently discuss how it will impact your business.

Ensynch is proud of our world-class Identity and Access Management practice, led by David Lundell, Brad Turner, both Microsoft MVPs for ILM, along with Joe Zamora, Senior Developer. This team's efforts have earned Ensynch back to back Microsoft World-Wide Partner Awards for Identity Management in 2007 and 2006. Take advantage of this opportunity to learn from their vast enterprise and mid-market experience in incorporating Best Practices in assessing, planning, deploying and managing highly efficient environments with the latest technologies.


ILM “2” Custom Workflow Overview (25 min)
• Motivation
- Out-of-box toolset
- Challenges

• Resources
- Connect
- Community content, contributions and resources

• Tools
- Visual Studio workflow designer
- Building block activities
- Public Resource Management Client
- Hidden gems

Demo (25 min)
• Ensynch ILM “2” Activity Library
- Update Attribute Activity
- Owner Rollup Activity
- Generate OID Activity

Question & Answer (10 min)

(Register Now)


Source code posted

We've finally posted the source code to Brad Turner's TEC 2009 workshop. Sorry for the delay; project deliveries are always getting in the way; you know how it goes.

ILM 2 RC0 Ensynch Custom Workflow Activity Library

And a few screen shots for you...

Sorry for the lack of description on these, but I'll be hosting a webinar on them next week. More details on that coming soon...