Oracle Identity Manager 11gR2PS2 UI Bulk Role Operations - Part 2

Version 11

    This document is Part 2 of an article by Oracle senior consultant Eduardo Ludovico that illustrates how to modify Oracle Identity Manager to prodvide a user-friendly way to perform a bulk removal of users via a graphical interface.


    by Eduardo Ludovico

     

    Continued from Part 1

     

    Create and Configure the new Task Flow

     

    Create a new task flow

     

    1. Right click in the project UIBulkOperation.
    2. Click New.
    3. Select the New Gallery.
    4. Under Web Tier, select JSF.
    5. In Items, select ADF Task Flow. Click OK.

     

    image011.png

     

    1. In the File Name field, type UIBulkOperation-task-flow-definition.xml.
    2. Check the Create as Bounded Task Flow option.
    3. Check the Create with Page Fragments option.

     

    image013.png

     

    1. Click OK.

       

     

    Configure the new task flow

     

    Here is how to insert a view item inside a task flow.

     

    1. Right click inside the Definition page.
    2. Select Insert inside task-flow-definition - UIBulkOperation-task-flow-definition.
    3. Select ADF Task Flow.

     

    Iamgem 19-skitch-tearoff.png

     

    1. On the new wizard that popped up, select View, and click OK.

     

    image017.jpg

     

    1. In the Activity ID * field, type UIBulkOperationPage.
    2. In the Page * field, type /UIBulkOperationPage.jsff.

     

    image018.jpg

     

    1. Click OK.
    2. On page definition, click on Overview.
    3. Click General.
    4. Click the arrow on the far right-side of Default Activity pull down.
    5. Select UIBulkOperationPage.

     

    image019.png

     

    Register the backingBean

     

    1. Click Managed Beans.
    2. Click the “+” sign on the right-hand side.
    3. In the Name* field, type bulkOperationsReqBean.
    4. In the Class * field, type br.com.oracle.ocs.view.BulkOperationReqBean.
    5. In the Scope * field, type backingBean.

     

    image021.png

     

    1. On main Menu click File and Save.

     

    Create a page definition

     

    1. On the Project side, right click UIBulkOperationPage.jsff under UIBulkOperationController, Web Content.
    2. On the new wizard that pops up, click Go To Page Definition.

     

    image023.png

     

    Include the event binding

     

    1. Click on “+” sign.
    2. On Insert Item popup, select eventBinding.
    3. Click OK.

     

    image025.png

     

    Include ID in the event binding

     

    1. On the Page side, right click UIBulkOperationPagePageDef.xml at the top of the page.
    2. Click on the “pencil” sign on the top of the Bindings Box.
    3. On the eventBindingProperties wizard form, type raiseTaskFlowLaunchEvent in the ID field.

     

     

    image027.png

     

    Include an event

     

    1. On the Structure side of UIBulkOperationPagePageDef.xml, right-click on eventBinding.
    2. Select Insert Inside eventBinding.
    3. Select events.

     

    200.png

     

    Include a specific event

     

    1. On the Structure side of UIBulkOperationPagePageDef.xml, go to bindings  > eventBinding> events.
    2. Rght click on events.
    3. Select Insert Inside events
    4. Select event.

     

    image031.png

     

    1. On the Insert event popup, type oracle.idm.shell.event.TaskFlowLaunchEvent into the name *: field.
    2. Click OK.

     

    image033.jpg

     

     

     

    Checkpoint

     

    Compile the application.

     

    1. Click Project: UIBulkOperation.
    2. Click on Rebuild UIBulkOperation.jpr.

    image034.png

     

    Our goal at this point is to build an application without errors or warnings. If any error appear, please review what you did to locate and fix any problems.

     

     

    Packing the project

     

    Configure the deployment package

     

    1. Right click the project UIBulkOperation.
    2. Click Project Properties.

     

    image001.png

     

    1. On the Project Properties wizard, click Deployment.
    2. Check the Use Project Settings button.
    3. Click Delete.

     

    40.001.png

     

      6.  Click New...

    1. On the Create Deployment Profile wizard, click the arrow on the right-hand side of the Achieve Type pulldown.
    2. Select ADF Library JAR File.
    3. In the Name: field, type adflibUIBulkOperation.
    4. Click OK.

     

    image003.png

     

    Create package adflibUIBulkOperation.jar

     

    1. Right click the project UIBulkOperation.
    2. Click Deploy.
    3. Click adflibUIBulkOperation.

     

    image004.png

     

    1. Click Next.

     

    image005.png

     

    1. Check the information and click Next.
    2. Click Finish.

     

    Update the custom library WAR files -dev-starter-pack.war

     

    You can find more details here: https://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#OMDEV3551.

     

    1. Unpack the WAR file oracle.iam.ui.custom-dev-starter-pack.war inside  <OIM_HOME>/server/apps.
    2. Put our new project adflibUIBulkOperation.jar file under the WEB-INF/lib directory.

     

    image006.png

     

    1. Pack oracle.iam.ui.custom-dev-starter-pack.war with the same name, and put it back in the same place on the OIM server.
    2. Restart the OIM server.

     

    Grant the Right Permission to New Task Flow

     

    To assign the right permission to a new task flow in WebLogic, follow these steps:

     

    1. Log in to Oracle Enterprise Manager (OEM) where OIM was installed.
    2. Click and expand Identity and Access.
    3. Click and expand OIM.
    4. Click and expand oim(11.1.2.0.0).
    5. On the left panel, click under oim(11.1.2.0.0) on Oracle Identity Manager.
    6. On the menu, click Security.
    7. On the sub-menu, click Application Policies.

     

    image007.png

     

    1. Under Search, click on the arrow on the right side of Application Stripe, and select OracleIdentityManager.
    2. Leave the Name field blank and click the blue arrow button on the same line.This will fill the table with the available policies, as shown below.
    3. Click the Create icon.

     

    image008.png

     

    1. On the Add Principal wizard form, use the pull-down arrow to select Application Role as Type.
    2. Leave the Principal Name field blank, and click the blue arrow button on the same line.
    3. Select authenticated-role and click OK.

     

    image009.png

     

    1. The Add Permission wizard form will now appear. DO NOT TOUCH ANYTHING!
    2. Click Continue.

     

    image010.png

     

    1. A new wizard form, also called Add Permission, will appear.
    2. In the *Permission Class field, type in oracle.security.jps.service.policystore.ApplicationRole.
    3. In the Resource Name field, type in /WEB-INF/UIBulkOperation-task-flow-definition.xml#UIBulkOperation-task-flow-definition.
    4. In the Permission Actions field, type view.
    5. Click Select.

     

    image011.png

     

    1. Verfty that you have entered the correct information, then click OK.

     

    image012.png

     

    Create and Publish the Sandbox

     

    Now we'll create a new sandbox with the button that we'll use to call the JSF page that we've created. For more details, see:  https://docs.oracle.com/cd/E27559_01/dev.1112/e27150/uicust.htm#OMDEV4795.

     

    1. Log in to OIM with xelsysadm account.
    2. On the main page, choose  Sandboxes from the horizontal navigation at the top of the page.
    3. Under the Manage Sandboxes tab, click Create Sandbox.

     

    image013.png

     

    1. In the *Sandbox Name field, type UIBulkOperation, as shown below.

     

    image014.png

     

    1. Click  Save and Close.
    2. Select Customize from the horizontal navigation at the top of the page.

     

    image015.png

     

    1. Click View.
    2. Choose Source from the pulldown menu.

     

    201.png

     

    1. Click on the Open Task icon under Administration region.
    2. Check if panelGroupLayout: vertical is on the top and click Add Content.
    3. Scroll down in the Add Content wizard and click on Web Components, as shown below:

     

    image017.png

     

     

    1. The Web Components folder expands. Click Add, to the right of the Command Image Link component.
    2. Click Close.

    image018.png

    1. Under panelGroupLayout:vertical, click the new commandImageLink.
    2. Click Edit. The Component Properties: commandImageLink popup will appear.
    3. In the Icon field, type /images/team.png.
    4. In the Text field, type Bulk Operation
    5. Click OK.

    202.png

     

    21.  Click panelGroupLayout:vertical.

    22.  Click Edit. The Component Properties: vertical popup appears.

    23.  Click on the blue arrow to the right of Bulk Operation.

     

     

     

    203.png

     

    24.  Click repeatedly until Bulk Operation appears at the bottom of list.

    204.png

     

    1. Click OK.

     

    Export and edit the sandbox

     

    1. Click Close.

     

    Imagem 83.png

     

    image023.png

     

    1. Select the UIBulkOperation sandbox and click Export Sandbox, on the horizontal bar at the top of the page.
    2. Click the Save File button, and save the sandbox_UIBulkOperation.zip file in a directory (e.g., Downloads).
    3. Unpack the zip file and edit the lhs-nav.jsff.xml file in a notepad.

     

    image024.png

     

    1. Find the following entry in the file lhs-nav,jsff.xml: text="Oprações emLote the property actionListener="#{backingBeanScope.bulkOperationsReqBean.apresentaTaskFlow}" and insert after this declaration "actionListener="#{backingBeanScope.bulkOperationsReqBean.apresentaTaskFlow}"

       

      Before Edit

                                      

      <mds:insert parent="pgl3" position="last">

      <af:commandImageLink xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="e4940237481" icon="/images/team.png" text="Oprações em Lote" />

      </mds:insert>

       

      After Edit

                                                                    

      <mds:insert parent="pgl3" position="last">

      <af:commandImageLink xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="e4940237481" icon="/images/team.png" text="Oprações em Lote"

      actionListener="#{backingBeanScope.bulkOperationsReqBean.apresentaTaskFlow}" />

      </mds:insert>

    2. Save and pack the file with the same name: sandbox_UIBulkOperation.zip
    3. Go back to the OIM console and click Import Sandbox.
    4. Click Browse, and select the file sandbox_UIBulkOperation.zip and click Import.

     

    image025.png

     

    1. If the UIBulkOperation is not listed, click Refresh.
    2. Select UIBulkOperation.
    3. Click Activate Sandbox.

     

    image026.png

     

    1. And voilá: now we can use our new customization.
    2. After checking the customization, you can publish the sandbox.

     

    About the Author

    Eduardo Ludovico is a Senior Consultant at Oracle.