Simple Attribute-level validation in Entity Object in ADF

In this section, we have described how to add a simple validation against an attribute Entity Object. We have an employee EO has an attribute called Salary, whenever a user tries to insert/update salary greater than 10000, the validation checks and throws an exception.

Pre-Requisite

JDeveloper 12C

HR Schema (Oracle database ships with HR Schema)

Employee EO (Click here for instruction to create Employee EO)

Add Validation

Double click on the EmployeeEO >> Click Attribute >> Click Salary >> Click the Validation Rule > Click the +
icon to add a validation rule

051016_0201_SimpleAttri1 Simple Attribute level validation in Entity Object in ADF

Input the Rule as shown below. Here we are setting a rule; the Salary must be less than 10,000.

051016_0201_SimpleAttri2 Simple Attribute level validation in Entity Object in ADF

Click on the Failure Handling and input an error message. Click Ok.

051016_0201_SimpleAttri3 Simple Attribute level validation in Entity Object in ADF

Test the Validation

Right click on the AppModule.xml and select Run

051016_0201_SimpleAttri4 Simple Attribute level validation in Entity Object in ADF

In the AppModule wizard >> Double click on the EmployeeEO >> Input a Salary more than 10000 >> and click Commit as shown below. It will execute the validation, and throws an error message that it must be less than 10000.

051016_0201_SimpleAttri5 Simple Attribute level validation in Entity Object in ADF

govindan Simple Attribute level validation in Entity Object in ADF
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply šŸ™‚
govindan Simple Attribute level validation in Entity Object in ADF
Connect me
By | 2016-12-29T00:10:20+00:00 May 9th, 2016|Categories: ADF|Tags: , , |0 Comments
Like us on Facebook.
Connect!