Which code segment should you insert at line 06?

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.

Your application has a workflow named OrderWorkflow that has a rule set named OrderRuleSet.

You write the following code segment. (Line numbers are included for reference only.)

01 WorkflowRuntime workflowRuntime = new WorkflowRuntime(); 02 WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(OrderWorkflow)); 03 Activity wfDefinition = instance.GetWorkflowDefinition(); 04 WorkflowChanges changes = new WorkflowChanges(wfDefinition);
05 CompositeActivity transientWf = changes.TransientWorkflow; You need to read the current definition of the OrderRuleSet rule set.

Which code segment should you insert at line 06?

You create a Windows Workflow Foundation application by using Microsoft .NET Framework 3.5.

Your application has a workflow named OrderWorkflow that has a rule set named OrderRuleSet.

You write the following code segment. (Line numbers are included for reference only.)

01 WorkflowRuntime workflowRuntime = new WorkflowRuntime(); 02 WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(OrderWorkflow)); 03 Activity wfDefinition = instance.GetWorkflowDefinition(); 04 WorkflowChanges changes = new WorkflowChanges(wfDefinition);
05 CompositeActivity transientWf = changes.TransientWorkflow; You need to read the current definition of the OrderRuleSet rule set.

Which code segment should you insert at line 06?

A.
RuleSet ruleSet = (RuleSet)transientWf.UserData["OrderRuleSet"];

B.
RuleSet ruleSet = (RuleSet)transientWf.GetValue(
DependencyProperty.FromName("OrderRuleSet",typeof(RuleSet)));

C.
RuleDefinitions ruleDefs = (RuleDefinitions)
transientWf.UserData[RuleDefinitions.RuleDefinitionsProperty];RuleSet ruleSet = ruleDefs.RuleSets["OrderRuleSet"];

D.
RuleDefinitions ruleDefs = (RuleDefinitions)transientWf.GetValue( RuleDefinitions.RuleDefinitionsProperty);RuleSet ruleSet = ruleDefs.RuleSets["OrderRuleSet"];



Leave a Reply 0

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