Friday, September 3, 2010

WebCenter Composer and Resource Catalog with Multiple ADF Task Flows

I have described, what should be done in order to include custom ADF Task Flow into WebCenter Composer, check previous blog post - How To Include Custom ADF Task Flow Into WebCenter Composer Catalog. Today I will go one step forward and tell you how to use multiple ADF Task Flows within WebCenter Composer instance. Generally it all works by default, but there is one tricky thing you may face and then you will think it doesn't work. It works, let me introduce problem and solution.

Today post is based on sample application - webcentercomposer.zip. This example contains two separate applications with custom ADF Task Flows and one main application with WebCenter Composer.

We can see three ADF Task Flows are available from Resource Catalog. Let's add Employee Search first, all works well so far:


Next we add Quick Employee Search - still all is fine:


Its turn to add the last one available - Departments and Employees. Oops - we get error now:


Two from three were added successfully and we failed on last one. What should be the reason? Let's check application log:


It says that View Object wasn't found. Well, obviously View Object is available, its something else here. In 9 from 10 cases of such strange errors, its something with naming conventions. Before checking how naming conventions are implemented, let's clean my customizations and reset page to initial state - press Reset Page button in WebCenter Composer:


Page should be reset:


Let's see naming conventions now. Main application contains com.redsamurai.main root package - thats good enough:


Application with custom ADF Task Flow contains com.redsamurai.emplsearch root package - good enough as well:


Another application with custom ADF Task Flow contains com.redsamurai.masterdetail root package - also looks good:


If all looks good, where is the problem then? Actually, what I have discovered in current WebCenter release, you can't have two different Application Modules with the same name (even from different package) and use Data Control from these Application Modules in WebCenter Composer. Probably when multiple Application Modules are implemented in the same application, you always give different names. But in case of separate applications, it can happen that different teams will pick up same name, even accidentally or may be not. Then you will get into trouble.

Now we will do a bit of refactoring - will rename Application Module and give unique name:


I work now on MasterDetailApp, will give MasterDetailModule name:


Ahhh..., refactoring for some reason is not working - I can't rename Application Module, it gives error:


Okej, not a big deal - will be fixed in next release of JDeveloper 11g. We can work around this and run Replace All in Files wizard to rename Application Module:


Now we have it renamed to MasterDetailModule (make sure you rename Application Module usages in ViewController project as well):


Repeat same thing in EmplSearchApp, rename Application Module to EmplSearchModule:


Don't forget to redeploy both applications and generate ADF Libraries.

When Application Modules have unique names, all works well - all three ADF Task Flows can be added dynamically from WebCenter Composer Resource Catalog:


User can customize and personalize (read more about this - Applying Personalization and Customization in Oracle ADF 11g and Oracle WebCenter 11g) his page and navigate through Employees lists:


All three ADF Task Flows are available:


Lesson learned - make sure Application Module names are unique, don't blame WebCenter Composer :)

1 comment:

Anonymous said...

Hello
I have a bounded taskflow TF1 that includes a control flow from .jsff page (Main) to another task flow (TF2).
TF1: Main --create--> TF2
My .jsff page, Main has an ADF Button that has action "create" to call TF2. However it does not work!!
Please help =0
ps> TF2 is made up of a train of .jsff pages!!