locked
WorkflowEnvironment.WorkflowInstanceId in WF 4.0 RRS feed

  • Question

  • Hello!

    What is the WF4 equivalent of

    WorkflowEnvironment.WorkflowInstanceId?


    Best regards,

    Henrik Dahl

    Thursday, November 5, 2009 4:25 PM

Answers

  • You need to use a custom activity like this:

    public class WorkflowInstanceID : CodeActivity<Guid>
    {
        protected override string Execute(CodeActivityContext context)
        {
            return context.WorkflowInstanceID;
        }
    }
    Thursday, November 5, 2009 4:58 PM