PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Similar documents
PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Real4Test. Real IT Certification Exam Study materials/braindumps

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

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

Build Process Driven Applications with WF

Part Two: Understanding Microsoft Windows Workflow Foundation (WF) and the Rules for.net Integration

The C# Programming Language. Overview

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Chapter 4. Advanced Activity Execution

EL-USB-RT API Guide V1.0

Event-based Asynchronous Pattern Overview 1 Implementing the Event-based Asynchronous Pattern 5 Deciding When to Implement the Event-based

Game Engineering: 2D

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Understanding Events in C#

Threads are lightweight processes responsible for multitasking within a single application.

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Introduction to Programming Using Java (98-388)

Objectives. Introduce static keyword examine syntax describe common uses

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

CS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question)

Exercise Session Week 8

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Asynchronous Programming Model (APM) 1 Calling Asynchronous Methods Using IAsyncResult 4 Blocking Application Execution by Ending an Async Operation

Exercise Session Week 8

Langage C# et environnement.net M1 Année

Handle Web Application Errors

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

1 de :02

Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#)

MCSA Universal Windows Platform. A Success Guide to Prepare- Programming in C# edusum.com

1Z Oracle. Java Platform Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert

Q&As. Microsoft MTA Software Development Fundamentals. Pass Microsoft Exam with 100% Guarantee

Vendor: Oracle. Exam Code: 1Z Exam Name: Java SE 8 Programmer. Version: Demo

Exam Questions 1Z0-895

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Chapter 13: Handling Events

70-573(CSharp) Q&A. DEMO Version

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

COMP 401 Spring 2013 Midterm 2

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

ITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!

