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

Tham khảo tài liệu 'microsoft press windows workflow foundation step by step phần 9', 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 14 State-Based Workflows 335 State Machine Workflow Drop StateActivity EventD rivenActivity. statelnitializationActivity PI StateFinalizaticnActivity here o WaitCoinsState Drop StateActivity E veritD rivenActivrty StatelnitialfeationActivity or StateFinalizationActivity here 7. Drop another State activity onto the visual workflow designer s surface and name it WaitSelectionState. State Machine Workflaw I zl startstate 3 WaitCoinsState Drop StateActivity E ventD rivenActivity. StatelnitializalionAclivity 01 s tateFinalizatianActivity here II _ Waits elections tate Drop StateActivity E veritD rivenActivrty StatelnitialfeationActivity or StateFinalizationActivity here 8. Drop the final State activity onto the visual workflow designer s surface and change its name to EndState. 9. Just as you reassigned the starting state so too will you need to tell WF what the ending state will be. Click the visual workflow designer s surface outside any State activity to enable the workflow properties. Assign the CompletedStateName property to be EndState. Visual Studio then clears EndState s contents and changes the icon in the upperleft corner. As before you can type EndState or select it from the drop-down list. 336 Part III Workflow Processing 10. With the state activities in place let s now add details. Starting with StartState drag an instance of the Stateinitialization activity from the Toolbox and drop it into StartState. 11. Double-click the activity you just inserted stateinitializationl to enter the sequential workflow editor. 12. Drag a copy of the Code activity from the Toolbox and drop it into the state initialization activity. Assign its ExecuteCode method to be ResetTotal. Visual Studio then adds the ResetTotal method for you and switches you to the code editor. Rather than add code at this point return to the visual workflow designer. 13. Next drag an instance of SetState onto the designer s surface and drop it just below the Code activity you just inserted.

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.