Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Quy trình làm dịch vụ ứng dụng WCF là một loại mới của dự án trong VS2010 mà làm cho nó rất dễ dàng để tạo ra quy trình công việc cho việc gửi và nhận dữ liệu. Họ chủ yếu cung cấp một dịch vụ WCF khai báo được xác định bằng cách sử dụng các hoạt động công việc. Quy trình làm dịch vụ ứng dụng WCF có tất cả các lợi ích của WF như hỗ trợ cho các dịch vụ dài hạn, giao diện GUI, và cũng có những lợi ích bổ sung mà khi chúng. | CHAPTER 6 WINDOWS WORKFLOW FOUNDATION 4 Figure 6-14. Final age validation work flow WCF Messaging Improvements A number of enhancements have been introduced in WF4 to improve integration with WCF and to ease messaging scenarios. Correlation Correlation functionality first appeared in WF3.5 and allows you to route incoming messages to specific workflow instances based on their content or protocol used. For example if you have a very long running workflow where replies take weeks or months to return it is important that when a reply is received it is sent to the correct individual workflow. ReceiveAndSendReply and SendAndReceiveReply are the new activities discussed in the following sections that provide a correlated send and receive activities with a number of new methods of correlation such as xpath and correlation scope. WCF Workflow Service Applications WCF Workflow Service applications are a new type of project in VS2010 that make it very easy to create workflows for sending and receiving data. They essentially provide a declarative WCF service defined 149 CHAPTER 6 WINDOWS WORKFLOW FOUNDATION 4 using workflow activities. WCF Workflow Service applications have all the benefits of WF such as support for long-running services GUI interface and also the additional benefits that as they are declared declaratively so are easy to deploy and version. VS2010 comes with a WCF Workflow Service Application template that you can adapt for your own needs. The sample application simply echoes a number you send to it back to you. Let s take this for a spin now. 1. Create a new WCF Workflow Service project called Chapter6.WFService. The template will contain a sequential activity looking very similar to Figure 6-15. Figure 6-15. WF Service project 2. This sequential activity is defined in the file Service1.xamlx. If you open this up with the XML editor you will see the XAML that defines this service boring bits removed as it s pretty long p Sequence DisplayName Sequential .