PrepAway - Latest Free Exam Questions & Answers

Category: 70-504

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

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 implements the IEventActivity interface and must communicate with a local service by using a workflow queue. The custom activity has a property named QueueName and an ActivityExecutionContext parameter named context. You need to create a queue.
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 add a custom activity class named PriorityParallelActivity to the application.

The custom activity defines the following features:

An attached dependency property named Priority
The standard static accessors for the Priority property

The Priority property is of type Int32.

You are creating a new workflow definition. The PriorityParallelActivity activity contains a CodeActivity activity named codeActivity1.

You need to set the value of the Priority property of the codeActivity1 activity to 5.

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 contains a property named ApproveDocument of type Boolean.

The property must meet the following requirements:

The custom activity can read values from the property during the workflow design. The custom activity can write values into the property during the workflow design.
The value of the property does not change at runtime.
You need to implement the ApproveDocument property to meet 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 create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You add a class to the workflow that implements the IPendingWork interface. The class interacts with a Microsoft SQL Server 2005 database. All database write operations must be performed in a transaction. You implement a Commit method of the IPendingWork interface. You need to complete the Commit method. 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 uses a sequential workflow. The workflow is implemented in a class named ProcessOrders. The workflow contains a dependency property named EmployeeID. You need to ensure that the EmployeeID property is assigned a value when the host application tries to create a new workflow instance. Which code segment should you use?

What are the two possible code segments that you can use to achieve this goal?

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application contains a state workflow.

You write the following code segment.

WorkflowRuntime runtime = new WorkflowRuntime();
WorkflowInstance instance = runtime.CreateWorkflow(
typeof(DynamicUpdateWorkflow));
instance.Start();
StateMachineWorkflowInstance smwi =
new StateMachineWorkflowInstance(runtime,
instance.InstanceId);

A dependency property named Status is defined in this workflow.

The value of a variable named amount is used to set the state of the workflow. You need to ensure that the host application changes the state of the workflow on the basis of the value of the amount variable.

What are the two possible code segments that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)


Page 8 of 9« First...56789