New manager approval
I am trying to create an authorization workflow, to be triggered when the manager of a user changes. I wnat the workflow to ask for approval of the new manager. I added an Approval activity and configured the Approvers field as [//Target/Manager] , but in this way it is the old manager that is asked for approval. How should I configure the Approvers field? Thanks, Paolo Paolo Tedesco - http://cern.ch/idm
January 21st, 2010 6:04pm

I did this for a customer...You need to use a custom workflow activity to pull the new manager off of the request and pass it as workflow variable [//WorkflowData/OldMgr]....EricEric
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2010 8:20pm

Hi Eric, thank you very much for your answer! Really there is no built-in mechanism to get the parameters of the request in the approval activity? If someone has to approve the modification request, shouldn't he then be able to see the parameters of the object after the modification? PaoloPaolo Tedesco - http://cern.ch/idm
January 22nd, 2010 12:51pm

No, unfortunately you can't do a lookup on it as far as I know... I think because the request parameters (where the changed attribute is stored) would be variable... I'm considering writing a simple reusable workflow activity to retrieve an attribute from the request (which one would be set in the UI) and publish it as a Workflow Variable (again defined in the UI) for just such a situation... EricEric
Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2010 5:12pm

Hi Eric, thank you very much. How do you set a workflow variable from an activity code?Paolo Tedesco - http://cern.ch/idm
January 25th, 2010 7:23pm

Here is a code snippet to create a multi-valued vlaue in the workflow dictionary that I use for setting a list of approvers in a workflow: SequentialWorkflow parentWorkflow = null; if (!SequentialWorkflow.TryGetContainingWorkflow(this, out parentWorkflow)) { throw new InvalidOperationException("Cannot identify parent workflow!"); } Dictionary<string, object> returnValue = new Dictionary<string, object>(); if (resolveGrammarActivity1.ResolvedExpression != "") { System.Diagnostics.EventLog.WriteEntry("FIM Manager Verify", "Manager from Grammar: " + resolveGrammarActivity1.ResolvedExpression); requestApprovers.Add((UniqueIdentifier)resolveGrammarActivity1.ResolvedExpression); } //Write the approves back. parentWorkflow.WorkflowDictionary.Add("RequestApprovers", requestApprovers);Eric
Free Windows Admin Tool Kit Click here and download it now
January 25th, 2010 7:30pm

Hi Eric, I'm trying to create a generic activity that saves a request parameter in the workflow dictionary, then I use that parameter as the approver in the approval activity. My workflow looks like this: Save Request Attribute Activity (this is my custom activity) Request attribute name: Manager Workflow attribute name: NewManager Approval Activity (standard FIM activity) Approvers: [//WorkflowData/NewManager] (default values for all other attributes) and in the code of my custom activity I do more or less as you suggested, but it looks like the approval request is not being executed. To check this, I added an approval activity inside my custom activity. If I set the Approvers to '[//WorkflowData/NewManager]', the activity does nothing, while if I set the Approvers property to the guid I retrieved from the request (the new manager) then the new manager gets an approval request. Am I doing something wrong? Is it possible that I'm hitting something similar to this problem reported by Joe Zamora: NullReferenceException in ResolveGrammarActivity ? Thanks, PaoloPaolo Tedesco - http://cern.ch/idm
January 26th, 2010 6:00pm

Hmm... I've seen that when the approver is null.. Make sure that if you are passing reference that you setup the Dictionary value with object type like I did... I've also sent a string of email addresses seperated by semicolons that works... I remember having problems sending Resource GUID as String.EricEric
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2010 5:42pm

Looks like my problem was that you explicitly need to add the guid as a UniqueIdentifier, as you suggested in your previous answer. Thanks, PaoloPaolo Tedesco - http://cern.ch/idm
February 16th, 2010 4:46pm

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

Other recent topics Other recent topics