This article is next in series of our learning PEGA. In the last two articles we learn what is PEGA and what are Work Type and Work Items in PEGA. In this post we will learn what are Business Rules in PEGA? In the traditional programming such as Java, .NET or C++ we use IF-ELSE-THEN or WHERE or WHILE to evaluate a property or data to make decisions. In PEGA we achieve it through Business Rules.
Business Rules are set of policies and principles that are applied by an organization to conduct business. There are set of rules setup by the company to conduct business. For example: A Bank might setup a rule to give XX amount of loan to people who have an annual income of $ 100,000 and credit score of > 700.
How to define Business Rule in PRPC?
Just like an Organization defines rules to conduct business PRPC provides functionalities to define business rule.
- Decision tree,
- Decision table,
- Map value
- When
Decision Tree: Decision tree is similar to IF-ELSE-THEN evaluation criteria we have in traditional programming. We can apply any number of criteria to evaluate the conditions. The works from Left to Right and Top to bottom. When a particular condition is meet the evaluation process is stopped. If none of the conditions are meeting a default or other value is return back to the calling function.
Decision Table: Decision table are similar to our SQL Tables where we apply WHERE clause to put conditions. We can write more than one condition. The table returns number of rows that meet the specific criteria.
Map Value: As per PRPC rule book Map Value allows us to look at one or two properties over any number of conditions to return any number of results. Map values only support two properties which can be evaluated.
When: Business Rule can be defined using When functionality. When functionality can evaluate any number of conditions. It works in similar fashion as IF-THEN-ELSE. It returns either True of false after evaluation.
Please visit PEGA Tutorials section for articles on PEGA and PRPC