adfemg
  1. adfemg
  2. ADFEMG-74

expose DCTaskFlowBinding.getRegionModel() through public API

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Labels:
      None

      Description

      Based on JDeveloper 11.1.1.6, but javadoc from 11.1.2.3.0 seems to indicate the same behavior there

      I need programmatic access to the region-model of a taskflow binding. The JSF page itself does this by

      #{bindings.taskflowdefinition1.regionModel}

      This requires the following code from java:

      DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
      DCTaskFlowBinding tfbind = (DCTaskFlowBinding) bindings.findRegionBinding("taskflowdefinition1");
      RegionModel model = tfbind.getRegionModel();
      

      This gives an audit rule error since DCTaskFlowBinding is from an ADF internal package. DCBindingContainer.findRegionBinding which returns a oracle.adf.model.RegionBinding interface but this doesn't have the getRegionModel method so we require the case to private DCTaskFlowBinding.

      Since a default JSF page gets the region model the same way I consider it part of the public API, so I would expect the java classes to expose this through non-internal classes as well. As far as I can see it there are two solutions:

      1. make DCTaskFlowBinding a non-internal class (less preferred solution as it would mean refactoring to a new package and still requires casting of the findRegionBinding result)
      2. make getRegionModel part of the public oracle.adf.model.RegionBinding interface (preferred solution from my point of view)

      PS. As a rule of thumb shouldn't all EL expression that get generated into JSF pages work through non-internal ADF classes?

        Activity

        Hide
        Jan Vervecken added a comment -

        hi wvanderdeijl

        Just wanted to refer to some related API documentation for version 11.1.1.6.0 (which seems to confirm what you describe)

        • about "As a rule of thumb shouldn't all EL expression that get generated into JSF pages work through non-internal ADF classes?"
          • Seems like a fair "rule of thumb" to me.

        Hopefully your suggestions here get picked up by someone from Oracle to create an enhancement request (or refer to an existing enhancement request).
        If not, an Oracle service request could be created referring this this JIRA issue ADFEMG-74 requesting to create an enhancement request.

        regards
        Jan Vervecken

        Show
        Jan Vervecken added a comment - hi wvanderdeijl Just wanted to refer to some related API documentation for version 11.1.1.6.0 (which seems to confirm what you describe) oracle.adf.model.binding.DCBindingContainer at http://docs.oracle.com/cd/E23943_01/apirefs.1111/e10653/oracle/adf/model/binding/DCBindingContainer.html returning oracle.adf.model.RegionBinding from its findRegionBinding() method at http://docs.oracle.com/cd/E23943_01/apirefs.1111/e10653/oracle/adf/model/RegionBinding.html oracle.adf.controller.internal.binding.DCTaskFlowBinding not documented at http://docs.oracle.com/cd/E23943_01/apirefs.1111/e10651/toc.htm oracle.adf.view.rich.model.RegionModel at http://docs.oracle.com/cd/E23943_01/apirefs.1111/e10684/oracle/adf/view/rich/model/RegionModel.html about "As a rule of thumb shouldn't all EL expression that get generated into JSF pages work through non-internal ADF classes?" Seems like a fair "rule of thumb" to me. Hopefully your suggestions here get picked up by someone from Oracle to create an enhancement request (or refer to an existing enhancement request). If not, an Oracle service request could be created referring this this JIRA issue ADFEMG-74 requesting to create an enhancement request. regards Jan Vervecken
        Hide
        chriscmuir added a comment -

        Wilfred, on lodging an ER I need business justification. Can you elaborate on "I need programmatic access to the region-model of a taskflow binding" with a real use case please?

        CM.

        Show
        chriscmuir added a comment - Wilfred, on lodging an ER I need business justification. Can you elaborate on "I need programmatic access to the region-model of a taskflow binding" with a real use case please? CM.
        Hide
        Wilfred van der Deijl added a comment -

        We want to have an af:region that initially renders without content and then issues a separate request to get the actual content of the region (thereby activating the taskflow). This is similar to an af:table with lazy content delivery. We want to do this for performance reasons so the page itself renders quickly and the few regions that invoke a (slow) webservice get rendered in a separate request.

        To accomplish this we have the af:region in the JSF source that uses a value property that refers to an empty region model. The page renders with an additional piece of javascript (through ExtendedRenderKitService) that queues an event back to the server when the page completes loading. Then at the server we have an af:serverListener that gets the taskflow binding from the pagedef (the above Javacode) and then manipulates the af:region to refer to this real taskflow binding instead of the empty one.

        This gives a significant performance boost to our SOA human workflow task taskflows as they can initially render with only the task payload available. All additional info required on the page is in independent regions/taskflows that invoke webservices to retrieve additional information.

        This is probably a very specific use case, but overall I would argue that the JSF EL expressions we get in our pages should only refer to public APIs and not internal ADF classes.

        PS. The solution for a lazy-loading af:region is almost ready for primetime and will probably be made publicly available.

        Show
        Wilfred van der Deijl added a comment - We want to have an af:region that initially renders without content and then issues a separate request to get the actual content of the region (thereby activating the taskflow). This is similar to an af:table with lazy content delivery. We want to do this for performance reasons so the page itself renders quickly and the few regions that invoke a (slow) webservice get rendered in a separate request. To accomplish this we have the af:region in the JSF source that uses a value property that refers to an empty region model. The page renders with an additional piece of javascript (through ExtendedRenderKitService) that queues an event back to the server when the page completes loading. Then at the server we have an af:serverListener that gets the taskflow binding from the pagedef (the above Javacode) and then manipulates the af:region to refer to this real taskflow binding instead of the empty one. This gives a significant performance boost to our SOA human workflow task taskflows as they can initially render with only the task payload available. All additional info required on the page is in independent regions/taskflows that invoke webservices to retrieve additional information. This is probably a very specific use case, but overall I would argue that the JSF EL expressions we get in our pages should only refer to public APIs and not internal ADF classes. PS. The solution for a lazy-loading af:region is almost ready for primetime and will probably be made publicly available.
        Hide
        chriscmuir added a comment -

        Thanks Wilfred.

        Discussing this internally, will let you know if/when I raise an ER.

        CM.

        Show
        chriscmuir added a comment - Thanks Wilfred. Discussing this internally, will let you know if/when I raise an ER. CM.
        Hide
        chriscmuir added a comment -

        ER 16013863 raised.

        CM.

        Show
        chriscmuir added a comment - ER 16013863 raised. CM.
        Hide
        chriscmuir added a comment -

        This ER has been rejected with status "97 - Closed, Enhancement Rejected".

        Comments given:

        @ This scenario should be achieved by using a combination of deferred or
        @ conditional activation on the taskflow binding or by using a dynamic region
        @ (EL defined taskflowID). Using an EL for the activation condition, the
        @ customer can control when the region is active or not. We do not recommend to
        @ change the region model since the framework have to control entirely the
        @ region lifecycle.

        I'll lead Wilfred to assess the quality of the solution and follow up here. If there isn't a response by the next time I visit the issues, I close this issue.

        Show
        chriscmuir added a comment - This ER has been rejected with status "97 - Closed, Enhancement Rejected". Comments given: @ This scenario should be achieved by using a combination of deferred or @ conditional activation on the taskflow binding or by using a dynamic region @ (EL defined taskflowID). Using an EL for the activation condition, the @ customer can control when the region is active or not. We do not recommend to @ change the region model since the framework have to control entirely the @ region lifecycle. I'll lead Wilfred to assess the quality of the solution and follow up here. If there isn't a response by the next time I visit the issues, I close this issue.
        Hide
        chriscmuir added a comment -

        As per the last update, issue closed.

        CM.

        Show
        chriscmuir added a comment - As per the last update, issue closed. CM.

          People

          • Assignee:
            Unassigned
            Reporter:
            Wilfred van der Deijl
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: