Xpath question
I want to find out the new value for a modified attribute from within an authorization workflow. The existing value is in //Target/<attribute>, but what is the XPath to find the new value?
October 21st, 2010 4:20pm

I might be doing it in a wrong way but new value is not available through XPATH expression for AuthZ WFs. What I do is have a code to go through all request parameters and add ones required to WF data dictionary. see.. SequentialWorkflow containingWorkflow = null; if (!SequentialWorkflow.TryGetContainingWorkflow(this, out containingWorkflow)) { throw new InvalidOperationException("Unable to get Containing Workflow"); } ReadOnlyCollection<UpdateRequestParameter> requestParameters = this.currentRequest.ParseParameters<UpdateRequestParameter>(); foreach (UpdateRequestParameter requestParameter in requestParameters) { // do something like this if (!containingWorkflow.WorkflowDictionary.ContainsKey("newVal_" + requestParameter.PropertyName)) { containingWorkflow.WorkflowDictionary.Add("newVal_" + requestParameter.PropertyName, requestParameter.Value); } else { containingWorkflow.WorkflowDictionary["newVal_" + requestParameter.PropertyName] = requestParameter.Value; } } ---------------- this code will add lets say new 'Office' value to workflow dictionary as '//WorkflowData/newVal_Office' which can be later used
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 5:19pm

HI Simon, Have you tried something like //RequestParameters/AttrName? Thanks B
October 23rd, 2010 1:16am

HI Simon, Have you tried something like //RequestParameters/AttrName? Thanks B if you're going to use standard Email Notification Activity, for example, it wouldn't resolve //RequestParameters/AttrName. Actually it will resolve only values available with 'Lookup' builder which are: Requestor, WorkflowData, Target and Delta.
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2010 11:27am

I concur with Evgeniy ... if it was as easy as querying the //RequestParameters I would have saved myself the effort too. Note to the product team ... I think this is a totally reasonable thing to expect to be able to do ... is there a (good) reason why an XPath query on this collection isn't supported in this release of FIM? Where this becomes complicated is where you want to query the contents of a multivalue attribute ... e.g. you have added say 12 more people to a multivalue reference attribute, and removed 3 existing ones, and you wish to insert/remove corresponding rows into another FIM object class. Simon - unless someone from the product team can tell us otherwise, I believe Evgeniy is correct and you'll have to write yourself a custom activity to write to the WorkflowData collection. I am in the throes of extending my existing lookup custom activity to deal with the above scenario now ...Bob Bradley, www.unifysolutions.net (FIMBob?)
October 25th, 2010 11:38am

Okay, given that the WorkflowData is avaiable, can you simply have the MPR modified to add an AuthZ workflow that reads the original value into the workflow data parameters? From an architectural perspective, it makes sense that the "RequestParameters" are no longer present within the context of the action workflow because at that point the "Request" has been committed. Its a minor nuance or, as evidenced in the thread, nuisance but from the standpoint of the position, it makes sense to me. Am I trying to over simplify things? B
Free Windows Admin Tool Kit Click here and download it now
October 25th, 2010 5:13pm

Okay, given that the WorkflowData is avaiable, can you simply have the MPR modified to add an AuthZ workflow that reads the original value into the workflow data parameters? If you need to send an approval email with old and new values the only solution is to add new values to workflow data parameters. This is exactly what my code listed above does. and then you can use a standards approval activity with //Target/DisplayName and //WorkflowData/newVal_DisplayName What I suspect is once AuthZ stage is completed - all values stored during AuthZ WF in workflow data should not be available inside any further Action stage activities as it would be another workflow with its own WF data.
October 25th, 2010 6:04pm

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

Other recent topics Other recent topics