Best Practices from Oracle Development's A‑Team

Extend Search Taskflow for WebCenter Portal


Have you ever noticed the gap between the capabilities in WebCenter Search Taskflow and the Native Secure Enterprise Search web application. The actual fact is that SES from a capability perspective is  rich. For most search integration it has a rich set of features to help user navigate and find data in enormous data sets.  The reason for the limited functionality in WebCenter Taskflow is not due to the Web Service API provided by SES, the Web Service API is actually as rich as the Native Search Client. However the limitation with this API is that it is based RPC based SOAP which can be hard to use when generating proxy objects. Having said all this there is an remedy to this as well, SES actually comes with a pre-generated proxy library that supports all web services features of SES. So in this Post we are going to look at where we can find the SES Proxy jar file and we will also look at how we can access the stateless services to gather all known source groups. Secondly we will look at how this can be leverage with existing WebCenter Search task flows with minimal effort.

Main Article

Lets find the Proxy Client Jar file for SES web services

  • Navigate to SES installation folder
  • Find following location and file: seshome/search/lib/search_client.jar
  • Add the jar file to your JDeveloper WebCenter Portal Project
  • Make sure you update the library section so its part of the class path

Download Search Extension Example project that contains a data control that access Secure Enterprise Search

  • Example project can be downloaded here: SearchExtension
  • Before testing the data control there is one hard coded section in the project that points to the SES End-Point
  • Open following class: SearchExtensionDC.java
  • Locate following static string: SOAP_URL
  • Replace the end point address: http://localhost:8890/search/query/OracleSearch, with your local end point for SES

Test the project

Best practice is to test early, therefore the project comes bundled with a JUnit Test, please run the test and make sure its not failing.  The current implementation is fetching all known Source Groups from SES, but there is also an option of filtering to only include a sub set of source groups. The attached test fetches all and make sure its not empty. Prerequisite is to make sure your JDeveloper has added the JUnit extension for this run properly.  The test class is: SearchExtensionDCTest.java.  You can now update the test case to look for your known Source Groups

Test the new Data Control on the WebCenter Task flow

  • On a desired page in your Portal project, drop in the Search task flow.  For example:
<?xml version='1.0' encoding='UTF-8'?>   2: <jsp:root    xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"    xmlns:f="http://java.sun.com/jsf/core"    xmlns:h="http://java.sun.com/jsf/html"    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"    xmlns:pe="http://xmlns.oracle.com/adf/pageeditor"    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">    <jsp:directive.page contentType="text/html;charset=UTF-8"/>       <f:view>          <af:document id="d1" title="Home">          <af:messages id="m1"/>          <af:form id="f1">             <af:pageTemplate value="#{bindings.pageTemplateBinding.templateModel}" id="pt1">                <f:facet name="content">                   <pe:pageCustomizable id="hm_pgc1">                   <cust:panelCustomizable id="hm_pnc1" layout="scroll">                   <af:region value="#{bindings.searchview1.regionModel}" id="r1"/>                   </cust:panelCustomizable>                      <f:facet name="editor">                          <pe:pageEditorPanel id="pep1"/>                      </f:facet>                   </pe:pageCustomizable>                </f:facet>              </af:pageTemplate>           </af:form>         </af:document>     </f:view> </jsp:root>
  • Create a SES connection for the task flow to use (In a later release I will try to piggy back on this connection in next example of the data control project shared earlier in this project).


  • To simplify customization of task flow you can enable this for the portal project by adding additional technology scope for project, add following: WebCenter Taskflow Customization Framework.

Before proceeding please deploy the project on a external weblogic instance (note you cannot do this on the internal instance)

  • Restart JDeveloper with Customization Developer Role to finally introduce necessary Customizations to the task flow markup
  • Switch the Customization Tip Layer to Site
  • Enable Show libraries filter
  • Locate following taskflow jar file: WebCenter Search Services View
  • Locate following Page Fragement File: oracle.webcenter.search.view.jsf.fragements.searchResultsFragment,jsff
  • Find following position: SubForm: srFrm, PanelGroupLayout: sssformfpgl3
  • Drag'n'Drop the result of the new SearchExtensionDC - getSourceGroups - DataGroup



  • Finally the data control is in place and integrated with the standard task flow, however what effect does it actually have?
    None actually since the WebCenter API for search do not have any hooks for searching by source group.
  • However, there is always ways around everything, therefore we will leverage the fact that SES support query text markup when searching. So for instance, to filter a query on a specific source group is pretty easy "Keyword sg:[Source Group Name].
  • So to enable this we have to concatenate the search with the sg:[BAE], in this example.
  • Code snippet below will do just that
<af:subform defaultCommand="goBtn" id="srFrm">    <af:panelGroupLayout layout="horizontal" id="sssformfpgl3" valign="top">      <af:panelGroupLayout xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="spgl1" layout="vertical" valign="top" halign="left">      <af:inputText maximumLength="128" columns="20" immediate="true" simple="true" value="#{pageFlowScope.keywords}" id="searchKeywords" contentStyle="width: 125px" partialTriggers="goBtn"/>      <af:selectOneChoice xmlns:af="http://xmlns.oracle.com/adf/faces/rich" value="#{bindings.DataGroup.inputValue}" required="#{bindings.DataGroup.hints.mandatory}" shortDesc="#{bindings.DataGroup.hints.tooltip}" id="ssoc1" simple="true">          <f:selectItems xmlns:f="http://java.sun.com/jsf/core" value="#{bindings.DataGroup.items}" id="ssi1"/>       </af:selectOneChoice>     </af:panelGroupLayout>     <af:commandImageLink id="goBtn" icon="/adf/webcenter/go_ena#{requestContext.rightToLeft ? '_rtl' : ''}.png" hoverIcon="/adf/webcenter/go_ovr#{requestContext.rightToLeft ? '_rtl' : ''}.png" depressedIcon="/adf/webcenter/go_dwn#{requestContext.rightToLeft ? '_rtl' : ''}.png" shortDesc="#{searchViewBundle.UI_LABEL_SISF_BUTTON_GO}" actionListener="#{pageFlowScope.avsbb.doSearch}">       <af:setPropertyListener xmlns:af="http://xmlns.oracle.com/adf/faces/rich" from="#{pageFlowScope.keywords}#{' sg:'}#{bindings.DataGroup.selectedValue}" to="#{pageFlowScope.avsbb.keywords}" type="action"/>     </af:commandImageLink>   </af:panelGroupLayout> </af:subform>





Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content