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: http://channel9.msdn.com/Events/TechEd/Australia/2013/ATC421
The first half of the session demo’d the PowerShell activity (http://fimpowershellwf.codeplex.com/).
I started with the classic “Hello World” written to a text file and the event log: http://www.wapshere.com/missmiis/teched-demo-1-hello-world-script
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: http://www.wapshere.com/missmiis/teched-demo-1-hello-world-script/teched-demo-2-script-using-workflowdata
Then a slightly more realistic example – selecting a unique value from a series of “OptionN” WorkflowData parameters: http://www.wapshere.com/missmiis/teched-demo-3-selectunique-ps1
And here’s a copy of the WFFunctions script I call: http://www.wapshere.com/missmiis/teched-demo-1-hello-world-script/teched-demo-2-script-using-workflowdata
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: http://www.wapshere.com/missmiis/teched-demo-1-hello-world-script/teched-demo-4-selectunique-cs
Workflow UI class: http://www.wapshere.com/missmiis/teched-demo-4-selectuniqueui-cs