Which code segment should you use?

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?

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 void OnSetupRoles(object sender, EventArgs e){ WorkflowRoleCollection poInitiators = new WorkflowRoleCollection(); ActiveDirectoryRole poInitiatorsRole = ActiveDirectoryRoleFactory.CreateFromAlias("Managers"); poInitiators.Add(poInitiatorsRole); InitiatePO.Roles = poInitiators ;}

B.
private void OnSetupRoles(object sender, EventArgs e){ WorkflowRoleCollection poInitiators = new WorkflowRoleCollection(); ActiveDirectoryRole poInitiatorsRole = ActiveDirectoryRoleFactory.CreateFromAlias("Managers"); InitiatePO.Roles = poInitiators;}

C.
private void OnSetupRoles(object sender, EventArgs e){ WorkflowRoleCollection poInitiators = new WorkflowRoleCollection(); ActiveDirectoryRole poInitiatorsRole = ActiveDirectoryRoleFactory.CreateFromAlias("Managers"); poInitiators.Add(poInitiatorsRole); InitiatePO.Roles.Contains(poInitiatorsRole) ;}

D.
private void OnSetupRoles(object sender, EventArgs e){ WorkflowRoleCollection poInitiators = new WorkflowRoleCollection(); ActiveDirectoryRole poInitiatorsRole =
ActiveDirectoryRoleFactory.CreateFromAlias("Managers"); poInitiators.Add(poInitiatorsRole); }



Leave a Reply 0

Your email address will not be published. Required fields are marked *