I’ve been trying to pass an ObjectID to the Approval activity via a WorkflowData parameter generated in the FIM PowerShell ActivityÂ but I had quite a bit of trouble getting the format right.
The MSDN doc for the Approvers property just says a String is required. I tried returning the ObjectID in both the following string formats:
Â Â Â and
but for both received the “could not resolve” error in the title of this post.
In the end I got the tip I needed from Ryan’s answer to his own forum question (can I just say I love people who come back and finish up their own questions!) and the PowerShell snippet that got the WorkflowData back in the correct format is:
where $ApproverID = “4d7e5fd1-d004-4b18-88f3-cfd545eaa999”
2 Replies to “WorkflowInstance could not resolve any of the defined approvers: ‘[//WorkflowData/ApproverID];’”
I had this challenge too, your post helped for single value. For sending notification to multiple recipients, the syntax was a little different.
In addition to your above example, I found the below works for setting single-valued:
$ApproverID = [Microsoft.ResourceManagement.WebServices.UniqueIdentifier]”4d7e5fd1-d004-4b18-88f3-cfd545eaa999″
For multiple recipients, I found the following syntax was needed:
[Microsoft.ResourceManagement.WebServices.UniqueIdentifier] $ApproverID = “00000000-0000-0000-0000-000000000000”
$ApproverID += “4d7e5fd1-d004-4b18-88f3-cfd545eaa999”
$ApproverID += “e05d1f1b-3d5e-4014-baa6-94dee7d68c89”
Either way then allows the setting of the workflowdata attribute with:
Thanks for that Brian – I’m sure it’s only a matter of time before I’ll need to send multiple approvers too!