CRUD with Task Flow Template in ADF

Tweet about this on TwitterShare on Facebook7Share on LinkedIn9Share on Google+0

When you are building an ADF Application, you should think about best practices to reuse some code and components. There is a very good post from Andrejus Baranovskis showing some Task Flow Template improvements. I will use it as my start point to create a CRUD Task Flow Template and my Task Flows will be based on this template.

Download the sample application:

Create an ADF Fusion Web Application, and call it as ADFTFTemplateApp.
Create the Business Component using the Employees and Jobs tables.


Create an ADF Task Flow Template and call it as crud-tf-template.xml.
Drag two View (listView and editView) and a Method Call (CreateInsert) components and drop them into the template.
Just drag and drop the components, do not create them.
In the Data Control panel, expand Operations node, drag Commit and Rollback operations and drop them into the template.


Now, let’s create two Task Flows based on CRUD Task Flow Template.
Create the first Task Flow and call it as employees-flow.xml.
Check the “Base on Template” option and choose crud-tf-template file.


The Task Flow was created!


To create the pages, we need to override the view activities.
Right-click the listView activity and select the Override Inherited Activity option.
Double-click the listView activity and create the page.


Repeat the steps above for the editView activity.


We need to override the CreateInsert activity too.
Right-click the CreateInsert activity and select the Override Inherited Activity option.
In Data Control panel, expand the EmployeesView1 and Operations nodes, drag and drop the CreateInsert operation in CreateInsert activity.
In the Properties panel, change the Fixed Outcome property to view.


Repeat the steps above to create the Jobs Task Flow.


Run the application and enjoy!



Tweet about this on TwitterShare on Facebook7Share on LinkedIn9Share on Google+0

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

Leave a Reply

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