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()] 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;}