Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

Microsoft 70-504(VB) Exam - Cheat-Test.com

Free 70-504(VB) Sample Questions:

Q: 1 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?
A. Dim options As New SqlTrackingQueryOptions()options.WorkflowStatus =
WorkflowStatus.Runningoptions.WorkflowType = _ Type.GetType("Hospital.Patient.AdmitWorkflow")
B. Dim options As New SqlTrackingQueryOptions()options.WorkflowStatus =
WorkflowStatus.Suspendedoptions.WorkflowType = _ Type.GetType("Hospital.Patient.AdmitWorkflow")
C. Dim options As New SqlTrackingQueryOptions()options.WorkflowStatus =
WorkflowStatus.Runningoptions.WorkflowType = _ Type.GetType("Hospital.Patient.AdmitWorkflow," + _ "
Hospital.Patient, Version=1.0.0.0, Culture=neutral," + _ " PublicKeyToken=0123456789ABCDEF")
D. Dim options As New SqlTrackingQueryOptions()options.WorkflowStatus =
WorkflowStatus.Suspendedoptions.WorkflowType = _ Type.GetType("Hospital.Patient.AdmitWorkflow," + _
" Hospital.Patient, Version=1.0.0.0, Culture=neutral," + _ " PublicKeyToken=0123456789ABCDEF")
Answer: C

Q: 2 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?
A. Dim wi As New StateMachineWorkflowInstance(runtime, workflowId)Return wi.StateHistory(0)
B. Dim wi As New StateMachineWorkflowInstance(runtime, workflowId)Return wi.CurrentState.Parent.Name
C. Dim wi As New StateMachineWorkflowInstance(runtime, workflowId)Return wi.States(wi.States.Count - 1).Name
D. Dim wi As New StateMachineWorkflowInstance(runtime, workflowId)Return wi.StateHistory(wi.StateHistory.Count - 1)
Answer: D

Q: 3 You are creating a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You need to ensure that the application records event tracking information in the Windows Event Log.
What should you do?
A. Derive one custom class each from the TrackingService class and the TrackingChannel class. Return the
custom class derived from the GetTrackingChannel method of the TrackingChannel class. Write the tracking
information to the Windows Event Log in the Send method.
B. Derive one custom class each from the TrackingService class and the TrackingChannel class. Return the
custom class derived from the GetTrackingChannel method of the TrackingChannel class. Write the tracking
information to the Windows Event Log in the GetProfile method.
C. Derive one custom class each from the TrackingService class and the TrackingProfile class. Return the
custom class derived from the TrackingProfile from the GetProfile method. Write the tracking information to
the Windows Event Log in the constructor of the custom class derived from the TrackingProfile class.
D. Derive one custom class each from the TrackingChannel class and the TrackingProfile class. Create an
instance of the custom derived TrackingProfile class in the Send method. Write the tracking information to the
Windows Event Log in the constructor of the custom class derived from the TrackingProfile class.
Answer: A

Q: 4 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?
A. Public Class WorkflowActionEventArgs Inherits EventArgs Public InstanceId As Guid Public Action As String Public Sub New(ByVal instanceId As Guid, ByVal action As String) Me.InstanceId = instanceId Me.Action = action End SubEnd Class
B. <Serializable()> _Public Class WorkflowActionEventArgs Inherits EventArgs Public InstanceId As Guid Public Action As String Public Sub New(ByVal instanceId As Guid, ByVal action As String) Me.InstanceId = instanceId Me.Action = action End SubEnd Class
C. Public Class WorkflowActionEventArgs Inherits ExternalDataEventArgs Public Action As String Public Sub New(ByVal instanceId As Guid, ByVal action As String) MyBase.New(instanceId) Me.Action = action End SubEnd Class
D. <Serializable()> _Public Class WorkflowActionEventArgs Inherits ExternalDataEventArgs Public Action As String Public Sub New(ByVal instanceId As Guid, ByVal action As String) MyBase.New(instanceId) Me.Action = action End SubEnd Class
Answer: D

Q: 5 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The workflow design is as shown in the following exhibit. (Click the Exhibit button.)

You need to add an activity before the throwActivity1 activity. You also need to ensure that the added activity allows the throwActivity1 activity to throw an exception only if the Approved event is not received in four hours.
What should you do?
A. Add a DelayActivity activity and set the TimeoutDuration property to four hours.
B. Add a CodeActivity activity. In the CodeActivity activity, call the Thread.Sleep method. Pass a time span of four hours to the Thread.Sleep method.
C. Add a CodeActivity activity. In the CodeActivity activity, instantiate a Timer class. Set the Interval property of the Timer class to four hours. Handle the Elapsed event and check if the event has been raised.
D. Add a WhileActivity activity. In the WhileActivity activity, add a SuspendActivity activity. In the Condition property of the WhileActivity activity, create a code condition and attach a delegate to the Approved event in the workflow.
Answer: A

Q: 6 You use a built-in tracking service to track specific workflow parameters.
You need to check whether the workflow parameters have been stored in the tracking database.
What should you do? (Each correct answer presents part of a solution. Choose two.)
A. Display the contents of the WorkflowInstance table of the tracking database.
B. Include the SqlTrackingQuery class in a code segment to retrieve tracked workflows and SqlTrackingWorkflowInstance class to inspect them.
C. Use the ActivityTrackingLocation class to determine if the value has been set to a database.
D. Display the contents of the TrackingDataItem table of the tracking database.
Answer: B, D

Q: 7 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application uses a sequential workflow.
The workflow calls an external method to notify a list of users to carry out tasks.
The list of users varies in size and composition from one workflow instance to another. The list is implemented as a string array. When a user completes a task, the host application raises a TaskCompleted event.
You need to ensure that the users receive their notifications simultaneously.
What should you do?
A. Add the CallExternalMethodActivity and the HandleExternalEventActivity activities in a While activity.
Set the While activity to loop through the entire string array.
B. Add the CallExternalMethodActivity and the HandleExternalEventActivity activities in a Replicator activity. Set the ExecutionType property of the Replicator activity to Parallel.
C. Add the CallExternalMethodActivity and the HandleExternalEventActivity activities in a Replicator activity. Set the ExecutionType property of the Replicator activity to Sequence.
D. Add a ParallelActivity activity to the workflow. Add branches to the activity such that the number of branches is equal to the number of persons to be notified. Add the CallExternalMethodActivity and the HandleExternalEventActivity activities to each branch.
Answer: B

Q: 8 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?
A. Dim runtime As New WorkflowRuntime()Dim processOrders As New
ProcessOrders()processOrders.EmployeeID = "NBK"Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(ProcessOrders))
B. Dim runtime As New WorkflowRuntime()Dim processOrders As New
ProcessOrders()processOrders.SetValue( _ processOrders.EmployeeIDProperty, "NBK")Dim instance As
WorkflowInstance = _ runtime.CreateWorkflow(GetType(ProcessOrders))
C. Dim runtime As New WorkflowRuntime()Dim dict As Dictionary(Of String, Object) = _ New
Dictionary(Of String, Object)()dict.Add("EmployeeID", "NBK")Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(ProcessOrders), dict)
D. Dim runtime As New WorkflowRuntime()Dim dict As Dictionary(Of String, Object) = _ New
Dictionary(Of String, Object)()dict.Add("EmployeeIDProperty", "NBK") Dim instance As WorkflowInstance =
_runtime.CreateWorkflow(GetType(ProcessOrders), dict)
Answer: C

