Which code segment should you insert at line 05?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You plan to create a RuleSet class named ruleSet.
You write the following code segment in the RuleSet class.
Int32 age;
Boolean adult;
You write the following code segment. (Line numbers are included for reference only.)
01 RuleSet ruleSet = new RuleSet();
02 Rule ageRule = new Rule("AgeRule");
03 CodeThisReferenceExpression thisRef =
04 new CodeThisReferenceExpression();
06 CodeBinaryOperatorExpression ageValueTest = new
07 CodeBinaryOperatorExpression();
08 ageValueTest.Left = ageRef;
09 ageValueTest.Operator =
10 CodeBinaryOperatorType.GreaterThanOrEqual;
11 ageValueTest.Right = new
12 CodePrimitiveExpression(18);
13 ageRule.Condition = new
14 RuleExpressionCondition(ageValueTest);
15 CodeAssignStatement ageRuleAction = new
16 CodeAssignStatement(adultValueRef, new
17 CodePrimitiveExpression(true));
18 ageRule.ThenActions.Add(new
19 RuleStatementAction(ageRuleAction));
20 ruleSet.Rules.Add(ageRule);
You need to add a rule that sets the value of the adult field to true if the value of the age field is greater than or equal to 18. You also need to assign the highest priority to this rule.
Which code segment should you insert at line 05?
Which code segment should you use?
You create a workflow application by using Microsoft .NET Framework 3.5. The application has a workflow that contains a WhileActivity activity named WaLoop. The workflow also has a field named Counter of type Int32. The Counter field is initialized to 0. You need to ensure that the activities in the WaLoop activity execute only 10 times. Which code segment should you use?
Which code segment should you use?
You are creating a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application will host instances of different workflows. The workflows may contain unhandled errors. You need to ensure that the application can handle the exceptions that are passed from the instances of the different workflows. Which code segment should you use?
Which code segment should you use?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The workflow contains a custom activity named CustomActivity. The custom activity meets the following requirements:
It overrides the Execute method.
It retrieves customer information.
You need to stop the workflow if the customer information cannot be retrieved.
Which code segment should you use?
Which code segment should you use?
You are creating a workflow host application by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the application. You need to ensure that the host application can receive method calls from the workflow instances. Which code segment should you use?
Which code segment should you use?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You plan to add a workflow to the application. You add a HandleExternalEvent activity named InitiatePO to the workflow. You need to ensure that the workflow responds only to events raised by the members of the Active Directory role named Managers. Which code segment should you use?
Which line of code should you use?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You plan to call a method in the workflow host to send messages.
You write the following code segment.
public interface IOrderCommunication {
void UpdateOrder(string orderId);
}
You need to decorate the interface.
Which line of code should you use?
Which code segment should you use?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application will be used for stock maintenance in a warehouse. The application will receive daily sales report data from the client application through SOAP. You need to ensure that when the sales report arrives, the stock application must call the stock-counting application to retrieve the item count. Which code segment should you use?
Which line of code should you use?
You create a Windows Workflow Foundation application by using Microsoft
.NET Framework 3.5. The application uses the InvokeWebServiceActivity activity to call a Web service. You need to identify the method in the proxy class that you can use to communicate with the Web service. Which line of code should you use?
Which code segment should you use?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You plan to add a workflow to implement an order processing logic. When the host initiates the order processing logic, it raises an event named StartProcessing. You need to configure the local communication interface to enable the workflow to handle the event. Which code segment should you use?