The Windows Workflow Foundation framework supports Web Service interoperability. This framework can expose workflows as Web services to ASP. NET clients and other workflows. Windows Workflow Foundation allows you to publish workflows as ASP. NET Web services to Web servers or server farms that run ASP. NET on Internet Information Service (IIS) 6.0. Because Windows Workflow Foundation Web Service supports ASP. NET 2.0, It inherits most of the functions of the standard ASP. NET Web service.
Windows Workflow Foundation basic activity libraries include WebServiceInputActivity and WebServiceOutputActivity, which allow workflows to be used as Web service endpoints. For more information about using these Web service activities, see use WebServiceInputActivity and use WebServiceOutputActivity.
Web Hosting of ASP. NET workflows
The main types used for workflow Web hosting include:
WorkflowWebHostingModule
ManualWorkflowSchedulerService
WorkflowWebHostingModule
The WorkflowWebHostingModule class is the default routing mechanism used to route Web service requests to the corresponding workflow by Using ASP. NET cookies. Of course, the client sending these requests must support cookies.
Although Windows Workflow Foundation provides this default routing mechanism, you can implement your own custom routing mechanism. For example, if you cannot enable Cookie on the client, you can configure the client to create a workflow instance with a specific Id and pass the Id in each Web service request. You can use SOAP or HTTP processing programs to configure the request pipeline to intercept calls, retrieve the workflow instance Id from the header information, and then set HttpContext. current. items. add ("_ WorkflowInstanceId _", workflowInstanceId) is set to the input Id.
ManualWorkflowSchedulerService
ManualWorkflowSchedulerService class is a dedicated implementation of WorkflowSchedulerService. It issues ASP by reusing a thread.. NET Web requests to run workflow instances.. NET process. This ensures that the number of active threads in the workflow Runtime is equal to the number of active Web requests in the ASP. NET process at any time.
Restrictions on ASP. NET workflows exposed as Web Services
Instance routing works on the basis of ASP. NET sessions. As a Web service user, it must support ASP. NET cookies.
Even if you can model "receive request-Send Response" as asynchronous operations in the workflow, ASP.. NET is still applicable to Web service users, that is, the instance cannot migrate between unprocessed request-response operations.
Enable Cookie to call ASP. NET workflow Web Service
The workflow Web Service uses cookies to track the status. If you publish a workflow as a Web service, you must enable Cookie in the client code that calls it. For example:
CalculatorWorkflow_WebService service = new CalculatorWorkflow_WebService ();
Service. CookieContainer = new System. Net. CookieContainer ();
This allows you to call methods on the "service" object.
- Create and start an ASP. NET Workflow
- ASP. NET database connection class ClassConn and oledb database connection method
- Implementation of ASP. NET database Driver Class: DBHelper
- ASP. NET database operation class written in C #
- ASP. NET database image storage to Sql2000