In this task, we will create a code workflow with Receive and SendReply activities, and will run the workflow as a WCF service. This workflow will accept two integer numbers and return the addition sum to the caller. This workflow is hosted in a console application rather than IIS. We will use WCF Test Client to test the service.
Create a workflow Console Application project:
Create a new Workflow Console Application named
ReceiveAndReplyInCode
.Create the workflow in code:
Add a new class file to the project and name it
ReceiveAndReplyWorkflow.cs
. Fill the file with the following code:using System; using System.ServiceModel.Activities; using System.Activities; using System.ServiceModel; using System.Activities.Statements; namespace ReceiveAndReply { class ReceiveAndReplyWorkflow { public WorkflowService GetInstance() { WorkflowService service; Variable<int> x = new Variable...