Saturday, June 30, 2012

Bind values set for a VO on nested AM method call activity is not reflected in my page

And finally my first informative post is here:

When you have a taskflow which does not share datacontrol 



and it has a methodCall and view activities.



Here if this method call activity is created from a nested AM then the pageDef binding will be:



With this code the bind parameters set on the method call activity will not be reflected in the view activity. 

The reason is ADF creates 2 application modules here, one for method call activity and another for view activity. So the view object in view activity does not have the bind parameters applied in method call activity.

This issue is due to 'Root' keyword in instanceName attribute.

Change the instance name attribute from:   
    InstanceName="AppRootAMDataControl.dataProvider.Root.DeptEmpAM1">
to 
    InstanceName="AppRootAMDataControl.dataProvider.DeptEmpAM1"

to fix this issue.

Initially I was wondering why the bind parameters are lost and after some detailed analysis I found that both are different AM instances and logged SR with reproducible test case. Then Oracle Support asked me to remove the Root keyword and also they confirmed that the issue will be fixed via 
Bug 13837650: REMOVE ROOT FROM THE INSTANCE NAME OF METHODACTION BINDING

Looks like this bug is planned for JDeveloper 12.1 release, till that time if you create action or MethodAction make sure that Root is removed manually.

For my detailed analysis and reproducible test case refer my Oracle Forum Post.