What should you do to configure the workflow to continue processing even if an activity throws an error?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application uses a sequential workflow that contains five activities. You need to configure the workflow to continue processing even if an activity throws an error. What should you do?
Which code segment should you insert at line 10?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application uses a sequential workflow as shown in the following exhibit. (Click the Exhibit button for the sequential workflow image.)
The workflow implements an if condition as shown in the following exhibit. (Click the Exhibit button for the if condition image.)
A new business policy requires the application to ascertain whether the amount is less than 15,000 instead of the current default.
You write the following code segment in the host application. (Line numbers are included for reference only.)
01 Int32 newAmount = 15000;
02 WorkflowChanges workflowchanges =
03 new WorkflowChanges(instance.GetWorkflowDefinition()); 04 CompositeActivity transient =
05 workflowchanges.TransientWorkflow;
06 RuleDefinitions ruleDefinitions = (RuleDefinitions)
07 transient.GetValue(RuleDefinitions.RuleDefinitionsProperty); 08 RuleConditionCollection conditions =
09 ruleDefinitions.Conditions;
11 (condition1.Expression as CodeBinaryOperatorExpression).Right 12 = new CodePrimitiveExpression(newAmount);
instance.ApplyWorkflowChanges(workflowchanges);
You need to build a host application that modifies the condition according to the business requirement in workflow instances that are currently executing.
Which code segment should you insert at line 10?
What should you do to start one of these sequential workflows from within your own workflow?
You create an application in which users design simple sequential workflows. The designs are stored as XOML in a SQL database. You need to start one of these sequential workflows from within your own workflow. What should you do?
What should you do to execute a CodeActivity activity for each Customer object contained in ListCustomers?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The workflow contains a collection of Customer objects named ListCustomers. You need to execute a CodeActivity activity for each Customer object contained in ListCustomers. What should you do?
What should you do to ensure that the CaDisplayDets activity executes 10 times?
You create a workflow application by using Microsoft .NET Framework 3.5. The application has a workflow that contains a field named Counter of type Int32. The Counter field is initialized to 0.
The workflow also has a ConditionalActivityGroup activity named CagConditions. The CagConditions activity has a CodeActivity activity named CaDisplayDets. The ExecuteCode handler for the CaDisplayDets activity is defined in the following manner.
private void CaDisplayDets_ExecuteCode(
object sender, EventArgs e)
{
Counter += 1;
Console.WriteLine("EXECUTE" + Counter.String());
}
You need to ensure that the CaDisplayDets activity executes 10 times.
What should you do?
What should you do to ensure that the RuleA rule is re-evaluated after the RuleB rule?
You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
Your workflow has a rule set and a property named Discount. The rule set includes two rules named RuleA and RuleB.
The RuleA rule has the following properties:
Expression = "IF this.Discount > 10 THEN this.Discount=10" Reevaluation = "Always"
Priority = 0
The RuleB rule has the following properties:
Expression = "IF this.OrderAmount > 2000 THEN this.Discount = this.Discount + 5" Reevaluation = "Always"
Priority = 0
The rule set has its chaining behavior set to Explicit Update Only.
You need to ensure that the RuleA rule is re-evaluated after the RuleB rule.
What should you do?
What should you do to ensure that only the AddStock() SOAP messages are logged?
You create an inventory management service by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation to create the service.
Client applications that call the AddStock() method fail occasionally. You attempt to diagnose the problem by logging all the incoming SOAP messages.
The simultaneous receipt of a large volume of CheckStock() SOAP messages makes it difficult to isolate the problem.
You need to ensure that only the AddStock() SOAP messages are logged.
What should you do?
What should you do to ensure that the WCF service provides interoperable and secure…?
You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The application exposes a Windows Communication Foundation (WCF) Web service. The Web service is consumed by third-party applications. You need to ensure that the WCF service provides interoperable and secure end-to-end communications. What should you do?
What should you do to implement the design strategy by using the minimum amount of development effort?
You create an application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The component will return custom business objects. You plan to develop a design strategy that meets the following requirements:
The component can be accessed by the .NET Windows applications and JavaScript-based Web applications. The component can be consumed by the client applications by using the minimum amount of code. The least amount of network bandwidth is consumed. You need to implement the design strategy by using the minimum amount of development effort. What should you do?
What should you do to perform custom validation of the user name and password ?
You are creating an application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation (WCF) to create the application. The YourUserNamePasswordValidator class is implemented in the host application of the WCF service. The host application is named YourServiceHost.exe. You write the following code segment.
namespace YourSecureService
{
class YourUserNamePasswordValidator : UserNamePasswordValidator {
public override void Validate(string userName, string password)
{
…
}}
}
You need to perform custom validation of the user name and password by using the YourUserNamePasswordValidator class. What should you do?