Wednesday, June 27, 2007

Habits of Speech

Ever noticed that some people, when speaking, tend to use the same phrases or words over and over? It's like, they just keep repeating it, to the point where it becomes quite distracting while you listen.

It's like, do these people even know they are doing it? It's like, should I maybe mention it in case they just don't know? And I start to wonder, it's like, do I do something like that? It's like, are people staring at me while I talk, wishing I would stop saying whatever it is that I have formed a habit of saying?

I don't know the answer, but I do know that, it's like, quite distracting to be watching a webinar hosted by someone who is afflicted with this behavior. It's like, great webinar, fantastic topic, but it's like, I can't stay focused. It's like, I'm sorry.

Friday, June 22, 2007

Exception Handling in a State Machine Workflow

I was working with a Windows Workflow Foundation State Machine workflow this morning and came across an EventDrivenActivity that included a CallExternalMethodActivity. The CallExternalMethodActivity activity allows for the workflow to call a method on an external service running within your workflow runtime.

In this case, the method being called was utilizing a Try/Catch block that simply threw away all exceptions. I implemented some quick logging in the Catch section but also realized that the workflow should probably move to a different state if an exception were to actually occur. So I threw the exception up and started looking at the Workflow Designer and the VS2005 Toolbox to see how to go about catching it.

Interestingly, the solution is easy, but not all that obvious. There is a FaultHandlerActivity, which I quickly spotted and tried to drag onto the workflow. It wouldn't let me stick it anywhere, so I inspected the properties of the different activities already on the workflow for anything that seemed like it might relate to exceptions. Looks like I'd need some help on this one.

So as usual I called my Dad. He's sort of a 51 year-old Casanova, he said "Son, come on over"...

Oops sorry, slipped into Fresh Prince mode for a sec.

Anyways, I did some MSDN reading and some Googling, and discovered that if you enter the detailed view for an EventDrivenActivity (by double-clicking on it in the main workflow view), and right-click the overall EventDrivenActivity object, you get some options I did not know existed:

By selecting the Fault Handler View you are then taken to a different view of the activity where you can drag FaultHandlerActivities and specify which Exceptions to handle and what order they should cascade (similar to how a TryCatch works). You can then drop other activities into each FaultHandlerActivity to perform the actions you want.

In the picture below, I chose to terminate the workflow instance and track the error message to the tracking store.

Thursday, June 21, 2007


Did you know baboons are really ugly? Seriously, Google Image Search those things, not a pretty sight.

Code Hound would have been so much cooler. Jeremy came up with it in like 3 seconds.


URL's are shrinking, man, and I don't wanna swim

In creating a blog, one of the first things you need is a URL. I think I tried about 40 URL's, some basic, and some 'witty'. Each time I received "Sorry, this blog address is not available". Ugh.

I started to check out what people were doing with those URL's, and discovered that a vast majority are either completely empty, or haven't been updated in 5+ years. Just a bunch of used-up URL's, wasting away while the internet marches tirelessly onward, churning out new and even dumber URL's than the ones that came before.

So with this knowledge, I'd like to apologize in advance to whoever is looking for in the year 2013. I'm no better than every other sheep before me. Baa.