Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Commit Data Control Frame PROGRAMMATICALLY causing JBO-27023: Failed to validate all rows

James.TranJan 12 2015 — edited Jan 26 2015

To implement a validation rule such that a Master record cannot be committed until there is at least 1 Details record, I am following the method from Andrejus's article - New Record Master-Detail Validation and ADF BC Groovy Use Case.

To test the method, I created a simple test application to create Deparments and Employees. Below is my Bounded task flow for creating a Department:

Capture.PNG

The "CreateWithParameters" is created simply to help me fill out DepartmentId and DepartmentName with "9999" and "Test Department" respectively so that I don't have to manually fill the form in every test.

To sum up, I made the following observation:

  1. If the Bounded task flow is set to "<No Controller Transaction>" and I use a normal Commit button from the Data Controls Panel to commit the data, the validation rule works properly. If I commit a new Department with no Employees, the error message is displayed.
  2. If the Bounded task flow is set to "<Always Begin New Transaction>" and I use an additional Task Flow Return activity to commit the Data Control Frame, the validation rule also works perfectly. If I commit a new Department with no Employees, the error message is displayed.
  3. If the Bounded task flow is set to "<Always Begin New Transaction>" and I commit the Data Control Frame programmatically, instead of displaying the validation error message, ADF threw JBO-27023: Failed to validate all rows in a transaction.

Below is the code I use to commit Data Control Frame programmatically:

public void commitDataControl() {

BindingContext bc = BindingContext.getCurrent();

DataControlFrame dcf = bc.findDataControlFrame(bc.getCurrentDataControlFrame());

dcf.commit();

}

In the last observation, the precise behaviour is as following:

  1. When I invoked the Bounded task flow and arrived at the "CreateDepartment" page, if I immediately clicked Commit, the JBO-27023 exception will be thrown.
  2. When I invoked the Bounded task flow and arrived at the "CreateDepartment" page, if I create a new Employee record and then delete it and then click Commit, the validation error message is displayed properly.

What I observed looks like a bug in ADF. It'd be great if you could spare some time to do a simple test in your environment to confirm this behaviour.

In case I've done something wrong, I'd be very grateful if you could show me my mistakes.

P/S: I am using JDeveloper 11.1.1.7.0 without any patches.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2015
Added on Jan 12 2015
2 comments
630 views