Scripts and code from my Custom Workflow session at TechEd Australia

A few people asked for the code in the session today. It’s all pretty simple but I’ll included it here with a summary of the demos.

You can watch the session here:

PowerShell Activity

The first half of the session demo’d the PowerShell activity (

I started with the classic “Hello World” written to a text file and the event log:

Next we improved this script to write the Request details to the text file, and to use a WorkflowData parameter in an event log message:

Then a slightly more realistic example – selecting a unique value from a series of “OptionN” WorkflowData parameters:

And here’s a copy of the WFFunctions script I call:

Coded Activity

The coded activity was essentially the same as the Select Unique PowerShell script. I showed how you could use the RequestLoggingActivity from the MSDN walkthrough as a starting point to developing it.

I should add that this is a very simple activity with no error checking or logging – you are of course encouraged to add these to your code.

Workflow activity class:

Workflow UI class:



1 Reply to “Scripts and code from my Custom Workflow session at TechEd Australia”

  1. Hello Carol, was watching your channel 9 demo of custom workflow, and trying to write the code while you copy/pasted it in your demo. I was never able to get it right! Luckily I found the code here. Thanks for everything you share with the community.


Leave a Reply

Your email address will not be published. Required fields are marked *