How To Include Custom ADF Task Flow Into WebCenter Composer Catalog

Blog reader was asking, based on one of my latest posts about Oracle WebCenter 11g - Applying Personalization and Customization in Oracle ADF 11g and Oracle WebCenter 11g. While described content was clear, the question itself was about how to include custom ADF Task Flow into WebCenter Composer Catalog and make it available for the user. I will describe this today.

Download sample application - PersonalizationCustomization.zip. It is the same example workspace as it was described in blog post mentioned above.

How we extend default WebCenter Composer Catalog and include custom ADF Task Flows? Let's see, its really not that complex, but you need to know few tricks.

If you are familiar with ADF Libraries, it will be easy. If not, you can read series of posts about this topic - Integration.

We have one ADF Task Flow, will include it into WebCenter Composer Catalog:


ADF Task Flow comes from ADF Library generated based on project - ViewControllerLib:


There is no need to have WebCenter (ViewController) and ADF Library (ViewControllerLib) projects in the same application, I have them together for simplicity. WebCenter Composer is implemented inside ViewController project, this project is configured with WebCenter libraries. Additionally it must have reference to our ADF Library with custom ADF Task Flow:


Next step is to configure WebCenter Composer Catalog, you need to modify default-catalog.xml file located in mds folder available from application root:


Add resource reference, like in my sample application:


You can get correct path for ADF Task Flow resource from JDeveloper resource palette - right click on ADF Task Flow you are interested and select  Show Catalog Reference menu item:


JDeveloper displays ADF Task Flow path (you need to have JDeveloper 11g WebCenter extension installed):


Now, attention please - tricky point ! :) Make sure you don't forget to set security permission for newly added resource - ADF Task Flow. Open ADF Security wizard for WebCenter project and go to Task Flows section:


Make sure you select check-box - Show task flows imported from ADF libraries. Your ADF Task Flow is coming from ADF Library, you will not see it by default. Check-box must be selected to see it:


Set security permission for custom ADF Task Flow:


If you follow all steps, you will get your ADF Task Flow listed in WebCenter Composer Catalog. It can be added to Composer page:

Oracle OpenWorld 2010 Sessions

Andrejus Baranovskis | Aug 30, 2010 06:31 +0000
This year I will talk on Oracle Develop:

Session ID: S313355

Title: Developing Large Oracle Application Development Framework 11g Applications

Abstract: Oracle Application Development Framework (ADF) is an end-to-end development framework that offers unparalleled productivity for application developers. This session will show how data passivation and activation phases should be managed in large applications and demonstrate different UI Shell templates for separate Oracle ADF applications integration. Based on personal experience from retail industry projects, the speaker will describe how Oracle ADF applications can be tuned for the best runtime performance and show how developers can apply Oracle ADF architecture best practices. There will also be multiple demos about Oracle ADF Task Flows and Libraries usage for application integration and reusability.

Place: Monday, September 20, 4:00PM | Hotel Nikko, Carmel

Don't miss ADF EMG event on Oracle OpenWorld 2010, please read Chris Muir blog post. I will demo there two production systems.

See you in San Francisco !

Migrating User Personalizations and Customizations in WebCenter Spaces

Andrejus Baranovskis | Aug 29, 2010 11:08 +0000
Each time when you extend WebCenter Spaces, previously done user personalizations and customizations are lost for obvious reasons - new WebCenter Spaces library is deployed and MDS is refreshed. Even user Group Space membership will be removed - default WebCenter Spaces screen:


Of course, we need to preserve user personalizations and customizations, we can't just extend and ask users to start once again from the beginning. We can achieve this with Oracle Enterprise Manager 11g, it allows us to export and import WebCenter Spaces application. Export and import includes user personalizations/customizations, security and services configurations - thats very helpful, it allows to create WebCenter Spaces backups and apply them later to restore WebCenter Spaces state. In order to run Export/Import, go to WebCenter Spaces application accessible from Oracle Enterprise Manager 11g and invoke it from the menu:


