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: https://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: https://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: https://www.wapshere.com/missmiis/teched-demo-3-selectunique-ps1
And here’s a copy of the WFFunctions script I call: https://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: https://www.wapshere.com/missmiis/teched-demo-1-hello-world-script/teched-demo-4-selectunique-cs
Workflow UI class: https://www.wapshere.com/missmiis/teched-demo-4-selectuniqueui-cs
1 Reply to “Scripts and code from my Custom Workflow session at TechEd Australia”
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.