Q: 9 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.
Dim amount As Integer = 10
Dim runtime As New WorkflowRuntime()
Dim instance As WorkflowInstance = _ runtime.CreateWorkflow(GetType(DynamicUpdateWorkflow))
instance.Start()
Dim smwi As 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.)
A. If amount >= 1000 Then smwi.SetState("HighValueState")Else smwi.SetState("LowValueState")End If
B. If amount >= 1000 Then smwi.StateMachineWorkflow.SetValue _
(DynamicUpdateWorkflow.StatusProperty, "HighValueState")Else smwi.StateMachineWorkflow.SetValue _
(DynamicUpdateWorkflow.StatusProperty, "LowValueState")End If
C. If amount >= 1000 Then instance.GetWorkflowDefinition().SetValue
(DynamicUpdateWorkflow.StatusProperty, "HighValueState")Else
instance.GetWorkflowDefinition().SetValue (DynamicUpdateWorkflow.StatusProperty,
"LowValueState")End If
D. If amount >= 1000 Then Dim high As StateActivity = _
CType(smwi.StateMachineWorkflow.Activities("HighValueState"), _ StateActivity) smwi.SetState(high)Else
Dim low As StateActivity = _ CType(smwi.StateMachineWorkflow.Activities("LowValueState"), _
StateActivity) smwi.SetState(low)End If
Answer: A, D

