microsoft press windows workflow foundation step by step phần 6

Tham khảo tài liệu 'microsoft press windows workflow foundation step by step phần 6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 8 Calling External Methods and Workflows 179 10. This activates the Browse And Select A .NET Type dialog box. Select Workflow2 in the left pane which displays the Workflow2 type in the right pane. Select the Workflowl type is the fully qualified name in the right pane and click OK. 11. Visual Studio then examines the Workflow2 workflow and displays its graphical representation inside the InvokeWorkflow activity in the visual workflow designer. 12. The workflow implementations are now complete so we can add them as references to the main WorkflowInvoker application. From Solution Explorer right-click the WorkflowInvoker project and select Add Reference. When the Add Reference dialog box appears click the Projects tab. Select both Workflow1 and Workflow 2 from the list and click OK. 180 Part II Working with Activities 13. Next add the code to create and start the instance. Locate this line of code in Waiting for workflow completion. 14. Add this code following the line of code you just located Create the workflow instance. Workflowinstance instance workflowRunti typeof Start the workflow instance. 15. We ll now add a small amount of code to the host application simply to tell us when each workflow completes. Insert the following code in the event handler for WorkflowCompleted if is Workflow 1 completed. else Workflow 2 completed. The first workflow to complete sets the AutoResetEvent we re using to force the application to wait for workflow completion. We could add code to force the application to wait for both workflows but for demonstration purposes this should suffice. If you compile and execute the WorkflowInvoker application you ll see console output similar to what you see in Figure 8-4. If the output messages appear in a slightly different order don t be .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.