{"id":2443,"date":"2012-12-11T04:08:33","date_gmt":"2012-12-11T04:08:33","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=2443"},"modified":"2012-12-11T04:08:33","modified_gmt":"2012-12-11T04:08:33","slug":"workflowinstance-could-not-resolve-any-of-the-defined-approvers-workflowdataapproverid","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/workflowinstance-could-not-resolve-any-of-the-defined-approvers-workflowdataapproverid","title":{"rendered":"WorkflowInstance could not resolve any of the defined approvers: &#8216;[\/\/WorkflowData\/ApproverID];&#8217;"},"content":{"rendered":"<p>I&#8217;ve been trying to pass an ObjectID to the Approval activity via a WorkflowData parameter generated in the <a href=\"http:\/\/fimpowershellwf.codeplex.com\/\">FIM PowerShell Activity<\/a>\u00c2\u00a0but I had quite a bit of trouble getting the format right.<\/p>\n<p><!--more--><\/p>\n<p>The <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.resourcemanagement.workflow.activities.approvalactivity.approvers(v=vs.100).aspx\">MSDN doc for the Approvers property<\/a> just says a String is required. I tried returning the ObjectID in both the following string formats:<\/p>\n<p>4d7e5fd1-d004-4b18-88f3-cfd545eaa999<br \/>\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0and<br \/>\nurn:uuid:4d7e5fd1-d004-4b18-88f3-cfd545eaa999<\/p>\n<p>but for both received the &#8220;could not resolve&#8221; error in the title of this post.<\/p>\n<p>In the end I got the tip I needed from <a href=\"http:\/\/social.technet.microsoft.com\/Forums\/eu\/ilm2\/thread\/d0044e68-636e-4705-bc8c-72a2968b3d8a\">Ryan&#8217;s answer to his own forum question<\/a> (can I just say I <em>love<\/em> people who come back and finish up their own questions!) and the PowerShell snippet that got the WorkflowData back in the correct format is:<\/p>\n<p>$fimWF.WorkflowDictionary.Add(&#8220;ApproverID&#8221;,[Microsoft.ResourceManagement.WebServices.UniqueIdentifier]$ApproverID)<\/p>\n<p>where $ApproverID = &#8220;4d7e5fd1-d004-4b18-88f3-cfd545eaa999&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been trying to pass an ObjectID to the Approval activity via a WorkflowData parameter generated in the FIM PowerShell Activity\u00c2\u00a0but I had quite a bit of trouble getting the format right.<\/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":[42,60,23,45],"tags":[],"class_list":["post-2443","post","type-post","status-publish","format-standard","hentry","category-fim-2010","category-fim-2010-r2","category-powershell","category-workflow"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-Dp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2443","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=2443"}],"version-history":[{"count":3,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2443\/revisions"}],"predecessor-version":[{"id":2446,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/2443\/revisions\/2446"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=2443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=2443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=2443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}