Readresource Activity-Custom Workflow
Hi All I have scenario where i have to fetch all the attribute values from FIM portal when user edits any one attribute.for instance if i edit displayname then should receive all the other corresponding value from FIM portal like accountName,firstname,contact number,etc...even the edited displayname value. i created a readresourceactivity to retrieve all the values from FIM portal I created a readresourceactivity and then a code activity. I encountered an error as"Invalid Requestor Specified for get operation" Any help would be great Thanks in Advance Hira.
October 27th, 2010 5:26am

Hi Hira, Make sure that you have configured MPRs that grant permissions to the requestor to read the attributes you are trying to fetch. This is how i use the readResouce activity: codeActivity1 readResourceActivity1 codeActivity2 to do something with the fetched information private void codeActivity1_ExecuteCode(object sender, EventArgs e) { readResourceActivity1.ResourceId = new Guid(PASS THE REQUIRED GUID); readResourceActivity1.SelectionAttributes = new string[] { "DisplayName" };// Add as many as you want } private void codeActivity2_ExecuteCode(object sender, EventArgs e) { string DisplayName = readResourceActivity1.Resource["DisplayName"].ToString() ; }
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2010 11:21am

Hira, Also make sure that the GUID specified for the ActorID is a valid GUID of a user in FIM (and as Eihab Isaac said with the appropriate rights to read the attributes specified in the SelectionAttributes) . Phil
October 27th, 2010 7:29pm

Use the CurrentRequestActivity to retrieve the Requestor (which will be a UniqueIdentifier) and initialise the ReadResourceActivity with the GUID of the Requestor, e.g. this .requestor = this.currentRequest.Creator.GetGuid(); this .getTarget.ResourceId = this.requestor; this.getTarget.SelectionAttributes = new String[] { "DisplayName", "DetectedRulesList", "ExpectedRulesList", "MultivalueReferenceTest" }; In your case you don't want to specify SelectionAttributes, which means all attributes are returned. As mentioned, remember to cater for the fact that some properties won't be readable by the actor and others will really be null, e.g. ResourceType targetResource = this.getTarget.Resource; if (targetResource["DisplayName"] != null) { this.targetDisplayName = (String)targetResource["DisplayName"]; } if (targetResource["DetectedRulesList"] != null) { if (targetResource["DetectedRulesList"].GetType().Equals(typeof(List<UniqueIdentifier>))) { foreach (UniqueIdentifier u in (List<UniqueIdentifier>)targetResource["DetectedRulesList"]) { // do something here } } } etc.
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 4:07am

Hi all Thanks a lot.all your suggestion helped me a lot to solve the issue.really great job.:) Cheers Hira
October 28th, 2010 5:29am

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

Other recent topics Other recent topics