Friday, October 1, 2010

Exporting/Importing MDS Metadata and Promoting MDS Labels for Oracle ADF 11g and Oracle WebCenter 11g Applications

In my previous post I was talking how to remove broken personalizations for specific user - Advanced MDS Management for Oracle ADF 11g and Oracle WebCenter 11g Applications. Today I will describe another technique, it enables basic MDS repository partial modifications without removing all user personalizations. This can be useful, when user breaks his page and wants to remove only problematic personalization, without affecting his previous work. Also I will talk about MDS labels, and will explain what MDS label promotion means for MDS repository. In short - MDS label promotion is MDS repository downgrade, because we are reverting repository to previous version.

Download sample application for this post - This application is deployed to standalone WebLogic server, with Oracle WebCenter libraries. I'm using the same MDS repository as in my previous post:

I will open sample application with two different users to define personalizations through WebCenter Composer. First I login with user - john:

Will add one of the available ADF Task Flows from WebCenter Composer Resource Catalog:

Graph component is added:

Now we login as another user - scott:

Will add another available ADF Task Flow from WebCenter Composer Resource Catalog:

Search area with editable table is added:

Personalizations for users scott and john are done, now we can play with MDS. Let's export MDS repository, same as we were doing in previous post:

We can browse exported folder structure, will see personalizations for both users available:

Additionally, at this step we will create MDS label, so later will be able to revert MDS repository:

Now I will open screen personalized by user scott and will hide three columns - will perform further personalization:

Will do similar thing with user john and will hide another four columns - personalization will be stored in MDS:

Because we did more personalization, let's export MDS repository once again. You can see its 6 documents are exported now, before we had only 4:

Now you can see personalizations for search/edit ADF Task Flow are added, information about hidden columns:

We can assume real life scenario, when user asks to remove part of his personalizations. In the current release of MDS, user can't perform this action from UI - partial MDS revert. However, system administrator can export MDS repository, fix it and import back. In this example, for user scott, I will set two from three columns back to visible again:

We need to archive modified MDS files and import them back to MDS repository - this will apply latest changed:

Updated MDS structure import is done successfully:

User scott personalizations are partially removed - only one column remains hidden:

I have described how to do partial MDS repository changes by exporting and importing MDS structure.

Now I will give quick overview about MDS labels promotion. We have created our own MDS label earlier in this blog - mdslabel_v1:

I will promote this label - will revert MDS repository back to snapshot associated with this label. This means I will loose every user personalizations done after creating label. Its not that useful in general case, but might be good solution when system needs to be reset to specific point in time:

When our MDS label was promoted, all such personalizations done after this label was created are lost. Both users set some of the columns to be hidden, now all columns will be visible again (because MDS label was taken earlier).

All columns are visible for user john:

And for user scott:


Unknown said...

Another nice post. I usually suggest people to create a label before promoting the previous one, just in case something happens. Another interesting point is that sometimes you have to duplicate personalizations across users. Just download the personalizations and duplicate the user's directories changing the user name, then import it back. That works just fine. Tried that in a customer.

Andrej Baranovskij said...

Yes, very real requirement. Its why MDS repository browser/editor tool would be great.


Rob de Gouw said...

We created a WebCenter application, and everytime we deploy eit to test /acceptance or production, the administrators need to select the MDS and partition that the application should use.
Do you know how we can 'default' that in our ear file?
(like resource references)