Q: 10 A custom activity defined in an assembly named LitwareActivities is defined as follows:
Namespace LitwareActivities
Public Class WriteLineActivity
Inherits Activity
Protected Overrides Function Execute(ByVal executionContext As
System.Workflow.ComponentModel.ActivityExecutionContext) _ As
System.Workflow.ComponentModel.ActivityExecutionStatus
Console.WriteLine(Message)
Return ActivityExecutionStatus.Closed
End Function
Private aMessage As String
Public Property Message() As String
Get
Return aMessage
End Get
Set(ByVal value As String)
aMessage = value
End Set
End Property
End Class
End Namespace
You need to create a sequential workflow where the execution path can be generated on the fly by an application.
Which XML code segment should you use?
A. <SequentialWorkflowActivity
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"xmlns:x="http://schemas. microsoft.com/winfx/20
xmlns:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"><Litware:WriteLineActivity
Message="Hello, WF"/></SequentialWorkflowActivity>
B. <Workflow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"xmlns:x="http://schemas. microsoft.com/winfx/20
xmlns:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"><Litware:WriteLineActivity
Message="Hello, WF"/></Workflow>
C. <Workflow xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
class:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"> <Litware:WriteLineActivity
Message="Hello, WF"/></Workflow>
D. <SequentialWorkflowActivity
class:Litware="clr-namespace:LitwareActivities;assembly=LitwareActivities"> <Litware:WriteLineActivity
Message="Hello, WF"/></SequentialWorkflowActivity>
Answer: A

Q: 11 You create a workflow host application by using Microsoft .NET Framework 3.5. You use Windows Workflow Foundation to create the application.
You need to configure the workflow runtime to ensure that all the workflow instances run
asynchronously.
Which code segment should you use?
A. Dim runtime As New WorkflowRuntime()runtime.StartRuntime()Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(CustomerWorkflow))instance.Start()
B. Dim runtime As New WorkflowRuntime()runtime.StartRuntime()Dim scheduler As
ManualWorkflowSchedulerService = _ runtime.GetService(Of ManualWorkflowSchedulerService)()Dim
instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(CustomerWorkflow))scheduler.RunWorkflow(instance.InstanceId)
C. Dim runtime As New WorkflowRuntime()Dim scheduler As New
ManualWorkflowSchedulerService()runtime.AddService(scheduler)runtime.StartRuntime()Dim instance As
WorkflowInstance = _ runtime.CreateWorkflow(GetType(CustomerWorkflow))instance.Start()
D. Dim runtime As New WorkflowRuntime()runtime.StartRuntime()Dim scheduler As New
DefaultWorkflowSchedulerService()runtime.AddService(scheduler)Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(CustomerWorkflow))instance.Start()
Answer: A

Q: 12 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 check if 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 Dim newAmount As Int32 = 15000
02 Dim workflowchanges As _
03 New WorkflowChanges(instance.GetWorkflowDefinition())
04 Dim transient As CompositeActivity = _
05 workflowchanges.TransientWorkflow
06 Dim ruleDefinitions As RuleDefinitions = CType( _
07 transient.GetValue(ruleDefinitions. _
08 RuleDefinitionsProperty), RuleDefinitions)
09 Dim conditions As RuleConditionCollection = _
10 ruleDefinitions.Conditions
11
12 TryCast(condition1.Expression, _
13 CodeBinaryOperatorExpression).Right = _
14 New CodePrimitiveExpression(newAmount)
15 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 11?

A. Dim condition1 As RuleExpressionCondition = _ CType(conditions("Check"), RuleExpressionCondition)
B. Dim condition1 As RuleExpressionCondition = _ CType(conditions("ifElseBranch1"), _
RuleExpressionCondition)
C. Dim condition1 As RuleExpressionCondition = _ CType(conditions("ifElseBranch2"), _
RuleExpressionCondition)
D. Dim condition1 As RuleExpressionCondition = _ CType(conditions("Declarative Rule Condition"), _ RuleExpressionCondition)
Answer: A

