Automating Business Policies Flashcards
Declarative calculation and automated decision logic.
What is declarative processing?
Computational relationship among property values
Declared expression eg: Line item cost = Quantity X Unit Price
Declarative processing updates values automatically as inputs change.
What are the benefits of Declarative rules?
Declarative rules provide a way to determine property values automatically, the system generates the programming behind the scenes. Declarative rules model relationships between properties.
VALUE: FASTER DEVELOPMENT
EASIER MAINTENANCE
How many declarative rule types are there?
6 declarative rule types
1) Constraints *
2) Declare Expressions *
3) Declare on change
4) Declare Trigger
5) Declare Index
6) Data Pages *
* these are the important ones
what are constraints?
Constraints are how you enforce relationship between properties.
Eg: Do not allow loans longer than 3 years for vehicles that are older than 5 years.
Constraints can provide a declarative form of property validation every time the property’s value is “touched”, rather than the explicit validation provided by the property definition or validation rules. The system evaluates constraints automatically each time a property identified in a constraint is changed.
Define the “declare on change” declarative rule?
Declare on change performs an activity automatically when the value of a property that we specify to be monitored, changes. For example, we can use a Declare OnChange rule to increment a counter each time a work item is updated. Declare OnChange can also force all processing on a case to be suspended This may be needed when a case suddenly violates some business policy or federal guidelines
What are Declare Expressions?
Declare Expressions — define automatic computations of property values based on expressions. This expression may consist of property references, decision rule results, or other declare expressions.
+Create -> Decision -> Declarative expressions
Declare Expressions contain a target property and an expression. Any change to input values in the expression causes PRPC to automatically run the expression in the background and update the target property.
Whenever quantity or the unit price input values change, the total line item cost is calculated automatically by the system.
Which of the following provides a declarative form of property validation
Constraints
Of the six declarative rule types, four establish a dependency on a specific property or properties. Which two do not establish a dependency?
Declare Trigger
Data Page
When creating a declare expression, you must set the computation type on the _______.
Expressions tab of the Declare Expressions rule form
What is a WHEN rule?
It is a True-False condition based on comparing one or more properties with any other value or with other properties. KEEP THIS SIMPLE.
We are using the When rule when we know a condition exists, and we are checking to see if it exists.
+create -> decision -> WHEN
What does conditional processing do?
Conditional processing helps to process or skip a step, process or skip a stage or take an alternate path in a flow based on certain conditions.
“When rules” can be used for _____
Skip a stage
Process or skip a step in a stage.
Conditionally display UI elements.
THEY CANNOT Add a Decision shape automatically. (quiz question)
If the conditions are not as simple as True or false, what type of decision rules do you use?
Decsision Tables and Decision Trees
What are decision tables?
Decision table is formatted as a table of conditions and results. Use this when you are evaluating same properties for different results.
eg: The height and weight of a person determines different dress recommendations.
How do decision tables work?
A decision table consists of a table of conditions and results. We define a set of conditions and the results to return when the conditions are true. Each set of conditions contains a corresponding result.
When pega evaluates a decision table, it starts with the top row and evaluates each condition in the row. If all of the conditions are true, pega returns the result for that row. If not, it advances to the next row, and evaluates the conditions in that row. And if none of our combinations returns a result, pega returns the “otherwise result” at the bottom of the table. This ensure that the decision always returns a result.