Where are my Assets when redeploying WebCenter Framework Portal

WherearemyAssetswhenredeployingWebCenterFrameworkPortal.png

WebCenter Framework Portal assets are referenced in a file called generic-site-resources.xml which is located under a MDS path.

For example, the default for WebCenter Framework Portal and the Default Portal of WebCenter Portal is in:

/oracle/webcenter/siteresources/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed

The Administration Console of WebCenter Framework Portal just read this file to allow the users to edit and manage the Assets of the Portal.

Sample snippet of the XML code generated by the Portal Assets in the generic-site-resources.xml file.

<resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/webcenter/portalframework/genericSiteResources">
  <resourcetype name="siteTemplate" resourcebundle="">
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:57:52.367-08:00" description="Globe PageTemplate" displayname="Globe PageTemplate" guid="gsr3c7e8a48_a472_4316_97ff_7f026bcd4b16" jspx="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_globe.jspx" modifiedby="system" modifieddate="2011-02-08T15:57:52.367-08:00" pagedef="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_globePageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:57:52.851-08:00" description="Swooshy PageTemplate" displayname="Swooshy PageTemplate" guid="gsr2d5afdf1_6cc5_4db2_9f9f_883b58d68bea" jspx="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshy.jspx" modifiedby="system" modifieddate="2011-02-08T15:57:52.851-08:00" pagedef="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshyPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
  </resourcetype>
  <resourcetype name="pageStyle" resourcebundle="">
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:12.376-08:00" description="Blank" displayname="Blank" guid="gsrc077a9a7_4774_4f04_a224_48440d89b0ea" jspx="/oracle/webcenter/page/pstemplates/TemplateBlank.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:12.376-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateBlankPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:13.426-08:00" description="Left Narrow" displayname="Left Narrow" guid="gsr867b92b4_fa78_41ab_9b4a_d4f234f26dad" jspx="/oracle/webcenter/page/pstemplates/TemplateNarrowLeft.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:13.426-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateNarrowLeftPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:14.456-08:00" description="Right Narrow" displayname="Right Narrow" guid="gsr8501284d_82e6_4523_861f_7e11f97d3b73" jspx="/oracle/webcenter/page/pstemplates/TemplateNarrowRight.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:14.456-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateNarrowRightPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:15.485-08:00" description="Three Column" displayname="Three Column" guid="gsr9cc4c923_01fb_404e_aecd_d8a16ec077d8" jspx="/oracle/webcenter/page/pstemplates/TemplateThreeColumn.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:15.485-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateThreeColumnPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:16.516-08:00" description="Stretch" displayname="Stretch" guid="gsref5d38c6_1885_48ba_a295_2718b21f9d22" jspx="/oracle/webcenter/page/pstemplates/TemplateStretch.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:16.516-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateStretchPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:17.546-08:00" description="Text Page" displayname="Text Page" guid="gsr0675fbd4_9fb7_4cf2_b8bb_dac533dd3561" jspx="/oracle/webcenter/page/pstemplates/TemplateText.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:17.546-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateTextPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:58:18.576-08:00" description="Web Page" displayname="Web Page" guid="gsra833ed4b_9138_4bd3_bc89_bbc7f5e8f8b7" jspx="/oracle/webcenter/page/pstemplates/TemplateWeb.jspx" modifiedby="system" modifieddate="2011-02-08T15:58:18.576-08:00" pagedef="/oracle/webcenter/page/pstemplates/TemplateWebPageDef.xml" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
    </customattributes></resource>
  </resourcetype>
  <resourcetype name="dataPresenter" resourcebundle="">
  <resourcetype name="contentPresenter" resourcebundle="">
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:57:56.925-08:00" description="Displays a single content item. Image and HTML content items are displayed directly in the browser. For other item types, details are displayed, along with a link to download the associated file." displayname="Default View" guid="gsr5859161d_ae19_483a_9274_590c08fea0a9" iconuri="/oracle/webcenter/portalapp/shared/contentPresenter.png" jspx="/oracle/webcenter/content/templates/seeded/content-default-detail.jsff" modifiedby="system" modifieddate="2011-02-08T15:57:56.926-08:00" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
        <customattribute name="template-type" seeded="true" value="single" visible="ALWAYS">
        <customattribute name="content-repository" seeded="true" value="*" visible="ALWAYS">
        <customattribute name="content-type-name" seeded="true" value="*" visible="ALWAYS">
        <customattribute name="content-type-is-defaultview" seeded="true" value="true" visible="ALWAYS">
        <customattribute name="view-id" seeded="true" value="oracle.webcenter.content.templates.default.detail" visible="ALWAYS">
       </customattribute></customattribute></customattribute></customattribute></customattribute></customattributes>
    </resource>
    <resource contentdir="/oracle/webcenter/portalapp/shared" createdby="system" createddate="2011-02-08T15:57:57.946-08:00" description="Displays a single line with an icon and the item name as a link. When clicked, the associated file is either downloaded or the content is displayed." displayname="Default List Item View for Folders" guid="gsrafc8024c_ff29_404c_9a8d_3d01d90b5ae0" iconuri="/oracle/webcenter/portalapp/shared/contentPresenter.png" jspx="/oracle/webcenter/content/templates/seeded/content-default-list-item-folder-view.jsff" modifiedby="system" modifieddate="2011-02-08T15:57:57.946-08:00" resourcebundle="oracle.webcenter.framework.translations.TranslationsMDSResourceBundle" seeded="true" usescustomsecurity="false" version="11.1.1.4.0" visible="TRUE">
      <customattributes>
        <customattribute name="template-type" seeded="true" value="single" visible="ALWAYS">
        <customattribute name="content-repository" seeded="true" value="*" visible="ALWAYS">
        <customattribute name="content-type-name" seeded="true" value="IDC:Folder" visible="ALWAYS">
        <customattribute name="content-type-is-defaultview" seeded="true" value="true" visible="ALWAYS">
        <customattribute name="view-id" seeded="true" value="oracle.webcenter.content.templates.default.list.item" visible="ALWAYS">
      </customattribute></customattribute></customattribute></customattribute></customattribute></customattributes>
    </resource>
  ...
  <resourcetype name="taskFlow" resourcebundle="">
  <resourcetype name="dataControl" resourcebundle="">
  <!-- WebCenter Data Integration 11.1.1.8.0 Hibernation
  <resourcetype name="scenario" resourceBundle=""/>
  <resourcetype name="businessObject" resourceBundle=""/>
  -->