In my specific use case, I was extending WebCenter Spaces with custom ADF Task Flows. When extended WebCenter Spaces library was deployed, I have imported WebCenter Spaces application backup (of course you shouldn't forget to export it before extending WebCenter Spaces :) ) with all personalizations/customizations, service configurations and security settings:


Import is in progress:


Finished successfully:


User redsam1 opens WebCenter Spaces, when it was extended and backup applied:


User personalizations and customizations remain present, also Group Spaces are available as it was before extending WebCenter Spaces:


If we would take a look into custom Resource Catalog, we would see one more custom ADF Task Flow added - Employees by Departments:


This means we have successfully extended WebCenter Spaces and preserved previous setup by exporting and importing it through Oracle Enterprise Manager.

Both custom ADF Task Flows can be added now to user space:

Applying Personalization and Customization in Oracle ADF 11g and Oracle WebCenter 11g

Andrejus Baranovskis | Aug 22, 2010 06:17 +0000
Let me start with simple definition of personalization and customization. Term personalization means user can perform changes visible only to that user. Term customization means user with admin privileges can perform global changes, visible to all users. I decided give you this simple explanation, because while browsing Oracle resources and related blogs, I saw many confusing statements. For example, something similar like - we can apply personalization by customizing. In this blog post I'm not describing predefined seeded customizations, but focusing on user performed runtime personalization and customization. You can achieve personalization functionality within standard ADF framework enabled with MDS. For customization functionality need to use Oracle WebCenter component - Composer. Today I will describe how to use these two together.

First we should take a look, what we can get from Oracle documentation:
My goal today is to join all this information together and provide more hints not described in documentation. Download sample application - PersonalizationCustomization.zip. All examples from this post are based on this sample, you need to have Oracle WebCenter JDeveloper extension installed to run this application.

UserCC class from Oracle documentation contains static user reference scott. I have modified this to retrieve current user name from security context:


As per documentation, I have created all required Java classes to support Edit and View layers:


User customizations and personalizations are enabled to be stored across sessions with MDS. This option is needed to store changes for ADF components, Oracle WebCenter Composer is working without this option as well:


I have change customization class from SiteCC to UserCC, this enables personalization:


Session options factory is class must be configured in adf-config.xml to enable customization:


As per documentation, additionally you need to declare Oracle WebCenter Composer servlet in web.xml.

ADF Security defines two application level roles - admin and customer. Admin role is granted with Customization permission:


Customer role is granted with Personalization permission only:


Session options factory class as per documentation, defines two layers - Edit and View. You can see that Edit layer is applied on global level (its when Oracle WebCenter Composer is invoked to perform customization). View layer is applied on global and user levels (this means each user will see global customizations and their own personalizations):


If Oracle WebCenter Composer is On, Edit layer is enabled, otherwise - View layer:


I have declared two users - scott (admin role) and john (customer role). Now I open application with admin role user scott - it brings blank screen and option to invoke Oracle WebCenter Composer (Edit):


Oracle WebCenter Composer invoked to perform customization visible to all users:


I can add my custom ADF Task Flow with Employees data from extended Resource Catalog:


Through composer we can change visual and layout properties:


Customization is done, user scott can close Oracle WebCenter Composer. Now the same user performs personalization - removes PhoneNumber column from Employees table. This change will not be visible to other users, because it is personalization:


In order to perform personalization on table and column components, you must declare them in tag configuration:


We can see two folders in MDS repository - site and user. All customizations are stored inside site and personalizations inside user. This means customizations will be visible to all users and personalizations per specific user only:


I login as user john and can see Employees table added by user scott (customization), I can see PhoneNumber column as well (because it was user scott personalization):


User john is not allowed to perform customization, only personalization - Oracle WebCenter Composer is disabled for this user. User removes all columns, except FirstName, LastName and PhoneNumber:


As we can expect, this personalizations are not visible for user scott:


Now we take a better look, what Personalize permission means. Let's revoke it from customer role:


We can't personalize anymore elements created by Oracle WebCenter Composer - WebCenter Customizable Components (in a Panel Customizable or Show Detail Frame). There is no option to disclose, resize or delete:


I enable Personalize permission again:


Now user with customer role is able to do personalization and remove Employees table added through Oracle WebCenter Composer customization:


Personalization is successful, however user granted with Personalize permission only is not allowed to invoke Oracle WebCenter Composer and add custom ADF Task Flow from Resource Catalog:


Only user scott, who is granted with Customize permission can do this:


Now I will describe how to apply personalization through Oracle WebCenter Composer, so user who is not granted with Customize permission will be able to invoke Composer as well.

We need to add one more customization layer, this time only UserCC:


I gave Edit Personal Layer name for this layer. Now we need to modify layer switch logic. Edit layer will be initialized only in that case, when current user is granted with admin role. In all other cases, Oracle WebCenter Composer will be opened in Edit Personal Layer - this means personalization will be applied:


In order to open Oracle WebCenter Composer, in addition to Personalize permission, we need to grant Edit permission:


User john, with Personalize and Edit permissions is able to open Oracle WebCenter Composer and perform personalization:


Personalization - Employees table:


John Employees List personalized table:


Because user john was allowed to do only personalization, another user scott will not see any changes:


We know that user scott is allowed to perform customization, let's test how it works. User scott will add the same Employees ADF Task Flow and name it - Global Employee List:


It should be visible for user john as well, because it is customization. Yes, user john can see both tables now - one comes from personalization and another from customization:


If user john, don't want to see global list of employees, he can perform personalization further and remove this customization. It will be removed only for this specific user:


Now user john can see only his personalizations, no global customizations:


As expected, another user scott, can see customizations (even they were removed by user john - personalized):