{"id":2676,"date":"2013-09-05T03:04:55","date_gmt":"2013-09-05T03:04:55","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=2676"},"modified":"2013-09-05T20:55:22","modified_gmt":"2013-09-05T20:55:22","slug":"scripts-and-code-from-my-custom-workflow-session-at-teched-australia","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/scripts-and-code-from-my-custom-workflow-session-at-teched-australia","title":{"rendered":"Scripts and code from my Custom Workflow session at TechEd Australia"},"content":{"rendered":"<p>A few people asked for the code in the session today. It&#8217;s all pretty simple but I&#8217;ll included it here with a summary of the demos.<\/p>\n<p>You can watch the session here: <a href=\"http:\/\/channel9.msdn.com\/Events\/TechEd\/Australia\/2013\/ATC421\">http:\/\/channel9.msdn.com\/Events\/TechEd\/Australia\/2013\/ATC421<\/a><\/p>\n<p><!--more--><\/p>\n<h3>PowerShell Activity<\/h3>\n<p>The first half of the session demo&#8217;d the PowerShell activity (<a href=\"http:\/\/fimpowershellwf.codeplex.com\/\">http:\/\/fimpowershellwf.codeplex.com\/<\/a>).<\/p>\n<p>I started with the classic &#8220;Hello World&#8221; written to a text file and the event log: <a href=\"https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\">https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script<\/a><\/p>\n<p>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: <a href=\"https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\/teched-demo-2-script-using-workflowdata\">https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\/teched-demo-2-script-using-workflowdata<\/a><\/p>\n<p>Then a slightly more realistic example &#8211; selecting a unique value from a series of &#8220;OptionN&#8221; WorkflowData parameters: <a href=\"https:\/\/www.wapshere.com\/missmiis\/teched-demo-3-selectunique-ps1\">https:\/\/www.wapshere.com\/missmiis\/teched-demo-3-selectunique-ps1<\/a><\/p>\n<p>And here&#8217;s a copy of the WFFunctions script I call: <a href=\"https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\/teched-demo-2-script-using-workflowdata\">https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\/teched-demo-2-script-using-workflowdata<\/a><\/p>\n<h3>Coded Activity<\/h3>\n<p>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.<\/p>\n<p>I should add that this is a very simple activity with no error checking or logging &#8211; you are of course encouraged to add these to your code.<\/p>\n<p>Workflow activity class: <a href=\"https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\/teched-demo-4-selectunique-cs\">https:\/\/www.wapshere.com\/missmiis\/teched-demo-1-hello-world-script\/teched-demo-4-selectunique-cs<\/a><\/p>\n<p>Workflow UI class: <a href=\"https:\/\/www.wapshere.com\/missmiis\/teched-demo-4-selectuniqueui-cs\">https:\/\/www.wapshere.com\/missmiis\/teched-demo-4-selectuniqueui-cs<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few people asked for the code in the session today. It&#8217;s all pretty simple but I&#8217;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<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[33,60,23,45],"tags":[],"class_list":["post-2676","post","type-post","status-publish","format-standard","hentry","category-conferences","category-fim-2010-r2","category-powershell","category-workflow"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-Ha","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=2676"}],"version-history":[{"count":3,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2676\/revisions"}],"predecessor-version":[{"id":2696,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2676\/revisions\/2696"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=2676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=2676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=2676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}