.Net Framework, Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML

Ado.netAsp.Net 2.0SQLC-SharpXMLFrameworkIISXMLWebServiceArchitecture
UMLProject ManagementSDLCMethodologiesDesign PatterenOOPWCF.Net RemotingWWF
MVPMVCSilver LightN-HibernateAjaxJ-QuerySEO-MarketingSite MapPhp

Workflow as Web Service

Sometimes you may need to expose the workflow as a web service. So, let’s take a look on how you can create a simple workflow and expose it as a web service

We can divide the task into two.
1. Creating a workflow compitable with webservice.
2. Expose it as a webservice.

Sequential Workflow Console ApplicationSequential Workflow Library
Workflow as Web Service


We need three activity for this project WebServiceInput, WebServiceOutput & WebServiceFault.

Create a Sequential Workflow Library project

1. Drag a WebServiceInput on workflow
  • We need to create an interface which will act as the contract for our operation
  • namespace Arindam.WWF
    {
    [ServiceContract]
    public interface IService
    {
    [OperationContract]
    string GetEmployee(int EmpID);

    }
    }


  • 2. Then drag a ifelseActivity condition block on workflow.
  • In left side of ifelse drag a codeactivity (name as per your bisiness object).
  • Then drag a WebServiceOutput activity just below that.


  • 3. WebServiceFault is the exception thrown by service object .

    wwf workflow as webservice

    4. Finally Publish, right click on project and click publish as webservice.

    Click here to download code sample

    Leave your comment.
    Name
    Email
    Comments
    Tell Us9597+5 =

    Reduce your Dialy IT Cost, Consult with us
    Stay healthy in recession

    Advertisement
    Sponsored by

    Privacy Policy ©2009 ETG Consultancy, All Rights Reserved Terms & Conditions
    Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML