Sunday, August 26, 2012

JDev/ADF sample - New Record Master-Detail Validation and ADF BC Groovy Use Case

  • New Record Master-Detail Validation and ADF BC Groovy Use Case. I will explain today implementation for Master-Detail validation rule - new Master record insert is not allowed, if there are no Detail records added.  ADF is powerful framework and there are different ways to implement same requirement - complexity is to choose the most suitable and optimal approach. Such validation rule can be implemented in Java, by overriding doDML() method on Entity Implementation class. While this works, also same rule can be implemented in Groovy script and declared as ADF BC business rule on Entity. Obviously its better to declare validation in standard way as Entity business rule, instead of coding it in Java logic (at least for current requirement) - it will make code maintenance and changes simpler.
    Download - MasterDetailGroovyValidationApp.zip

No comments: