Showing posts with label OIM ADF Custom taskflow Not opening. Show all posts
Showing posts with label OIM ADF Custom taskflow Not opening. Show all posts

Sunday, August 2, 2020

OIM ADF Customization-Adding ADF custom taskflow

Requirement:In OIM ADF customization very common requirement is to open new custom taskflow on click of icon. Follow below steps to achieve it in OIM. 

1.   Export the sandbox and unzip it.

2.    Open the Home page jsff.xml file that you are working on by using a text editor. Oracle Identity Manager has the following default Home pages for Self Service, Manage, and Compliance:

oracle/iam/ui/homepage/home/pages/mdssys/cust/site/site/self-service-manage.jsff.xml

3.    Locate the oim:DashboardBox element in the XML file. The element looks similar to the following: 

<oim:DashboardBox xmlns:oim="/componentLib1" instructionText="My user details" titleText="My Details" image="/images/Dashboard/myAccess.png" hoverImage="/images/Dashboard/myAccess_s2.png" iconClickable="true" id="e8533237995"/>

4.    Ensure that the value of iconClickable is set to true.

5.    Add a new element attribute named iconClickAction, set the value of the attribute to:

#{backingBeanScope.dashboardNavigationBean.launchTaskFlow}

6.    Add two new af:clientAttribute elements as child elements of oim:DashboardBox, as follows:

  <oim:DashboardBox xmlns:oim="/componentLib1" instructionText="Manage profiles" titleText="Profile Management" image="/images/Dashboard/myAccess.png" hoverImage="/images/Dashboard/myAccess_s2.png" iconClickable="true" id="e8381776527" iconClickAction="#{backingBeanScope.dashboardNavigationBean.launchTaskFlow}">

          <af:clientAttribute xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:f="http://java.sun.com/jsf/core" name="taskFlowId" value="/WEB-INF/oracle/iam/ui/custom/profile-management-tf.xml"/>

            <af:clientAttribute xmlns:af="http://xmlns.oracle.com/adf/faces/rich" name="title" value="Profile Management"/>   

          </oim:DashboardBox>

 Please note that in above code xmlns:f="http://java.sun.com/jsf/core"  is very important as i am using faces components it is important to add that in af:clientAttribute .My taskflow jsff is as follows.

    <?xml version='1.0' encoding='UTF-8'?>

    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"

          xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core">

    <c:set var="BTExtensionBundleUI" value="#{adfBundle['ro.bt.adf.view.bundle.BTExtensionBundle']}"/>

    <af:outputText value="Profile Management" id="ot1"/>

    </jsp:root>

Make sure that oim:DashboardBox now has opening and closing tags, as shown in the example. Also, ensure that the component IDs are unique.

Set values of taskFlowId and title client attributes. taskFlowId specifies which task flow will be launched, and title specifies the title of the new tab. 

7.       Save the jsff.xml file, and re-create the sandbox ZIP file with the same name and structure as the original ZIP file.

8.       Import the sandbox to Oracle Identity Manager.

9.       Verify the changes and functionality of the new Home page tile.

10.     Export the sandbox and publish it to make the changes available to all users.

New Icon when clicked new taskflow opens in new tab as below