PrepAway - Latest Free Exam Questions & Answers

Category: 70-504

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

Which utility should you use?

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.

The application contains the following code segment.

[ExternalDataExchange]
public interface IOrderService {
bool CreateOrder(string customerId);
bool CancelOrder(string orderId);
bool SuspendOrder(string ordered);
}

You need to create workflow activities that correspond to each operation in the IOrderService interface. You also need to ensure that the activities use the C# programming language.

Which utility should you use?

Which utility should you use?

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The workflow must handle events raised by the application.

You create and compile the local communication contracts into an assembly.

You need to ensure that the application meets the following requirements:

Improves the design-time experience by using strong typing. Creates tightly-bound communication activities that correspond to the event parameters for the interface.

Which utility 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 uses state machineCbased workflows. As the workflow progresses, each state requires the name of the previous state. The workflow must be able to return the previous state at any point during the workflow. You need to create a method that returns the name of the last state. 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 application contains a workflow named AdmitWorkflow in the namespace Hospital.Patient. The application uses strong-named assemblies. You plan to create an administrative application to monitor the workflow database. The administrative application must return a list of idle AdmitWorkflow workflows. You need to correctly configure the SqlTrackingQueryOptions class. 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 uses a state machineCbased workflow that takes 10 to 15 days to complete. The workflow will be persisted when idle. The workflow communicates with a custom class that implements the IWorkflowAction interface. The interface contains events that the workflow will handle. The events require a custom EventArgs class. You need to implement the WorkflowActionEventArgs class. Which code segment should you use?

Which code segment should you use?

You are creating a Windows Workflow Foundation code-based workflow named Workflow1 by using Microsoft .NET Framework 3.5.

You write the following code segment in the Workflow1 class.

public TimeSpan DelayTime
{
get { return _delayTime; }
set { _delayTime = value; }
}
// default delay of one hour
TimeSpan _delayTime = new TimeSpan(0, 1, 0);

You are adding an activity named delayActivity1 of type DelayActivity to the workflow. The activity must meet the following requirements:
The TimeoutDuration property value returns the DelayTime property value of the Workflow1 object. Any change in the DelayTime property value during the execution of the workflow is immediately reflected in the TimeoutDuration property value.

You need to ensure that the Workflow1 class constructor enables the activity to meet the outlined requirements.

Which code segment should you use?

Which line of code should you use?

You are creating a custom activity by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the custom activity. The custom activity is derived from the System.ComponentModel.Workflow.Activity class. The custom activity will idle until an item arrives in a workflow queue.

You write the following code segment for a method contained in the custom activity class.

void queue_QueueItemAvailable(object sender,
QueueEventArgs e)
{

}

The method is an event handler for the QueueItemAvailable event of the workflow queue.

You need to ensure that the event handler notifies the workflow runtime when the custom activity
successfully completes execution.

Which line of code should you use?

Which code segment should you use?

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

The custom activity has the following characteristics:

It is derived from the System.Workflow.ComponentModel.Activity class.
It overrides the Execute method.

The Execute method accepts a parameter named executionContext of type ActivityExecutionContext.

You need to ensure that the Execute method facilitates the transition of the custom activity out of the execution state. You also need to ensure that the Execute method allows the workflow to proceed towards completion.

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 characteristics:

It is derived from the System.Workflow.ComponentModel.CompositeActivity class.
It manages a single child activity.
It subscribes to the Closed event of the child activity.

You plan to implement the cancellation logic for the custom activity.

You need to ensure that during the cancellation process, the custom activity cancels the execution of the child activity.

Which code segment should you use?


Page 7 of 9« First...56789