Best Practices from Oracle Development's A‑Team

Exporting metadata for a specific group space in WebCenter Spaces


All customization in WebCenter Spaces are stored in the MDS. When you create a page, both the page and the page definition will be stored in the MDS. When you edit a page, a delta will be calculated which will be stored as a separate file in the MDS. During runtime WebCenter will calculate the page based upon the base document and the delta's available for a specific layer. Sometimes it is required to export the metadata to analyse the pages and metadata.

In this article we will show how you can export all the metadata for a specific group space in WebCenter Spaces.

Main Article

There is a distinct different between the metadata structure in WebCenter Portal and WebCenter Spaces. In WebCenter Portal all the metadata is stored in a single folder which can be exported with a single command. WebCenter Spaces stores its metadata in several folders which will require a set of commands to export them.

Preparing the export

In order to export a specific group space we need to identify the group space internal ID. This can be obtained by viewing the About information of the group space:


[caption id="attachment_17910" align="alignnone" width="300"]Opening Spaces action Opening Spaces action[/caption]


[caption id="attachment_17911" align="alignnone" width="300"]About Spaces About Spaces[/caption]

Exporting metadata

After you have obtained the Internal ID we can use it to export only the metadata for that specific group space.

Exporting metadata is done using the WLST exportMetadata method. In order to use the exportMetadata method we need to call the WLST command prompt from the WebCenter Portal component directory. This will load the required libraries:


After this we need to connect to the WebLogic server using the connect() command:

wls:/offline> connect('<username>','<password>','localhost:7001')

Replace <username> and <password> with the username and password for a user who has sufficient rights.

When you are connected we can execute the different exportMetadata commands. Replace GUID with the internal ID obtained from previous step.
You also have to replace the WC_Spaces with the name of the managed server where WebCenter Spaces is running on.

If you are running WebCenter Spaces in a clustered environment it is sufficient to execute these commands for a single server in the cluster as the MDS is shared among all the nodes in the cluster.

exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/page/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/siteresources/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/list/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/security/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/search/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/doclib/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/collab/calendar/community/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/quicklinks/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/collab/forum/scopedMD/GUID/**') exportMetadata(application='webcenter',server='WC_Spaces', toLocation='c:/tmp/mds',docs='/oracle/webcenter/collab/announcement/scopedMD/GUID/**')

The first export command will export all the page definitions for pages in the group space.
The second command will export the pages for the group space while the third command will export the resources like page templates and navigation models.

All other command will export taskflow instances and their parameters.

Depending on the type of analyses you need to do, it might be sufficient to only export certain folders. For example if you are only interested in the usage of the content integration taskflows it is sufficient to export the metadata from the doclib folder.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha