PrepAway - Latest Free Exam Questions & Answers

Author: admin

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?

Which code segment should you use?

You are creating a Microsoft Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You implement a custom tracking profile in the application to
monitor and debug the workflow. You create a CodeActivity activity named AddToCart in the application. You need to define an ActivityTrackingCondition class that matches the AddToCart activity.
Which code segment should you use?

Which code fragment should you use to replace the code at lines 06 and 07?

You are defining a Windows Workflow Foundation workflow by using Microsoft .NET Framework 3.5.

You create a custom activity class named FilterActivity in the workflow. The class defines two dependency properties named Input and Output.

You write the following code fragment. (Line numbers are included for reference only.) 01 <SequentialWorkflowActivity
02 x:Name="Workflow1"
03 xmlns:ns0="Contoso.FilterActivities"
04 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 05 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"> 06 <ns0:FilterActivity x:Name="filterActivity1" />
07 <ns0:FilterActivity x:Name="filterActivity2" />
08 </SequentialWorkflowActivity>

You need to ensure that the Input property of filterActivity2 accepts the value of the Output property of filterActivity1 at run time.

Which code fragment should you use to replace the code at lines 06 and 07?

Which base class should you use?

You are creating a Windows Workflow Foundation (WF) custom activity by using Microsoft .NET Framework 3.5. The custom activity is derived from the System.Workflow.Activities.SequenceActivity class. You need to create a validator for the custom activity. You also need to ensure that the validator reuses the validation logic provided by WF to recursively validate child activities. Which base class should you use?

Which code segment should you use?

You create a Windows Workflow Foundation custom activity class named AccountTransfer by using Microsoft .NET Framework 3.5.

You plan to add a property named Amount of type double to the custom activity.

During the creation of a workflow, the property must be available to other activities for the following purposes:

Reading
Writing
Activity data binding
You need to ensure that the property meets the outlined requirements.

Which code segment should you use?

Which code segment should you use?

You are creating a Windows Workflow Foundation custom activity by using Microsoft .NET Framework 3.5.

The custom activity has the following features:
It is derived from the System.Workflow.ComponentModel.CompositeActivity class.
It contains a single child activity.

You create a method named ExecuteChild for the custom activity. Each time the custom activity is required to execute the child activity, the custom activity invokes the ExecuteChild method.

You need to ensure that the ExecuteChild method enables the custom activity to execute the child activity more than once.

Which code segment should you use?

Which code segment should you use?

You are creating a Windows Workflow Foundation custom activity by using Microsoft .NET Framework 3.5.
The custom activity is derived from the System.Workflow.ComponentModel.CompositeActivity class.

The custom activity will manage one or more child activities.

You need to ensure that the custom activity performs the following tasks:

Runs each child activity exactly once.
Runs all the child activities in parallel.

Which code segment should you use?