70-504-VB
Microsoft
TS- Microsoft .NET Framework 3.5 -C Windows Workflow
Foundation

C. Dim runtime As New WorkflowRuntime()Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(CustomerWorkflow))runtime.StartRuntime()AddHan
dler runtime.WorkflowTerminated, AddressOf terminated
D. Dim runtime As New WorkflowRuntime()Dim instance As WorkflowInstance = _
runtime.CreateWorkflow(GetType(CustomerWorkflow))runtime.StartRuntime()AddHan
dler runtime.WorkflowAborted, AddressOf aborted
Answer:
C
QUESTION:
89
You create a Windows Workflow Foundation application by using Microsoft .NET
Framework 3.5. The application uses a sequential workflow. The workflow contains a
ParallelActivity activity that has two branches. You need to ensure that if the first branch
of the ParallelActivity activity throws an unhandled exception, the second branch
performs cancellation. What should you do?
A. Add an instance of the CancellationHandler class at the workflow level. Implement
the cleanup logic in the activity.
B. Add an instance of the CancellationHandler class to the ParallelActivity activity.
Implement the cleanup logic in the CancellationHandler class.
C. Add an instance of the CancellationHandler class to the first branch of the
ParallelActivity activity. Implement the cleanup logic in the activity.
D. Add an instance of the CancellationHandler class to the second branch of the
ParallelActivity activity. Implement the cleanup logic in the CancellationHandler class.
Answer:
D
QUESTION:
90
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()
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
52

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


You've reached the end of your free preview.
Want to read all 7 pages?
- Fall '20