Accessing Identity Information inside a Workflow Service RRS feed

  • Question

  • New to WF, so bear with me.

    It seems like the following page covers it: http://msdn.microsoft.com/en-us/library/ff452450.aspx

    However, although it's claimed in this guidance that the "AccessIdentityScope" derived activity behaves like a Sequence, it clearly does not, since I can't drop activities onto it in the designer.

    What am I missing here? Does this sample only work if you're coding the workflow manually?

    UPDATE: OK, so I figured out that I must decorate the class with a designer attribute, as outlined here: http://stackoverflow.com/questions/7521696/windows-workflow-custom-sequence-activity. This actually makes the custom activity much simpler, I think, because we don't need the InternalExecute() complexity to schedule the inner sequence.

    But now I'm wondering how to actually get the identity info out of the callback and into the workflow (into a variable?) so that I can pass it to another activity. Inside the callback I can do:

             activityExecutionProperties.Add("Username", operationContext.ServiceSecurityContext.WindowsIdentity.Name);

    But how do the "activity execution properties" manifest themselves in the workflow itself?

    • Edited by wbradney Tuesday, June 4, 2013 6:46 PM
    Tuesday, June 4, 2013 5:51 PM