Approval by Location
Good morning all! I am working on setting up the approval process for new account creation within the Portal. Right now each user's location code is stored in an attribute called "location" on each user object. What I need to do is ask for approval based on this value. For each location there is a "Approvers Group". Ideally, I'd like to use the built-in Approval Workflow for this and do something like match the location value on the Target with the location value on the Group in order to determine who to ask for approval. After some research and testing, it looks to me like I'm going to need a custom workflow activity to provide the "location" data to the existing approval workflow. Is there any way around this? I don't want to include custom code if it isn't neceissary. I have been exploring an XPATH query to accomplish this. Something like: /Group[/location=[//Target/location]] but of course, this is not working. It seems the XPATH functionality (or data exposed to the workflow) is limited with the out-of-the-box approval workflow. Any thoughts, suggestions, or help is appreciated. Thanks! -Ryan
July 27th, 2010 6:21pm

What about using the Function Evaluator in the first step of the workflow to grab the location attribute from the Target and then using that value to build the name of the "Approvers Group" and passing it as workflowData? I've tried this, but get an error when I submit the request. "WorkflowInstance 'GUID' could not resolve any of the defined approvers '[//WorkflowData/TargetApprovers];'" where "TargetApprovers" is what I was using to pass the displayname of the "Approvers Group". I suspect the problem here is that I'm not passing the GUID of the Group, however I don't see anyway to accomplish this lookup (Displayname to GUID). Thoughts, suggestions, or help is appreciated. Thanks! -Ryan
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2010 12:14am

It sounds like you want to make the approval dependent upon the requestors location. To do so you will need to create a policy for each requestor group and then quantify the requestors into sets based on location. Each custom policy would call the appropriate WF to request approval from the proper group. A request policy requires: Requestor set - you will need one set per policy for each location (/Person[location='foo']) Action Type - Create Resource Current set - a set containing new people although you could use 'all people' here or make something more specific Action Parameter - All Attributes, or a set of attributes that are required during creation to be present before the policy is triggered AuthZ WF - add your approval WF here You would have to use a request policy and not a transition policy since you intend to use AuthZ WF. Hope that helps...Brad Turner, ILM MVP - Ensynch, Inc - www.identitychaos.com [If a post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of that post. By marking a post as Answered or Helpful, you help others find the answer faster.]
July 29th, 2010 6:34am

Brad, Thanks for the response! I was hoping to get away with 1 "Ask for Approval" MPR, 1 AuthZ Approval WF, a Set for each location's Requestors, and a DL for each location's Approvers. It sounds like I'll need an MPR as well as an AuthZ Approval WF for each location as well. I don't see anyway around per location MPR's as you've suggested, but as for the AuthZ WF, I can pull the location from the Request and pass it to the workflow. I can even build the correct DisplayName of the DL that should be set as Approvers, and pass that to the workflow. However, I get an error that the WorkflowData I've passed can't be resolved. My assumption is that this sort of thing would require the ObjectID of the Approvers DL to be passed, and I don't see anyway to accomplish this lookup without a custom WF. I just want to understand all the options as I learn this new system. Thanks! -Ryan
Free Windows Admin Tool Kit Click here and download it now
July 29th, 2010 4:14pm

I've successfully built my custom workflow activity to lookup and pass the ObjectID for the Group that I'd like to ask for approval, however I'm receiving the same "WorkflowInstance could not resolve any of the defined approvers" error that I did earlier. Is it possible to pass an approvers value via Workflowdata to the Appraval workflow activity? If so, what value needs passed? It would seem that neither DisplayName nor ObjectID work. Is what I'm attempting just not possible? If not, then why provide a "Lookup" button to allow me to specify a Workflowdata value as approver? Any thoughts or suggestions are appreciated. Thanks! -Ryan
August 11th, 2010 12:58am

The GUID format that the activity uses has some additional prefixe data you may be missing. I think it's uuid:<guid> so you may just have a formatting issue. You will also need to make sure that the type is correct, if you're passing a String with the GUID value then that could also be the isssue. The Approval activity may be expecting a reference type.Brad Turner, ILM MVP - Ensynch, Inc - www.identitychaos.com [If a post helps to resolve your issue, please click the "Mark as Answer" or "Helpful" button at the top of that post. By marking a post as Answered or Helpful, you help others find the answer faster.]
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2010 10:10pm

Brad, Thanks again for the response! Good call on the attribute type. Instead of passing a string with the ObjectID, I used type "Microsoft.ResourceManagement.WebServices.UniqueIdentifier" and it worked like a charm. Thanks! -Ryan
August 12th, 2010 12:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics