Blog Home  Sign In RSS 2.0 Atom 1.0 CDF  

  def Softwaremaker() :
         return "William Tay", "<Challenging Conventions />"

  knownType_Serialize, about = Softwaremaker()
 

 Thursday, November 12, 2009
« Does BizTalk Server WCF Custom Adapters ... | Main | REF: What the "Black screen of death" story says about tech journalism »

Q: There is a Windows Workflow Foundation (WF) workflow service which contains only one pair of Receive and SendReply. Data will be sent through the Receive activity and how do I get the workflow service to return the GUID of the workflow instance in SendReply activity.

A: Write a custom activity to retrieve it (See below). Bind that to a variable and bind that variable to the SendReply.Content

    public sealed class GetWorkflowInstanceId : CodeActivity<Guid>
    {
        protected override Guid Execute(CodeActivityContext context)
        {
            return context.WorkflowInstanceId;
        }
    }

Thursday, November 12, 2009 10:07:56 AM (Malay Peninsula Standard Time, UTC+08:00)  #    Disclaimer  Comments [1]
  • Blog reactions