Introduction to Microsoft.NET Framework Programming using VS 2005 (C#)

Oracle EXAM - 1Z Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam. Buy Full Product.

COE318 Lecture Notes Week 10 (Nov 7, 2011)

C# Asynchronous Programming Model

Exam Name: Oracle Database 11g: Program with PL/SQL

Class, Variable, Constructor, Object, Method Questions

IST311 Chapter 8: C# Collections - Index-Sequential Search List & Dictionary PROGRAM

Hierarchical inheritance: Contains one base class and multiple derived classes of the same base class.

02 Features of C#, Part 1. Jerry Nixon Microsoft Developer Evangelist Daren May President & Co-founder, Crank211

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

DOT NET Syllabus (6 Months)

PASS4TEST IT 인증시험덤프전문사이트

Assertions, pre/postconditions

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Delegate.Sandbox: I/O side-effects safe computations in Prosa F#unctional Copenhageners Meetup Group (MF#K)

Step 1: Start a GUI Project. Start->New Project->Visual C# ->Windows Forms Application. Name: Wack-A-Gopher. Step 2: Add Content

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

private void closetoolstripmenuitem_click(object sender, EventArgs e) { this.close(); }

COMP 401 Spring 2013 Midterm 2

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

2310C VB - Developing Web Applications Using Microsoft Visual Studio 2008 Course Number: 2310C Course Length: 5 Days

CLASS DESIGN. Objectives MODULE 4

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Chapter 12: How to Create and Use Classes

Java SE 7 Programming

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Test iz programskog jezika C# - ASP Izaberite tačan odgovor. Student's name : Programiranje ASP C# 1) A local variable

IT Certification Exams Provider! Weofferfreeupdateserviceforoneyear! h ps://

POLYMORPHISM 2 PART Abstract Classes Static and Dynamic Casting Common Programming Errors

POLYMORPHISM 2 PART. Shared Interface. Discussions. Abstract Base Classes. Abstract Base Classes and Pure Virtual Methods EXAMPLE

CSC Java Programming, Fall Java Data Types and Control Constructs

TypeScript. Types. CS144: Web Applications

MVP1: Introduction to concurrency in JAVA

CS 162, Lecture 25: Exam II Review. 30 May 2018

Enzo Framework API Reference Guide

Getting Started with IVI-COM Drivers for the Lambda Genesys Power Supply

Multiple processes can run in parallel on a single computer and multiple threads can run in parallel in a single process.

Java SE 7 Programming

Microsoft q. Exam Code: Exam Name: Programming in C#

COMP 401 Fall 2014 Midterm 2

.Net Technologies. Components of.net Framework

Lecture 21: Concurrency in Other Environments (Part 2)

PES INSTITUTE OF TECHNOLOGY (BSC) V MCA, Second IA Test, OCTOBER 2017 Programming Using C#.NET (13MCA53) Solution Set Faculty: Jeny Jijo

Migrate Your Skills to Microsoft.NET Framework 2.0 and 3.0 using Visual Studio 2005 (C#)

Adobe Sign for Salesforce

Contents. Timer Thread Synchronization

Rest Client for MicroProfile. John D. Ament

Exam Questions Demo Microsoft. Exam Questions

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

SLD 2.0 Implementation Guide

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Creating a Transacted Resource Using System.Transactions (Lab 2) (Visual C#, Visual Basic)

Introduction to C# Applications

Test Isolation and Mocking

Transcription:

PASS4TEST IT Certification Guaranteed, The Easy Way! \ http://www.pass4test.com We offer free update service for one year

Exam : 070-504-Csharp Title : TS: Microsoft.NET Framework 3.5 - C Windows Workflow Foundation Vendors : Microsoft Version : DEMO Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 1

1. 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 void codeactivity_executecode(object sender, EventArgs e) { CodeActivity delay = sender as CodeActivity; Console.WriteLine(delay.Name); WorkflowChanges workflowchanges = new WorkflowChanges(this); CodeActivity codeactivity = new CodeActivity(); codeactivity.name = "codeactivity2"; codeactivity.executecode += new EventHandler(codeActivity2_ExecuteCode); workflowchanges.transientworkflow.activities.add(codeactivity); this.applyworkflowchanges(workflowchanges); private void codeactivity2_executecode(object sender, EventArgs e) { CodeActivity codeactivity = sender as CodeActivity; Console.WriteLine(codeActivity.Name); Console.ReadLine(); You also have set the modifiability of the workflow to a code condition that is set to the following function: private void UpdateCondition(object sender, ConditionalEventArgs e) { if (TimeSpan.Compare(this.delayActivity.TimeoutDuration, new TimeSpan(0, 0, 5)) > 0) { e.result = false; else { e.result = true; 2 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 2

Which code segment should you use to handle the exception? A. workflowchanges.transientworkflow.activities.add(codeactivity); try { this.applyworkflowchanges(workflowchanges); catch (ArgumentOutOfRangeException ex) { Console.WriteLine(ex.GetType().ToString()); Console.ReadLine(); B. workflowchanges.transientworkflow.activities.add(codeactivity); try { this.applyworkflowchanges(workflowchanges); catch (InvalidProgramException ex) { Console.WriteLine(ex.GetType().ToString()); Console.ReadLine(); C. workflowchanges.transientworkflow.activities.add(codeactivity); try { this.applyworkflowchanges(workflowchanges); catch (InvalidOperationException ex) { Console.WriteLine(ex.GetType().ToString()); Console.ReadLine(); D. workflowchanges.transientworkflow.activities.add(codeactivity); try { this.applyworkflowchanges(workflowchanges); catch (OverflowException ex) { 3 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 3

Console.WriteLine(ex.GetType().ToString()); Console.ReadLine(); Answer: C 2. A windows application invokes a workflow that performs complex calculations. When the calculation is done, the workflow returns the calculated value to the windows application, which must display the calculated value in a textbox control, as follows: public void ShowData(string value) { mytextbox.text = value You need to ensure the workflow updates the value in the textbox control. What should you do? A. Have the workflow directly call the ShowData() method. B. Have the workflow call a method in an interface decorated with an [ExternalDataExchange()] attribute that invokes the ShowData() method directly C. Set the workflow to call a method in an interface decorated with an [ExternalDataEventArg()] attribute that invokes the ShowData() method directly D. Set the workflow to call a method in a interface decorated with an [ExternalDataExchange()] attribute that invokes the ShowData() method indirectly through a delegate if the this.invokerequired condition is true. Answer: D 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 4 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 4

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 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: BD 5. 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 WorkflowRuntime runtime = new WorkflowRuntime(); 02 WorkflowInstance instance = 03 runtime.createworkflow(typeof(workflow1)); 04 instance.start(); 5 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 5

05 You need to identify the current state of the workflow. Which code segment should you insert at line 05? A. string currentstate = instance.getworkflowdefinition().tostring(); B. string currentstate = instance.getworkflowdefinition().executionstatus.tostring(); C. StateMachineWorkflowInstance smwi = new StateMachineWorkflowInstance(runtime, instance.instanceid); string currentstate = smwi.statehistory[0]; D. StateMachineWorkflowInstance smwi = new StateMachineWorkflowInstance(runtime, instance.instanceid); string currentstate = smwi.currentstatename; Answer: D 6. 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.) A. if (amount >= 1000) 6 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 6

smwi.setstate("highvaluestate"); else smwi.setstate("lowvaluestate"); B. if (amount >= 1000) smwi.statemachineworkflow.setvalue (DynamicUpdateWorkflow.StatusProperty,"HighValueState") else smwi.statemachineworkflow.setvalue (DynamicUpdateWorkflow.StatusProperty, "LowValueState"); C. if (amount >= 1000) instance.getworkflowdefinition().setvalue (DynamicUpdateWorkflow.StatusProperty,"HighValueState"); else instance.getworkflowdefinition().setvalue (DynamicUpdateWorkflow.StatusProperty,"LowValueState"); D. if (amount >= 1000) { StateActivity high = (StateActivity) smwi.statemachineworkflow.activities["highvaluestate"]; smwi.setstate(high); else { StateActivity low = (StateActivity) smwi.statemachineworkflow.activities["lowvaluestate"]; smwi.setstate(low); Answer: AD 7. You create a Windows Workflow Foundation application by using Microsoft.NET Framework 3.5. 7 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 7

The application uses a code-only workflow. You define the workflow logic by programmatically adding activities. You write the following code segment. public sealed partial class Workflow1 : SequentialWorkflowActivity {... You also write the following code segment to add a DelayActivity activity to a workflow. this.canmodifyactivities = true; DelayActivity delay = new DelayActivity(); delay.timeoutduration = new TimeSpan(0, 0, 5); this.activities.add(delay); this.canmodifyactivities = false; You need to insert the DelayActivity activity code segment at the correct location in the workflow. What should you do? A. Place the following code segment in the class constructor. public Workflow1() {... B. Use the following code segment to override the InitializeProperties method. protected override void InitializeProperties() {... C. Use the following code segment to override the Execute method. protected override ActivityExecutionStatus Execute( ActivityExecutionContext executioncontext) {... D. Override the Initialize method in the following manner. protected override void Initialize( 8 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 8

?IServiceProvider provider) { base.initialize(activity);... Answer: A 8. 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. WorkflowRuntime runtime = new WorkflowRuntime(); runtime.startruntime(); WorkflowInstance instance = runtime.createworkflow(typeof(customerworkflow)); instance.start(); B. WorkflowRuntime runtime = new WorkflowRuntime(); runtime.startruntime(); ManualWorkflowSchedulerService scheduler = runtime.getservice<manualworkflowschedulerservice>(); WorkflowInstance instance = runtime.createworkflow(typeof(customerworkflow)); scheduler.runworkflow(instance.instanceid); C. WorkflowRuntime runtime = new WorkflowRuntime(); ManualWorkflowSchedulerService scheduler = new ManualWorkflowSchedulerService(); runtime.addservice(scheduler); runtime.startruntime(); WorkflowInstance instance = runtime.createworkflow(typeof(customerworkflow)); instance.start(); 9 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 9

D. WorkflowRuntime runtime = new WorkflowRuntime(); runtime.startruntime(); DefaultWorkflowSchedulerService scheduler = new DefaultWorkflowSchedulerService(); runtime.addservice(scheduler); WorkflowInstance instance = runtime.createworkflow(typeof(customerworkflow)); instance.start(); Answer: A 9. You create a Windows Workflow Foundation application by using Microsoft.NET Framework 3.5. The application uses a workflow host that runs in a console application. The workflow runtime uses the default threading behavior. You plan to attach the workflow runtime to two events. You write the following code segment to handle the events. static void runtime_workflowcompleted( object sender, WorkflowCompletedEventArgs e) { waithandle.set(); You also define the class fields in the following manner. private static AutoResetEvent waithandle; private static WorkflowRuntime runtime = new WorkflowRuntime(); You write the following code segment in the Main method of the console application. 01 runtime.workflowcompleted += 02 new EventHandler<WorkflowCompletedEventArgs>( 03 runtime_workflowcompleted); 04 WorkflowInstance wi = runtime.createworkflow(typeof(wf)); 05 You need to ensure that the console application does not exit before the workflow instance completes 10 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 10

execution. Which code segment should you insert at line 05? A. waithandle = new AutoResetEvent(false); waithandle.waitone(); wi.start(); B. waithandle = new AutoResetEvent(true); wi.start(); waithandle.waitone(); C. waithandle = new AutoResetEvent(false); wi.start(); waithandle.waitone(); D. waithandle = new AutoResetEvent(true); waithandle.waitone(); wi.start(); Answer: C 10. 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. WorkflowRuntime runtime = new WorkflowRuntime(); ProcessOrders processorders = new ProcessOrders(); processorders.employeeid = "NBK"; WorkflowInstance instance = runtime.createworkflow(typeof(processorders)); B. WorkflowRuntime runtime = new WorkflowRuntime(); ProcessOrders processorders = new ProcessOrders (); 11 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 11

processorders.setvalue(processorders.employeeidproperty,? "NBK"); WorkflowInstance instance = runtime.createworkflow(typeof(processorders)); C. WorkflowRuntime runtime = new WorkflowRuntime(); Dictionary<string, object> dict = new Dictionary<string,object>(); dict.add("employeeid", "NBK"); WorkflowInstance instance = runtime.createworkflow(typeof(processorders), dict); D. WorkflowRuntime runtime = new WorkflowRuntime(); Dictionary<string, object> dict = new Dictionary<string,object>(); dict.add("employeeidproperty", "NBK"); WorkflowInstance instance = runtime.createworkflow(typeof(processorders), dict); Answer: C 11. You create a Windows Workflow Foundation application by using Microsoft.NET Framework 3.5. The application contains a sequential workflow. A new business policy requires the workflow to execute all the activities except the POCreated activity. You write the following code segment in the host application. (Line numbers are included for reference only.) 01 WorkflowRuntime runtime = new WorkflowRuntime(); 02 WorkflowInstance workflowinstance = 03 runtime.getworkflow(instanceid); 04 Activity wroot = workflowinstance.getworkflowdefinition(); 05 The variable instanceid contains the ID of the workflow. You need to ensure that the new business policy is applied. 12 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 12

Which code segment should you insert at line 05? A. WorkflowChanges changes = new WorkflowChanges(wRoot); Activity POCreated =?workflowinstance.getworkflowdefinition(); changes.transientworkflow.activities.remove(pocreated); workflowinstance.load(); B. WorkflowChanges changes = new WorkflowChanges(wRoot); Activity POCreated = changes.transientworkflow.activities["pocreated"]; changes.transientworkflow.activities.remove(pocreated); workflowinstance.applyworkflowchanges(changes); C. workflowinstance.unload(); WorkflowChanges changes = new WorkflowChanges(wRoot); Activity POCreated = changes.transientworkflow.activities["pocreated"]; changes.transientworkflow.activities.remove(pocreated); workflowinstance.load(); D. workflowinstance.suspend("removing activity"); WorkflowChanges changes = new WorkflowChanges(wRoot); Activity POCreated = changes.transientworkflow.activities["pocreated"]; changes.transientworkflow.activities.remove(pocreated); workflowinstance.load(); Answer: B 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.) 13 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 13

The workflow implements an if condition as shown in the following exhibit. (Click the Exhibit button for the if condition image.) 14 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 14

A new business policy requires the application to ascertain whether 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 Int32 newamount = 15000; 02 WorkflowChanges workflowchanges = 03 new WorkflowChanges(instance.GetWorkflowDefinition()); 04 CompositeActivity transient = 05 workflowchanges.transientworkflow; 06 RuleDefinitions ruledefinitions = (RuleDefinitions) 07 transient.getvalue(ruledefinitions.ruledefinitionsproperty); 08 RuleConditionCollection conditions = 09 ruledefinitions.conditions; 10 11 (condition1.expression as CodeBinaryOperatorExpression).Right 12?= new CodePrimitiveExpression(newAmount); 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 10? A. RuleExpressionCondition condition1 = 15 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 15

(RuleExpressionCondition)conditions["Check"]; B. RuleExpressionCondition condition1 = (RuleExpressionCondition)conditions["ifElseBranch1"]; C. RuleExpressionCondition condition1 = (RuleExpressionCondition)conditions["ifElseBranch2"]; D. RuleExpressionCondition condition1 = (RuleExpressionCondition)conditions["Declarative Rule Condition"]; Answer: A 13. 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 { void CreateTask(string taskid, string assignee, string text); event EventHandler<TaskEventArgs> TaskCompleted; B. [ExternalDataExchange] public interface ITaskService { void CreateTask(string taskid, string assignee, string text); [CorrelationAlias("taskId", "e.id")] [CorrelationInitializer()] 16 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 16

event EventHandler<TaskEventArgs> TaskCompleted; C. [ExternalDataExchange] public interface ITaskService { [CorrelationInitializer] void CreateTask(string taskid, string assignee, string text); [CorrelationAlias("taskId", "e.id")] event EventHandler<TaskEventArgs> TaskCompleted; D. [ExternalDataExchange] [CorrelationParameter("taskId")] public interface ITaskService { [CorrelationInitializer] void CreateTask(string taskid, string assignee, string text); [CorrelationAlias("taskId", "e.id")] event EventHandler<TaskEventArgs> TaskCompleted; Answer: D 14. 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. WorkflowRuntime runtime = new WorkflowRuntime(); CustomerDataExchange cde = new CustomerDataExchange(); runtime.addservice(cde); 17 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 17

B. WorkflowRuntime runtime = new WorkflowRuntime(); CustomerDataExchange cde = new CustomerDataExchange(); ExternalDataExchangeService dataservice = new ExternalDataExchangeService(); dataservice.addservice(cde); C. WorkflowRuntime runtime = new WorkflowRuntime(); ExternalDataExchangeService dataservice = new ExternalDataExchangeService(); CustomerDataExchange cde = new CustomerDataExchange(); dataservice.addservice(cde); runtime.addservice(dataservice); D. WorkflowRuntime runtime = new WorkflowRuntime(); ExternalDataExchangeService dataservice = new ExternalDataExchangeService(); runtime.addservice(dataservice); CustomerDataExchange cde = new CustomerDataExchange(); dataservice.addservice(cde); Answer: D 15. 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 { void CallHost(string somedata); B. [ExternalDataExchange] public interface ICommunicationService { 18 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 18

event EventHandler<ExternalDataEventArgs> CallHost; C. public class CommunicationService? : ExternalDataExchangeService { public event EventHandler<ExternalDataEventArgs> CallHost; D. public class CommunicationService? : ExternalDataExchangeService { public void CallHost(string somedata) { base.addservice(this); Answer: A 19 / 19 Get Latest & Valid 070-504-Csharp Exam's Question and Answers from Pass4test.com. 19