Monday, August 30, 2010

How to use Bounded Task Flow in Application





1.     Create Application



2.     Create Business Components from Tables.

1.         Select the Model project right clicks on the project go to à New à Business tier à ADF business components àBusiness Components using Tables.











10.     Select all Entity Object from the view project  right click à Refractor à move and enter the package name like

15.     Open the View Object go to à Entity Object section it will show no entity object used for read-only view.

16.     Open the view object and go to à Attributes click on the edit button 




3.     Create the create web page:

In this section we will see how to create the taskflow and WebPages.

Here are the steps to create a web page and the task flow.

3.1.   Go to New à Current Project technologies àWeb tier à Jsff àJsf page.



3.2.   Enter the page name as mainPage.jspx and Enter MainPage for manage bean name and class name.

3.3.   Select the page template as Oracle Dynamic Tabs Shell.

3.4.   Create a jsff page with the name of searchPage.jsff inside the fragments package. 


3.5.   Edit Employee Readonly view object and add a search criteria.


3.6.   Drag and drop the search criteria as ADF Query with panel. 

3.7.   Surround with your table with panel collection.

3.8.   Give width for panel collection 100% and change the result id of query control to panel collection.

4.     Create the Task Flow:

In side this section we will how to create the bounded taskflow.

4.1.   Select the view controller project and create the taskflow using New à Web Tier à ADF Task Flow 

4.2.   Enter the taskflow name as EmployeeSearchTaskFlow.xml and place it inside web-inf project.

 

 

4.3.   Drag and drop your jsff page to taskflow.

4.4.   Now your taskflow is ready for use.

5.     Design main page:

As discuss we have created the bounded taskflow, it will require landing page to run. In this section of document we will learn how to create the landing page.

5.1.   For loading the task flow to a page dynamically TaskFlowLoader class is require. Create a java class using.



        5.2   Enter the class name as TaskFlowLoader and package name as com.bss.view.
          package com.bss.view;
          import javax.faces.event.ActionEvent;
          import oracle.ui.pattern.dynamicShell.TabContext;
          /*
           
          * This class is used for loading the taskflow instance programatically to Oracle Dynamic UI Shell           
          Template.
                     
          * */
          public class TaskFlowLoader {
              public TaskFlowLoader() {
                  super();
              }
              /**
               * This method will bind to the link button to load the task flow.
               * @param event
               */
              public void loadSearchTaskFlow(ActionEvent event) {
                  loadTaskFlow("Search Employee Page", "/WEB-          
               INF/EmployeeSearchTaskFlow.xml#EmployeeSearchTaskFlow", false);
              
             }
              private void loadTaskFlow(String title, String taskflowId,
                              boolean newTab) {
                  try {
                      if (newTab) {
                          TabContext.getCurrentInstance().addTab(title, taskflowId);
                      } else {
                          TabContext.getCurrentInstance().addOrSelectTab(title,
                                                               taskflowId);
                      }
                  } catch (TabContext.TabOverflowException toe) {
                      // causes a dialog to be displayed to the user saying that there are
                      // too many tabs open - the new tab will not be opened...
                      toe.handleDefault();
                  }
              }
          }

Meta Data Services Configuration

This document will demonstrate how to configure the DB/FILE based MDS (Meta Data Services) with Fusion Application.

1.1. Type of Meta Data Services:

There are two different types of MDS. Types of MDS are as follows
· File Based MDS
· DB Based MDS

1.2. Enable MDS Customization:

In this section I will explain how to enable MDS customization with your current application. For enable MDS follow the below instruction:
1. Go to property of your current Web project.
2. Select the ADF View from right side navigation.
3. Select the enable User Customization check box.
4. Select type of changes Across Sessions using MDS.
5. Click on Ok button.
By this approach MDS will setup to your application you can run your application check the changes will persist to xml file.

1.3. Define Component to persist changes

For defining the component whose value you want to persist.
1. Open the adf-config.xml file from Application Resources
2. Select the MDS Configuration and add the UserCC class for all User Customization to persist.
3. Select now view from navigation and tag to tag table by using Icon.
4. If you want to add some other tags or attribute which is not present here like renderd attribute of panel box. You can do that using the source editor. It will looks like:
5. But for that you have to do little bit coding which I will explain later section.
Here your component and attribute selection will be finished. Now your application will support User customization. Here I am explaining some application level property for MDS.
Select the application go to properties --> Run --> MDS
These properties will only used while you running application using JDeveloper on default domain /IntegratedWebLogicServer.
Override server location: It will be the new location where you want to store all customized changes. Here you can change the default directory for changes but it will not effect if you want same application to run on stand-alone weblogic instance.
Directory Content: It will be represent that you want to persist changes of previous application run by JDeveloper or not.

1.4. File Based Meta Data Services:

In File based Meta Data Services all user customization will be store in a form of xml file on a define directory on server. User can change the default MDS directory.
1. Start the domain on which you want to deploy the application.
2. Make a connection to running domain using the Application Server Connection.
3. Select your application Deploy --> Deploy .
4. Select Deploy to Application Server
5. Select your running domain connection
6. Press Next --> Next --> Finished.
7. It will open another wizard page.

8. If above screen appear blank that you can create the file connection on server for that login to console application go to Services --> persistent store --> Create file store.
9. Then again you have to start from Step 1, then screen will appear like
10. Click on deploy button.
It will deploy your application to running domain. You can also get one copy of deployed application on to deploy folder of you root application. You can open that ear file with the winrar and can see updated adf-config.xml file.
By using this approach you can deploy File Based Meta Data to any domain even on default domain (For this provides details of default domain while making a connection to server).

1.5. DB based Meta Data Service:

In this section we will see how to configure DB Based Meta Data Services. For defining the DB based MDS first start the domain and login to console application using http:localhost:7101/console
1. Before that you must run RCU utility.
2. Go to Services --> JDBC --> Data Sources
3. Create a new Database connection to your MDS database.
Set following property
Name :
mds-dev
JNDI-Name :
jdbc/mds/MDSDS
Data Base Type:
Oracle
Database Driver:
*Oracle's Driver (Thin) for Instance connections; Versions: 9.0.1,9.2.0,10,11
Supports Global Transactions:
Un Checked
Database name :
XE
Host Name:
127.0.0.1(ip of your database)
Port:
1521
DataBase User:
DEV_MDS
Password:
Welcome1(your MDS DB password)
Target :
Select server like DefaultServer or AdminServer
4. Once you have completed it, follow the step 1 to step 7 of 1.4 section.
5. After that you will get wizard page like Database name
6. In above page Repository Type is DB.
Once you click on deploy button DB based MDS will setup for your application you can also check the details in to Ear file.
You can also fine PDF version of this blog on following link MDS Configuration PDF