Understanding Business Rules in VBCS Business Objects

Understanding Business Rules in VBCS Business Objects

Understanding Business Rules in VBCS Business Objects

In this section, we will try to understand business rules in VBCS business Objects.

Business rules are used to validate business objects and fields and trigger action based on events or field changes.

Business Rules can be access using below navigation in VBCS:

A screenshot of a computer

AI-generated content may be incorrect.

We can define 5 types of business rules for business objects in VBCS:

  1. Object Triggers.
  2. Field Triggers
  3. Object Validators
  4. Field Validators
  5. Object Functions.


Let us explore one by one.

A. Object Triggers:

Like we have Database triggers on database tables, we have object triggers on business objects.

Object triggers is a script which is executed in response to a specific business object event.

A screenshot of a computer

AI-generated content may be incorrect.

Once you define object triggers, we can add condition and action as shown below:

A screenshot of a computer

AI-generated content may be incorrect.

Once we specify condition, we can add action as shown below:

A screenshot of a computer

AI-generated content may be incorrect.

This will create a new Action Group as shown.

Action group is a group of actions which we can execute once condition is satisfied.

VBCS provides below actions in Action Group:

Business Object:

This will enable us to perform actions on other business objects like creating records or deleting records etc.

A screen shot of a computer

AI-generated content may be incorrect.

Process:

This will enable us to call processes defined in Oracle Process Automation (OPA).

A black background with white lines

AI-generated content may be incorrect.

Other scripting:

This will enable us to print log messages or send email or to write any custom groovy script.

A black screen with a black background

AI-generated content may be incorrect.

B. Field Triggers:

Field Triggers fires whenever a specific business object field changes in value.

Unlike object triggers which occur when any event happens, field triggers fires when specific field is changed.

A screenshot of a computer

AI-generated content may be incorrect.

It is listing all fields which are available in DeptBO.

Once we have created a field trigger, it will ask to define condition and action against that condition.

A screenshot of a computer

AI-generated content may be incorrect.

Once we specify criteria, it will ask for action as shown below:

A screenshot of a computer

AI-generated content may be incorrect.

Once we click on + Add Actions, it will again show all actions which are under the action group.

A black background with a black border

AI-generated content may be incorrect.

C. Object Validators:

Business object data can be validated against rules before submitting using object validators.

A screenshot of a computer

AI-generated content may be incorrect.

Once you define object validators, it will ask to define rules against which it will validate business object before submitting.

A screenshot of a computer

AI-generated content may be incorrect.

We can use Business objects/Functions/Services to define rules.

Also, we can make this object validators as Active/Inactive based on requirement.

We can define multiple object validators for one business object.

A screenshot of a computer

AI-generated content may be incorrect.

D. Field Validators:

Like object validators, we can also write rules or validations at field level which will be executed before submitting new values in the field.

A screenshot of a computer

AI-generated content may be incorrect.

Once you define field validators, it will ask to define rules or validations for that field.

A screenshot of a computer

AI-generated content may be incorrect.

We can refer to old and new values using field values. Also, we can refer to business objects, functions, service connections for adding validations.

We can make these rules validators as Active/Inactive based on requirement.

We can define multiple rule validators for one business object.

A screenshot of a computer

AI-generated content may be incorrect.

E. Object Functions:

Object functions are used to implement business logic for business object. Once we have defined object functions, we can call those functions from other scripts related to business object.

A screenshot of a computer

AI-generated content may be incorrect.

A screenshot of a computer

AI-generated content may be incorrect.

We can add parameters, business objects, functions and service connections to define object functions.

We need to use a groovy script for writing these scripts.

Leave a Reply

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

Back To Top