Les produits de Pass4Test sont préparés pour le test Certification Microsoft 70-504-VB, y compris les formations et les informations ciblées au test Microsoft 70-504-VB. D'ailleurs, la Q&A de Pass4Test qui est impressionnée par la grande couverture des questions et la haute précision des réponses vous permet à réussir le test avec une haute note.
Aujoud'hui, c'est une société de l'informatique. Beaucoup d'organisations peut provider l'outil de se former pour le test Certification Microsoft 70-504-VB. Mais on doit admettre que ces site n'ont pas la capacité à offrir une bonne Q&A, elles sont généralement très vagues et sans les points. C'est loin d'attirer les attentions des candidats.
Code d'Examen: 70-504-VB
Nom d'Examen: Microsoft (TS: MS.NET Frmewk 3.5, Workflow Foundation App Dev)
Questions et réponses: 96 Q&As
Pass4Test provide non seulement le produit de qualité, mais aussi le bon service. Si malheureusement vous ne pouvez pas réussir le test, votre argent sera tout rendu. Le service de la mise à jour gratuite est aussi pour vous bien que vous passiez le test Certification.
Au 21er siècle, il manque encore grand nombreux de gens qualifié de IT. Le test Certificat IT est une bonne façon à examiner les hommes de talent. Ce n'est pas un test facile à réussir. Un bon choix de formation est une assurance pour le succès de test. Le test simulation est bien proche que test réel. Vous pouvez réussir 100%, bien que ce soit la première à participer le test.
La partie plus nouvelle de test Certification Microsoft 70-504-VB est disponible à télécharger gratuitement dans le site de Pass4Test. Les exercices de Pass4Test sont bien proches de test réel Microsoft 70-504-VB. En comparaison les Q&As dans les autres sites, vous trouverez que les nôtres sont beaucoup plus complets. Les Q&As de Pass4Test sont tout recherchés par les experts de Pass4Test, y compris le test simulation.
Pass4Test est un fournisseur de formation pour une courte terme, et Pass4Test peut vous assurer le succès de test Microsoft 70-504-VB. Si malheureusement, vous échouez le test, votre argent sera tout rendu. Vous pouvez télécharger le démo gratuit avant de choisir Pass4Test. Au moment là, vous serez confiant sur Pass4Test.
70-504-VB Démo gratuit à télécharger: http://www.pass4test.fr/70-504-VB.html
NO.1 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
The application uses a markup-only workflow.
The workflow will also require the use of a code-beside file.
The following code fragment is implemented in XAML.
<SequentialWorkflowActivityx:Class="ProcessNewCustomer" Name="ProcessCustomer" xmlns=
"http://schemas.microsoft.com/winfx/2006/xaml/workflow"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</SequentialWorkflowActivity>
You need to create a class declaration to implement the custom code.
Which code segment should you use?
A. Partial Public Class ProcessNewCustomer
Inherits SequentialWorkflowActivity
' Class implementation code appears here.
End Class
B. Public Class ProcessNewCustomer
Inherits SequentialWorkflowActivity
' Class implementation code appears here.
End Class
C. Public Class ProcessNewCustomerCode
Inherits ProcessNewCustomer
' Class implementation code appears here.
End Class
D. Partial Public Class ProcessCustomer
Inherits SequentialWorkflowActivity
' Class implementation code appears here.
End Class
Answer: A
Microsoft examen 70-504-VB 70-504-VB examen
NO.2 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
Microsoft certification 70-504-VB certification 70-504-VB 70-504-VB
NO.3 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
Microsoft 70-504-VB certification 70-504-VB 70-504-VB
NO.4 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 AND D
Microsoft examen certification 70-504-VB 70-504-VB examen certification 70-504-VB certification 70-504-VB
NO.5 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You plan to add a workflow to implement an order processing logic.
When the host initiates the order processing logic, it raises an event named StartProcessing.
You need to configure the local communication interface to enable the workflow to handle the event.
Which code segment should you use?
A. Public Interface IContract
Event StartProcessing As EventHandler(Of ExternalDataEventArgs)
End Interface
B. Public Class Contract
Inherits ExternalDataExchangeService
Private Event StartProcessing As EventHandler(Of _
ExternalDataEventArgs)
End Class
C. <ExternalDataExchange()> _
Public Interface IContract
Event StartProcessing As EventHandler(Of EventArgs)
End Interface
D. <ExternalDataExchange()> _
Public Interface IContract
Event StartProcessing As EventHandler(Of ExternalDataEventArgs)
End Interface
Answer: D
certification Microsoft 70-504-VB 70-504-VB 70-504-VB 70-504-VB
NO.6 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. You
use the state machine workflow in the application.
You plan to implement a mechanism that allows a host application to query a state machine workflow
instance that is currently executing.
You write the following code segment. (Line numbers are included for reference only.)
01 Dim runtime As New WorkflowRuntime()
02 Dim instance As WorkflowInstance = _
03 runtime.CreateWorkflow(GetType(Workflow1))
04 instance.Start()
05
You need to identify the current state of the workflow.
Which code segment should you insert at line 05?
A. Dim currentstate As String = instance.GetWorkflowDefinition().ToString
B. Dim currentstate As String = _
instance.GetWorkflowDefinition().ExecutionStatus.ToString
C. Dim smwi As New StateMachineWorkflowInstance(runtime, _
instance.InstanceId)
Dim currentstate As String = smwi.StateHistory(0)
D. Dim smwi As New StateMachineWorkflowInstance(runtime, _
instance.InstanceId)
Dim currentstate As String = smwi.CurrentStateName
Answer: D
Microsoft 70-504-VB 70-504-VB 70-504-VB
NO.7 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
certification Microsoft 70-504-VB 70-504-VB examen 70-504-VB 70-504-VB
14. You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You plan to add a workflow to the application. You add a HandleExternalEvent activity named InitiatePO
to the workflow.
You need to ensure that the workflow responds only to events raised by the members of the Active
Directory role named Managers.
Which code segment should you use?
A. Private Sub OnSetupRoles(ByVal sender As Object, ByVal e As EventArgs)
Dim poInitiators As New WorkflowRoleCollection()
Dim poInitiatorsRole As ActiveDirectoryRole = _
ActiveDirectoryRoleFactory.CreateFromAlias("Managers")
poInitiators.Add(poInitiatorsRole)
InitiatePO.Roles = poInitiators
End Sub
B. Private Sub OnSetupRoles(ByVal sender As Object, ByVal e As EventArgs)
Dim poInitiators As New WorkflowRoleCollection()
Dim poInitiatorsRole As ActiveDirectoryRole = _
ActiveDirectoryRoleFactory.CreateFromAlias("Managers")
InitiatePO.Roles = poInitiators
End Sub
C. Private Sub OnSetupRoles(ByVal sender As Object, ByVal e As EventArgs)
Dim poInitiators As New WorkflowRoleCollection()
Dim poInitiatorsRole As ActiveDirectoryRole = _
ActiveDirectoryRoleFactory.CreateFromAlias("Managers")
poInitiators.Add(poInitiatorsRole)
InitiatePO.Roles.Contains(poInitiatorsRole)
End Sub
D. Private Sub OnSetupRoles(ByVal sender As Object, ByVal e As EventArgs)
Dim poInitiators As New WorkflowRoleCollection()
Dim poInitiatorsRole As ActiveDirectoryRole = _
ActiveDirectoryRoleFactory.CreateFromAlias("Managers")
poInitiators.Add(poInitiatorsRole)
End Sub
Answer: A
certification Microsoft 70-504-VB 70-504-VB examen certification 70-504-VB 70-504-VB
15. 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?
A. <ExternalDataExchange()> _
Public Interface ITaskService
Sub CreateTask(ByVal taskId As String, ByVal assignee As String, _
ByVal text As String)
Event TaskCompleted As EventHandler(Of TaskEventArgs)
End Interface
B. <ExternalDataExchange()> _
Public Interface ITaskService
Sub CreateTask(ByVal taskId As String, ByVal assignee As String, _
ByVal text As String)
<CorrelationAlias("taskId", "e.Id")> _
<CorrelationInitializer()> _
Event TaskCompleted As EventHandler(Of TaskEventArgs)
End Interface
C. <ExternalDataExchange()> _
Public Interface ITaskService
<CorrelationInitializer()> _
Sub CreateTask(ByVal taskId As String, ByVal assignee As String, _
ByVal text As String)
<CorrelationAlias("taskId", "e.Id")> _
Event TaskCompleted As EventHandler(Of TaskEventArgs)
End Interface
D. <ExternalDataExchange()> _
<CorrelationParameter("taskId")> _
Public Interface ITaskService
<CorrelationInitializer()> _
Sub CreateTask(ByVal taskId As String, ByVal assignee As String, _
ByVal text As String)
<CorrelationAlias("taskId", "e.Id")> _
Event TaskCompleted As EventHandler(Of TaskEventArgs)
End Interface
Answer: D
Microsoft examen 70-504-VB 70-504-VB examen 70-504-VB
NO.8 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
You plan to call a method in the workflow host to send messages.
You write the following code segment.
Public Interface IOrderCommunication
Sub UpdateOrder(ByVal orderId As String)
End Interface
You need to decorate the interface.
Which line of code should you use?
A. <LocalizableAttribute(true)>
B. <ExternalDataExchangeAttribute>
C. <CorrelationParameterAttribute("orderId")>
D. <ActivityCodeGeneratorAttribute("orderId")>
Answer: B
Microsoft 70-504-VB 70-504-VB
NO.9 You are creating a workflow host application by using Microsoft .NET Framework 3.5. You use
Windows Workflow Foundation to create the application.
You need to ensure that the host application can receive method calls from the workflow instances.
Which code segment should you use?
A. Dim loaderService As WorkflowLoaderService = New _
DefaultWorkflowLoaderService()
workflowRuntime.AddService(loaderService)
B. Dim dataService As New ExternalDataExchangeService()
workflowRuntime.AddService(dataService)
C. Dim scheduler As New ManualWorkflowSchedulerService()
workflowRuntime.AddService(scheduler)
D. Dim sqlService As New SqlWorkflowPersistenceService("<conn str>")
workflowRuntime.AddService(sqlService)
Answer: B
certification Microsoft 70-504-VB 70-504-VB examen certification 70-504-VB 70-504-VB
NO.10 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.
A Windows Forms application functions as the workflow host by using the
DefaultWorkflowSchedulerService.
You create a WorkflowRuntime instance in the Load event of the forms. You also subscribe to the
WorkflowCompleted event.
You need to ensure that the application displays the message in the Label control named lblStatus when
the WorkflowCompleted event is raised.
Which code segment should you use?
A. Private Sub UpdateInstances(ByVal id As Guid)
If Me.InvokeRequired Then
lblStatus.Text = id.ToString & " completed"
End If
End Sub
B. Private Sub UpdateInstances(ByVal id As Guid)
If (Not Me.InvokeRequired) Then
lblStatus.Text = id.ToString & " completed"
End If
End Sub
C. Private Delegate Sub UpdateInstancesDelegate(ByVal id As Guid)
Private Sub UpdateInstances(ByVal id As Guid)
If Me.InvokeRequired Then
Me.Invoke(New _
UpdateInstancesDelegate(AddressOf UpdateInstances), _
New Object() {id})
Else
lblStatus.Text = id.ToString & " completed"
End If
End Sub
D. Private Delegate Sub UpdateInstancesDelegate(ByVal id As Guid)
Private Sub UpdateInstances(ByVal id As Guid)
If Not Me.InvokeRequired Then
Me.Invoke(New _
UpdateInstancesDelegate(AddressOf UpdateInstances), _
New Object() {id})
Else
lblStatus.Text = id.ToString & " completed"
End If
End Sub
Answer: C
certification Microsoft 70-504-VB examen certification 70-504-VB
NO.11 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
Microsoft examen certification 70-504-VB 70-504-VB examen 70-504-VB
NO.12 You are creating a Windows Workflow Foundation workflow by using Microsoft .NET Framework 3.5.
The workflow host must receive data from workflow instances by using a communication service named
CustomerDataExchange.
You need to configure the workflow runtime services to enable communication between the host and the
workflow instances.
Which code segment should you use?
A. Dim runtime As New WorkflowRuntime()
Dim cde As New CustomerDataExchange()
runtime.AddService(cde)
B. Dim runtime As New WorkflowRuntime()
Dim cde As New CustomerDataExchange()
Dim dataService As New ExternalDataExchangeService()
dataService.AddService(cde)
C. Dim runtime As New WorkflowRuntime()
Dim dataService As New ExternalDataExchangeService()
Dim cde As New CustomerDataExchange()
dataService.AddService(cde)
runtime.AddService(dataService)
D. Dim runtime As New WorkflowRuntime()
Dim dataService As New ExternalDataExchangeService()
runtime.AddService(dataService)
Dim cde As New CustomerDataExchange()
dataService.AddService(cde)
Answer: D
Microsoft examen certification 70-504-VB 70-504-VB examen 70-504-VB examen
NO.13 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
Microsoft 70-504-VB certification 70-504-VB certification 70-504-VB 70-504-VB
NO.14 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 = _
NO.15 You are writing a sequential console workflow that consists of a delay activity and a code activity, as
shown in the exhibit. (Click the Exhibit button for the sequential console workflow image.)
In the execution code of the second activity, you try to modify the workflow as follows:
Private Sub delayActivity_InitializeTimeoutDuration(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Console.Title = "Modifiability of a Workflow"
Console.WriteLine("Wait ...")
End Sub
Private Sub codeActivity_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim delay As DelayActivity = CType(sender, DelayActivity)
Console.WriteLine(delay.Name)
Dim workflowChanges As New WorkflowChanges(Me)
Dim codeActivity As New CodeActivity()
codeActivity.Name = "codeActivity2"
AddHandler codeActivity.ExecuteCode, AddressOf Me.codeActivity2_ExecuteCode
workflowChanges.TransientWorkflow.Activities.Add(codeActivity)
Me.ApplyWorkflowChanges(workflowChanges)
End Sub
Private Sub codeActivity2_ExecuteCode(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim codeActivity As CodeActivity = CType(sender, CodeActivity)
Console.WriteLine(codeActivity.Name)
Console.ReadLine()
End Sub
You also have set the modifiability of the workflow to a code condition that is set to the following function:
Private Sub UpdateCondition(ByVal sender As System.Object, ByVal e As ConditionalEventArgs)
If (TimeSpan.Compare(Me.delayActivity.TimeoutDuration, New TimeSpan(0, 0, 5)) > 0) Then
e.Result = False
Else
e.Result = True
End If
End Sub
Which code segment should you use to handle the exception?
A. workflowChanges.TransientWorkflow.Activities.Add(codeActivity)
Try
Me.ApplyWorkflowChanges(workflowChanges)
Catch ex As ArgumentOutOfRangeException
Console.WriteLine(ex.GetType().ToString())
Console.ReadLine()
End Try
B. workflowChanges.TransientWorkflow.Activities.Add(codeActivity)
Try
Me.ApplyWorkflowChanges(workflowChanges)
Catch ex As InvalidProgramException
Console.WriteLine(ex.GetType().ToString())
Console.ReadLine()
End Try
C. workflowChanges.TransientWorkflow.Activities.Add(codeActivity)
Try
Me.ApplyWorkflowChanges(workflowChanges)
Catch ex As InvalidOperationException
Console.WriteLine(ex.GetType().ToString())
Console.ReadLine()
End Try
D. workflowChanges.TransientWorkflow.Activities.Add(codeActivity)
Try
Me.ApplyWorkflowChanges(workflowChanges)
Catch ex As OverflowException
Console.WriteLine(ex.GetType().ToString())
Console.ReadLine()
End Try
Answer: C
Microsoft 70-504-VB examen 70-504-VB
NO.16 New CodePrimitiveExpression(newAmount)
NO.17 You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5. The
application uses a sequential workflow.
The host application creates a workflow instance and stores it in a variable named instance. When the
workflow is executed, a business requirement requires the workflow execution to pause for a few minutes.
The host uses the following code segment.
Dim runtime As New WorkflowRuntime()
Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(MyWorkflow))
instance.Start()
You need to ensure that the following requirements are met:
The workflow execution is temporarily paused.
The workflow state is preserved in memory.
Which line of code should you use?
A. instance.Unload()
B. instance.TryUnload()
C. instance.Suspend(Nothing)
D. instance.Terminate(Nothing)
Answer: C
certification Microsoft 70-504-VB certification 70-504-VB 70-504-VB 70-504-VB examen
NO.18 You are creating a workflow application by using Microsoft .NET Framework 3.5. The application uses
local communication.
The workflow host must receive data from an existing workflow instance.
You need to define the communication between the workflow host and the workflow instance.
Which code segment should you use?
A. <ExternalDataExchange()> _
Public Interface ICommunicationService
Sub CallHost(ByVal someData As String)
End Interface
B. <ExternalDataExchange()> _
Public Interface ICommunicationService
Event CallHost As EventHandler(Of ExternalDataEventArgs)
End Interface
C. Public Class CommunicationService
Inherits ExternalDataExchangeService
Public Event CallHost As EventHandler(Of ExternalDataEventArgs)
End Class
D. Public Class CommunicationService
Inherits ExternalDataExchangeService
Public Sub CallHost(ByVal someData As String)
MyBase.AddService(Me)
End Sub
End Class
Answer: A
Microsoft 70-504-VB 70-504-VB
NO.19 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/2006/xaml"
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/2006/xaml"
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
Microsoft 70-504-VB 70-504-VB certification 70-504-VB
NO.20 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 AND D
Microsoft 70-504-VB examen certification 70-504-VB
Le suucès n'est pas loin de vous une fois que vous choisissez le produit de Q&A Microsoft 70-504-VB de Pass4Test.