</resourcetype></resourcetype></resourcetype></resourcetype></resources>

Following lines talk about a typical error and what happens when a WebCenter Framework Portal (.EAR file) is redeployed in WebLogic.

I redeployed the WebCenter Framework Portal... Do I lost my assets created on Runtime?

When packiging an application of WebCenter Framework Portal an .EAR file is created using the OJDeploy ANT Scripts provided by JDeveloper. It creates a file called AutoGeneratedMar.mar with all the Assets and the generic-site-resources.xml file of the Assets in Desing Time.

In case of not modify the packiging then the resources included in the MAR file will override the files in the same path in the MDS during the re-deployment of the WebCenter Framework Portal. It includes the generic-site-resources.xml

After override generic-site-resources.xml the Runtime resources are in the MDS yet... But, not configurable more in the WebCenter Administration Console.

Solutions

Exists two ways to prevent this annoying behaviour:

  • Maintain both generic-site-resources.xml (Desing/Runtime) synchronized. It means that each Runtime resource created with the WebCenter Administration Console has to be exported and imported in JDeveloper to update the generic-site-resources of Desing Time.
  • Add a MDS configuration file called mds-transfer-config.xml in a /META-INF folder inside of the AutoGeneratedMar.mar file inside of the .EAR file. In this file can be configured what to do with some specific files in the MDS (not override, merge...).

Sample of the mds-transfer-config.xml that prevents to override the generic-site-resources.xml file:

<mds-transfer-config version="11.1.1.000" xmlns="http://xmlns.oracle.com/mds/transfer">
 <deployment-rules>
   <deployment-rule>
     <preserve-existing-metadata>
  <match mo-name="/oracle/webcenter/siteresources/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/generic-site-resources.xml">
     </match></preserve-existing-metadata>
    </deployment-rule>
  </deployment-rules>
</mds-transfer-config>

Subscribe to email updates

Recent Posts