tailieunhanh - microsoft press windows workflow foundation step by step phần 8
Tham khảo tài liệu 'microsoft press windows workflow foundation step by step phần 8', 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 12 Policy and Rules 273 Rule Conditions The WF activities that evaluate conditional expressions include the IfElse activity While activity Replicator activity and ConditionedActivityGroup activity. Each of these activities requires you to make a true false decision. In Chapter 9 we used the Code Condition property setting which caused Visual Studio to inject an event handler into our workflow code. The event arguments which are of type ConditionalEventArgs contained a Result property that we set to true or false depending on our decision. However for each of these conditional decisions we could have used a Rule Condition instead. Rule Conditions are rules that evaluate to true or false. The number of purchased items exceeds the free shipping threshold for example. To clarify this a bit here is a sample application that uses a Rule Condition. Create a new workflow application with Rule Condition conditional evaluation 1. The RuleQuestioner sample application comes in two forms as the samples have in previous chapters. The completed form found in the Workflow Chapter12 RuleQues-tioner Completed directory is great for opening and following along with the text without having to actually type anything. It runs as is. The version to open for editing if you want to follow along is found in the Workflow Chapter12 RuleQuestioner directory. This version of the application is started for you but you have the opportunity to type code and create the workflow. To open either solution drag its respective .sln file onto an executing copy of Visual Studio. 2. With the solution open and ready for editing create a separate sequential workflow library project as you did in Chapter 3 Workflow Instances in the Adding a sequential workflow project to the WorkflowHost solution procedure. Name this workflow library RuleFlow and save it in the Workflow Chapter12 RuleQuestioner directory. 3. After Visual Studio has added the RuleFlow project it will open the Workflow1 workflow for .
đang nạp các trang xem trước