You are on page 1of 13

MATERIAL FOR PRPC CERTIFICATION 5.

4
Decision Rules

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


Decision Rules % of EXAM - 6%

• Decision Rule Types


• Decision Rules define computations and comparisons that may cause processing to continue
along one path or another
• Decision rules may be maintained separately from the flow, allowing business users to
maintain assigned decision rules

• Describe the following types of decision rules and their function.


– Decision Table Rules
– Decision Tree Rules
– Map Value Rules
– When Condition Rule

• Decision Table Rule


– Defines a series of tests performed on property values to make an automated
decision.
– Each row contains test condition and result
– Each row is evaluated sequentially, from top to bottom
– The returned condition is determined by the first row which evaluates to true. If
no row is evaluated to true it returns the action defined in otherwise row.
– If a cell in the decision table kept blank it is considered as true
– A Decision table is an instance of class Rule-Declare-Decision Table
– A decision table can be edited on an excel sheet.

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


2
Decision Rules % of EXAM - 6%

• Decision Table Rule…


– Can be referenced from
» Decision shape in the flow
» From Decision Rules themselves
» From an activity using Property-Map-DecisionTable method
» From R-D-E rules
– Show Conflicts Button – Allows to identify unreachable or any rows that are
completely blank.
– Show Completeness Button –Rows are added to fill possible gaps so that it
minimizes the chance that reaches otherwise part.
– When unit testing it can generate auto test cases.

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


3
Decision Rules % of EXAM - 6%

• Decision Table Rule… How to unit test

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


4
Decision Rules % of EXAM - 6%

• Decision Tree Rule


– Is an instance of class Rule-Declare-DecisionTree
– Can be used to record the complex if—then—else logic
– Are referenced from
» Decision shape in a flow
» An activirty using Property-Map-DecisionTree method
» R-D-E
» Decision Rules
– When unit tested can generate auto test cases
– Possible evaluation options in the Decision tab depends on the functions allowed
in the Results tab (This is configurable)

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


5
Decision Rules % of EXAM - 6%

• Decision Tree Rule…

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


6
Decision Rules % of EXAM - 6%

• Map Values
– An instance of class Rule-Obj-MapValue
– There are 2 types of Map values –One input map value and Two input map value
– It can create a table of number, text, or date ranges that converts one or two
input values, such as latitude and longitude numbers, into a calculated result
value, such as a city name. Map value rules greatly simplify decisions based on
ranges of one or two inputs.

– Map values are referenced from


» Other map values
» R-D-E
» In an activity using method Property-Map-Value (For single input map
value) or Property-Map-ValuePair (For two input map values)
» Decision shape of flow rule

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


7
Decision Rules % of EXAM - 6%

• Map Values …

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


8
Decision Rules % of EXAM - 6%

• When conditions
– Evaluates a Boolean logical statement involving values of properties, to return a value
of true or false
– When creating When rules use Quick Create option if the condition is really simple.
– Use Conditions tab to create logical statements with AND & OR (At a given when
condition you can use only ANDs or only ORs in conditions tab)
– Are referenced from :
» Fork shape in flows
» In activities as pre condition or transitions
» In UI related rules (Harness, Sections) as Visible when
» In flow actions to conditionally display flow actions at run time (used in Security
tab of the flow action)
– If Advanced tab is used complex conditions can be built (Using AND, OR, NOT).
– Alternatively, you may use the expression builder to create your own expression Note:
When Conditions must evaluate to True or False

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


9
Decision Rules % of EXAM - 6%

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


10
Decision Rules % of EXAM - 6%

• Compare Different Decision Rule Types and identify when to use them
• Use Decision Tables when
– The tests are based on the same set of properties
– Data is easy to see in tabular format
– The table format is preferred by business analyst and can be
exported/edited in Excel
• Use Decision Trees when
– The test tend to be for different properties
– Very flexible. Good for complex and nested conditions
– IF THEN ELSE type of logic is often more familiar for IT
• Use Map Values
– The test is based on one or two inputs ex: Locate cities based on longitude
and latitude.
• Use When conditions
– Required output is Boolean

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


11
Decision Rules % of EXAM - 6%

• Fork and Decision Shapes


• Explain the difference between fork shapes and decision shape in a flow
• Decision Shape
– Represent an automated decision based on inputs from the flow and
work object
– The shape can call
» Decision Tree
» Decision Table
» Map Value
• Fork Shape
– Use this shape to represent a when condition in a flow
– Multiple when connectors can branch from same flow
– When connectors are evaluated in the sequence of likelihood value
– Evaluation stops at the first when connector that is true
– It is a best practice to use Else connector, in the case of all the when
conditions fail.

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


12
Q&A

????

Copyright ©2004 Virtusa Corporation | CONFIDENTIAL


13

You might also like