PrepAway - Latest Free Exam Questions & Answers

Category: 70-504

Exam 70-504: TS: Microsoft .NET Framework 3.5 – Workflow

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 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?

Which code segment should you use?

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application uses a sequential workflow that meets the following requirements:

The workflow application calls an external method to simultaneously notify two users about a task. The host application raises the TaskCompleted event after each user completes a task.

The workflow has two HandleExternalEvent activities that handle the TaskCompleted event in parallel for two users.

You need to ensure that each TaskCompleted event is handled by the HandleExternalEvent activity mapped to the respective user.

Which code segment should you use?


Page 3 of 912345...Last »