locked
Is it possible to host a workflow service via WorkflowServiceHost class into IIS RRS feed

  • Question

  • Is it possible to host a workflow service via WorkflowServiceHost class into IIS and also i need to configure this into appfabric dash board
    Wednesday, November 12, 2014 2:35 PM

Answers

  • Yes, it's possible.

    Hosting under IIS or WAS

    Hosting a workflow service under IIS or WAS involves creating a virtual directory and placing files in the virtual directory that define the service and its behavior. When hosting a workflow service under IIS or WAS there are several possibilities:

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory along with a Web.config file that specifies the service behaviors, endpoints, and other configuration elements.

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory. The .xamlx file specifies the endpoints to expose. Endpoints are specified in a WorkflowService.Endpoints element as shown in the following example.

      <WorkflowService xmlns="http://schemas.microsoft.com/netfx/2009/xaml/servicemodel"  xmlns:p1="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <WorkflowService.Endpoints>
          <Endpoint ServiceContractName="IWorkFlowEchoService" AddressUri="">
            <Endpoint.Binding>
              <BasicHttpBinding />
            </Endpoint.Binding>
          </Endpoint>
        </WorkflowService.Endpoints>
      <!-- ... -->
      </WorkflowService>
      
      
      NoteNote

      Behaviors cannot be specified in a .xamlx file, so you must use a Web.config if you need to specify behavior settings.

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory. In addition, place a .svc file in the virtual directory. The .svc file allows you to specify a custom Web service host factory, apply custom behavior, or load configuration from a custom location.

    • Place an assembly in the IIS/WAS virtual directory that contains an activity that uses the WCF messaging activities.

    A .xamlx file that defines a workflow service must contain a <Service> root element or a root element that contains any type derived from Activity. When using the Visual Studio 2012 Activity template a .xamlx file is created. When using the WCF Workflow Service template a .xamlx file is created.

    Reference: http://msdn.microsoft.com/en-us/library/ee358730(v=vs.110).aspx

    • Marked as answer by Angie Xu Tuesday, November 25, 2014 8:03 AM
    Wednesday, November 12, 2014 4:11 PM

All replies

  • Yes, it's possible.

    Hosting under IIS or WAS

    Hosting a workflow service under IIS or WAS involves creating a virtual directory and placing files in the virtual directory that define the service and its behavior. When hosting a workflow service under IIS or WAS there are several possibilities:

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory along with a Web.config file that specifies the service behaviors, endpoints, and other configuration elements.

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory. The .xamlx file specifies the endpoints to expose. Endpoints are specified in a WorkflowService.Endpoints element as shown in the following example.

      <WorkflowService xmlns="http://schemas.microsoft.com/netfx/2009/xaml/servicemodel"  xmlns:p1="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <WorkflowService.Endpoints>
          <Endpoint ServiceContractName="IWorkFlowEchoService" AddressUri="">
            <Endpoint.Binding>
              <BasicHttpBinding />
            </Endpoint.Binding>
          </Endpoint>
        </WorkflowService.Endpoints>
      <!-- ... -->
      </WorkflowService>
      
      
      NoteNote

      Behaviors cannot be specified in a .xamlx file, so you must use a Web.config if you need to specify behavior settings.

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory. In addition, place a .svc file in the virtual directory. The .svc file allows you to specify a custom Web service host factory, apply custom behavior, or load configuration from a custom location.

    • Place an assembly in the IIS/WAS virtual directory that contains an activity that uses the WCF messaging activities.

    A .xamlx file that defines a workflow service must contain a <Service> root element or a root element that contains any type derived from Activity. When using the Visual Studio 2012 Activity template a .xamlx file is created. When using the WCF Workflow Service template a .xamlx file is created.

    Reference: http://msdn.microsoft.com/en-us/library/ee358730(v=vs.110).aspx

    • Marked as answer by Angie Xu Tuesday, November 25, 2014 8:03 AM
    Wednesday, November 12, 2014 4:11 PM
  • Hi Deric,

    Please give a detailed example( or smaple project) for this

    • Place a .xamlx file that defines the workflow service in an IIS/WAS virtual directory. The .xamlx file specifies the endpoints to expose. Endpoints are specified in a WorkflowService.Endpoints element as shown in the following example.

    Thanks..

    Thursday, November 13, 2014 6:06 AM
  • Thursday, November 13, 2014 12:01 PM
  • My requirement is to create a custom endpoint for

    • create the workflow instance by passing input arguments 
    • resume workflow instance(resume bookmark)

    please share sample project

    Friday, November 14, 2014 6:11 AM
  • Jomi Jose, was your original question answered?

    "Is it possible to host a workflow service via WorkflowServiceHost class into IIS and also i need to configure this into appfabric dash board"

    Yes. Here is your tutorial: http://msdn.microsoft.com/en-us/library/ff729689(v=vs.110).aspx

    Friday, November 14, 2014 11:40 AM