Q: 13 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?
A. Include a custom activity with a code segment that includes an invocation to the CreateWorkflow method of the WorkflowRuntime class and then starts the workflow. The signature of the CreateWorkflow method invoked uses only the workflowType parameter.
B. Include a custom activity with a code segment that includes an invocation to the CreateWorkflow method of WorkflowRuntime class and then starts the workflow. The signature of the CreateWorkflow method invoked uses only the XmlReader and workflowDefinitionReader parameters.
C. Include a custom activity with a code segment that includes an invocation to the CreateWorkflow method of the WorkflowRuntime class and then starts the workflow. The signature of the CreateWorkflow method invoked uses only the workflowType, Dictionary<string,Object> namedArgumentValues, and Guid instanceId parameters.
D. Include and configure an InvokeWorkflow activity
Answer: B

Q: 14 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The application contains a state machine workflow.
You need to ensure that the workflow can initialize variables before it enters the ProcessingOrder state.
What should you do?
A. Write the initialization code in an instance of the CodeActivity class in the ProcessingOrder state.
B. Create a new custom activity derived from the CodeActivity class. Write the initialization code in the activity. Add the activity as the first activity in the ProcessingOrder state.
C. Write the initialization code in a method in an external .NET Framework component. Invoke the component by using an instance of the CallExternalMethodActivity class in the ProcessingOrder state.
D. Add an instance of the StateInitializationActivity class to the ProcessingOrder state. Add an instance of the CodeActivity class to the StateInitializationActivity class to perform the initialization.
Answer: D

Q: 15 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The application uses an InvokeWebServiceActivity activity.
You need to encrypt the data transmitted to a Web service.
What should you do?
A. Encrypt the MethodName property.
B. Initialize the MethodName property by using the GetHashCode method of the InvokeWebServiceEventArgs object.
C. Retrieve the WebServiceProxy property of the InvokeWebServiceEventArgs object in the Invoking event handler. Perform encryption on the retrieved Web service proxy.
D. Retrieve the WebServiceProxy property of the InvokeWebServiceEventArgs object in the Invoked event handler. Perform encryption on the retrieved Web service proxy.
Answer: C

Q: 16 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?
A. The wca.exe utility
B. The wfc.exe utility
C. The xsd.exe utility
D. The svcutil.exe utility
Answer: A

Q: 17 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The application uses the InvokeWebServiceActivity activity to call a Web service.
You need to identify the method in the proxy class that you can use to communicate with the Web service.
Which line of code should you use?
A. Dim Method As String = Me.invokeWebServiceActivity1.Name
B. Dim Method As String = Me.invokeWebServiceActivity1.MethodName
C. Dim Method As String = Me.invokeWebServiceActivity1.QualifiedName
D. Dim Method As String = Me.invokeWebServiceActivity1.ToString()
Answer: B

Q: 18 You are creating a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You add five WebServiceInputActivity activities to the workflow.
You need to ensure that the workflow starts each time a client calls the workflow as a Web service method.
What should you do?
A. Set the Enabled property of the first WebServiceInputActivity activity to true. Set the Enabled property of the other WebServiceInputActivity activities to false.
B. Set the Enabled property of the first WebServiceInputActivity activity to false. Set the IsActivating property of the first WebServiceInputActivity activity to true.
C. Set the Enabled property of the first WebServiceInputActivity activity to false. Set the Enabled property of the other WebServiceInputActivity activities to true.
D. Set the Enabled property of all the WebServiceInputActivity activities to true. Set the IsActivating property of the first WebServiceInputActivity activity to true. Set the IsActivating property of the other WebServiceInputActivity activities to false.
Answer: D

Q: 19 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
Function CreateOrder(ByVal customerId As String) As Boolean
Function CancelOrder(ByVal orderId As String) As Boolean
Function SuspendOrder(ByVal ordered As String) As Boolean
End Interface
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?
A. wfc.exe
B. csc.exe
C. wca.exe
D. vbc.exe
Answer: C

Q: 20 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The application uses InvokeWebServiceActivity activities.
You need to ensure that the application calls a logging module when a Web service call completes.
What should you do?
A. Bind an event handler to the Invoking event of the InvokeWebServiceActivity activity. Call the logging module from the event handler.
B. Bind an event handler to the Invoked event of the InvokeWebServiceActivity activity. Call the logging module from the event handler.
C. Bind the StatusChanged event of the InvokeWebServiceActivity activity. If the current status is Executing call the logging module from its event handler.
D. Bind the StatusChanged event of the InvokeWebServiceActivity activity. If the current status is Compensating call the logging module from its event handler.
Answer: B


© 2014 Cheat-Test.com, All Rights Reserved