ADF-BC is the data model layer for ADF. It has the following prime components:
ADF Business Components, known as ADF-BC, are used for creating complex Task Forms, and one can use ADF-BC View objects as facts in Oracle Business Rules. For ADF, the main data source, which is also called the data model, is based on ADF-BC.
Oracle JDeveloper provides a very easy way to bind components from the Business Services layer to your controller and view layers using an innovative binding layer approach. The data control palette provides a view into the Business Services layer. Developers can simply drag-and-drop Data objects and bind them to their user interface implementation.
The functionality of the process SalesToContract says that the salesrepresentative
user will enter the quote, and based on Discount Check, the task will be guided to the businessanalyst
user. You have created the Task UI earlier, using the Auto-generate mechanism, however here, you will also add some information about Opportunity
, to the user interface presented to the businessanalyst
user.
In this section, you will develop expertise in creating ADF-BC components and creating Task Forms based on ADF-BC components.
I. Create a table and a procedure based on it
ValidateOpportunity
. This table will contain OpportunityID
, which is a part of the quote payload. When one queries the table based on OpportunityID
, details about OpportunityID
data are fetched. You will create a procedure that inputs OpportunityID
and results in OpportunityType
and OpportunityRevision
.ValidateOpportunity
in the DEV_SOAINFRA
schema, or in any schema that you have configured for your DB connection, as follows:create table ValidateOpportunity (OpportunityID varchar2(20),OpportunityType varchar2(10),OpportunityRevision varchar2(1));
insert into ValidateOpportunity values('ABC1029','New','Y'), insert into ValidateOpportunity values('ABC1030','Old','Y'),
CREATE OR REPLACE PRODECURE CHECKOPPORTUNITY ( OPPID IN VARCHAR2, OPPTYPE OUT VARCHAR2, OPPREV OUT VARCHAR2) AS BEGIN SELECT OPPORTUNITYTYPE, OPPORTUNITYREVISION INTO OPPTYPE, OPPREV FROM VALIDATEOPPORTUNITY WHERE OPPORTUNITYID = OPPID; END;
II. Create a Synchronous Service based on the procedure CHECKOPPORTUNITY
OpportunityID
and returns OpportunityType
and OpportunityRevision
.OpportunityCheckingService
.III. Create an ADF-BC View object, based on web service
This will open the Create Web Service data control wizard.
OpportunityVO
as Data Source Name, and OpportunityCheckingService WSDL
as the BPEL service in URL, and click ServicesThis confirms that you can include this data control in your UI ADF forms.
taskDetails1.jspx
page.The content container will show the selected inputs.
Deploy the project and go to the Oracle BPM workspace as the salesrepresentative
user and enter the value forEnter Quote. The quote will move to BusinessAnalyst user. Log in as the businessanalyst
user in Oracle BPM workspace. You will find that OppType and OppRev are selected based on the Opportunity ID entered. In this case, the Opportunity ID enteredis ABC1029. Verify it with the data you have inserted into the preceding table. You will find an instance created for OpportunityCheckingService in the EM console, too.
This is useful when, say businessanalyst
user needs more information about the opportunities available, to help him/her make a decision about either approving or rejecting the quote.
Let's learn to create entity and View objects in the following section.
You have created data control based on the web service. You can even create ADF-BC Entity objects and corresponding View objects, based on tables, and can use them via ADF Data Controls in the Task Form.
Business Components.jpx
file and click OK.3.12.76.164