Monday, November 20, 2017

MDS(Meta Data Service) in Oracle OAF

Meta:-
In technical world, Meta word symbolizes dictionary. Think of a web page broken into small units which are fields, buttons, and list boxes. These small individual units [fields, buttons etc] are stored in a dictionary, in the database. These units when combined together, they become a web page that gets rendered on the browser.

Data:-
Those Meta pieces are not stored as binary files, but as data in tables. Those tables begin with 'JDR', for example JDR_ATTRIBUTES, JDR_ATTRIBUTES_TRANS, JDR_COMPONENTS and JDR_PATHS. The definition and relationship of each field/region/component is stored in these JDR tables. Oracle Application Framework reads that data when you request a page. The page structure is then built based on Meta-Data.

Service:-
Meta Data is available as a service(plain service not web-service). The data is there in JDR tables, but all such data has to be co-related, all fields, regions, buttons etc have to be clubbed into a meaningful manner to make a web page. You can say that MDS provides service to store & return page definitions. MDS collects those definitions in components/fields in a meaningful manner to build a page. The storage page definition happens in JDR tables, where page components are not stored as XML. But MDS provides API's to build XML definition from the data in JDR tables. Hence there are two provisions:
  • When you design a page, you store "page definition" in XML format on your PC. When deploying to your system/server, you load this XML file into JDR tables by using command xmlimporter.
  • When a user runs the page, Oracle Application Framework does the following steps:-
    • Oracle Application Framework Requests page definition/structure from (MDS)
    • MDS engine returns a xml file to Oracle Application Framework.
    • Each node/component in XML(of Step b) is translated into a web bean object. 
          For Example: Lets say page has below elements.
    
            Region-Main
                   Field - Field1
                   Field - Field2
                         Region -Child
                              Field - Button

  • In this case, five web beans objects will be instantiated by Oracle Application Framework. A bean object is nothing but an object representation components like fields, buttons, regions etc. A bean object also has methods like setRendered, setRequired, getRequired etc.                              
    • Not only we have beans created for that page, those beans are nested as well, in exactly the same sequence of components within Region-Main. Hence parent child relationship is retained.
    • After rendering the page, Oracle Application Framework then calls the controller class for that MDS page. The page is displayed to user after processRequest in Controller is completed.


Important points on MDS:-
  • MDS page definition Cached: Hence any changes that you make to MDS in database, you then need to bounce the mid-tier.This is not applicable if you are testing the pages from jDev itself. jDev will first look at local XML files[local MDS]. If the page file is not found on your local PC, then OAF gets the page definition from MDS in database.
  • Personalization too is stored in the database in MDS, but the path of that document is prefixed by customizations.For example if we personalize a page say:
    • oracle/apps/per/irc/candidateSearch/webui/deptSearchPG at site level, then its corresponding customized document will be in oracle/apps/per/irc/candidateSearch/webui/customizations/site/0/deptSearchPG.
  • The MDS Personalization layer are applied at run time to the page, and hence mid-tier bounce is not required when you modify personalizations.
  • Although MDS for runtime is loaded into the Database, but the MDS definitions can also be found by navigating to $MODULE_TOP/mds.

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)