Hello I am attempting to create a custom workflow that will generate tickets in our ticketing system. I have found and followed this walkthrough http://msdn.microsoft.com/en-us/library/windows/desktop/ff859524(v=vs.100).aspx. This is working as intended I wanted to take it a step further and return the display name of the Requestor and the Target of the request but cannot seem to get them to pull back.
Following the walk through I have added a code activity and a readResource Activity, below is the code I have in the code block. The actor id, resource id, and selection attributes are all set properly however the resource is never returned. I can provide more information if needed.
private void initializeReadTarget_ExecuteCode(object sender, EventArgs e)
{
try
{
this.readTarget_ActorId1 = new Guid(nchdevfimuser);
this.readTarget_ResourceId1 = ReadCurrentRequestActivity.CurrentRequest.Target.GetGuid();
this.readTarget_SelectionAttributes1 = new string[] { "DisplayName" };
ResourceType user = readTarget.Resource;
string displayName = (string)user["DisplayName"];
this.Log("Target: " + displayName);
}
catch (Exception ex)
{
this.Log("Logging Activity Exception Thrown: " + ex.Message);
}
}