Monthly Archives: August 2010

Code and slides for Dev208 at Tech Ed NZ

Here are the slides and demos for the Tech Ed NZ talk Stef and I did on Intro to Workflow 4. It includes the Approval Sample we didn’t manage to fit in. P.S. I know this blog sucks in IE, working on a fix when I get some time. DEV208-GettingStartedWithWorkflow.pptx Intro To WF Demos.zip

0  

Workflow 4: Human based workflows with an Email Approval Sample

One of the questions that a lot of people ask about workflow 4 is how to integrate manual tasks into the workflow process so that humans can be involved and interact with the workflow process. After all, what use is a stateful, long running service if no humans are involved? All of the activities that [...]

3  

Unit Test Workflow 4 Activities : Dependency Injection

At first glance unit testing workflow activities with dependency injection seems like a no-brainer. For example consider the following activity using constructor-based dependency injection. public class SendEmail : CodeActivity { private readonly IEmailClient emailClient; public SendEmail() : this(new EmailClient()) {} public SendEmail(IEmailClient emailClient) { this.emailClient = emailClient; } public InArgument<string> To { get; set; } [...]

4  

Unit Testing Workflow 4 Activities : The TestContext Tracking Participant

I’m a big believer in using TestContext in MSTest or Console.WriteLine, Debug.WriteLine etc in your favourite Unit Testing framework to give context to passed or failed tests. Especially if you do CI and have only the test results to look at from the build server to try to understand why a build went wrong. Taking [...]

0  

Unit Testing Workflow 4 Activities : Basics

Unit testing workflows became a lot easier in WF4. The basic approach is the same as for normal code classes except for a few differences which we will cover in the posts in this series. Lets start off with a simple code activity which will return the time in a given city. public class GetCityTime [...]

1