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.)
The workflow implements an if condition as shown in the following exhibit. (Click the Exhibit button for the if condition image.)
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;
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 = (RuleExpressionCondition)conditions[“Check”];
B.
RuleExpressionCondition condition1 = (RuleExpressionCondition)conditions[“ifElseBranch1”];
C.
RuleExpressionCondition condition1 = (RuleExpressionCondition)conditions[“ifElseBranch2”];
D.
RuleExpressionCondition condition1 = (RuleExpressionCondition)conditions[“Declarative Rule Condition”];