Monday 8 May 2017

Add a new page in OIM 11gR2 PS3 (With ADF Task Flow)

Implementing OIM in an organization doesn't fulfill all the requirements. Some time we need to do lot of customization to meet customer's expectations. The good thing about OIM is, you can customize the functionalities and User Interface as per your own requirements. Even you can add a complete new page to define your own functionalities.. In this post I am going to describe the basic steps to add a new page in OIM 11gR2 PS3.

Adding a new page in OIM is not like adding a new html or jsp page. OIM only support ADF task flow to show its contents, and the functionalities of this page will be executing inside OIM engine. if you observe the pages in OIM while opening, you can find the pages are opening in a new internal tab where browser url is fixed.


All this pages are nothing but ADF task flow. We can create our own task flow in ADF and merge it to OIM identity console home page.

1. first open the JDeveloper (I am using 11.1.1.6).
2. Create a new Fusion Web Application project.

3. click Next
4. The model project details appeared. Click Next

5. Click Next.
6. View controller project details appeared. Click Next.
7. Click Finish to create the project
8. once the project is created it will looks like the above image.
9. Now we have to create a new task flow in this project. Right click on the ViewController project and click on New
10. select the JSF from the left and select ADF Task Flow from the right.


11. click ok
12. Provide the name of the task flow and append "\oracle\iam\ui\custom" at the directory link after WEB-INF. Otherwise OIM will be unable to recognize the task flow. once done click on Ok to create the task flow.

13. Now open the task flow test-flow.xml,  drag the view components from the components pallet into the task flow page. Give a name like TestPage
14. Every view components you drag into this task flow page will be created as a fragment page. To create the fragment of this view component, double click on it.
15. It will ask you to create jsff page for that view components. provide a name (recommended to keep the default: TestPage.jsff) and click on Ok. It will create a .jsff page under Web Component.

16. Now open the TestPage.jsff. Drag the "Output text" component from the Source Elements (from right side panel) into the jsff page. Change the content of the text "This is the test task flow page in OIM PS3".


17. Drag a spacer component and another Output Text element into this jsff page.


18. Now click on the source table of the TestPage.jsff. Change the value of the last output text added as below.

value="#{oimcontext.currentUser['User Login']}"


Note: "#{oimcontext.currentUser['User Login']}"  is the EL (Expression Language) to display the currently logged in user's username. As we are embedding this task flow inside OIM identity console page, so we can use all the OIM's default ELs in this project.

19. Click on Save button to save the project.
20. The basic task flow project is ready. Now we have to create a new deployment profile for this project to build ADF library jar. OIM will read this task flow project as an added UI customization, and all UI customization in OIM required ADF Library Jar. other format will not work.

21. Right click on the ViewController project and click on New. Select Deployment Profile from left and ADF Library Jar from right and click Ok.


22. Click Ok.


23. Provide the jar name (recommendation is to keep the default). it should always start with adflib. Once done, click Ok.


24. When it will ask for the model project dependencies, click on Ok.


 25. In the Deployment page you can find the default WAR is also present with the newly added adf lib. Remove the WAR profile and keep only the ADF Lib Jar.


26. After removal click on Ok. Save the project and deploy the project by Right click on ViewController -> Deploy -> adflibOIMTF1


27. click Next

28. Click Next


29. Click on Finish to create the jar.


30. The message window will display the successful compilation of the project. It also display the path where the jar file is created.


31. Now we have to implement this jar file into OIM and link this task flow into OIM home page.
32. Login to OIM server using FTP, and copy the oracle.iam.ui.custom-dev-starter-pack.war  from [OIM_HOME]/servers/apps to your desktop.

33. Copy the adflibOIMTF1.jar to oracle.iam.ui.custom-dev-starter-pack.war /WEB-INF/lib



34. replace the old oracle.iam.ui.custom-dev-starter-pack.war file with the new one, back to the same location.

35. Restart the OIM server.

36. Open the OIM PS3 identity console. and create a new sandbox.
37. From the home page click on Customize.
38. All the OIM PS3 tiles are arranged in table manner. The entire page is a table. 1 tile box is a Colum of a row of the table. Each row can hold 4 columns (means 4 tiles). So if we need to add a new tile, then we have to select the row where new column can be added and add a new column on it.
if any row is not have space to hold columns the create a new row.

37. In this case I selected the 2nd row and added a new cell. click on the row and click on Add (+) button.


38. Now select Web Components.


39. Now add a new grid cell.



40. Now select the Grid cell and click on Add (+) button


41. From the same location select and Add Dashboard Tile.


42. Close the web composer of OIM. You can see the new tile is added with default name. Do not change any details of the tile from the OIM Web Composer.


43. Export the sandbox.

44. Open the sandbox zip and edit the oracle\iam\ui\homepage\home\pages\mdssys\cust\site\site\self-service-home.jsff as below. Just add the highlighted details into the page.


45. Save the page and copy it on to the sandbox.
46. Import the sandbox into OIM and make it active.
47. Go to the Home page of identity console and you can see the modifies tile.


48. Click on the tile and you can see a new page opened.


49. This way you can add new page in OIM.

In my next blog I will discuss, how to embed functionalities onto the newly added page, where task flow page will be integrated with managed bean, and managed bean will contains OIM APIs. 

3 comments:

  1. Hi,
    How to launch taskflow from login page i.e from unauthenticated pages

    ReplyDelete
    Replies
    1. What type of operation u want to perform from the OIM unauthenticated page? For generic operation u can simply add a new we link with your new web page.

      follow the below link
      https://docs.oracle.com/cd/E52734_01/oim/OMDEV/uicust.htm#OMDEV5346 ------> 19.3.9 Customizing Unauthenticated Pages

      Delete
  2. Hi, I have a task flow already created on the home page. Now I want to rename the dashboard title Text and instructionText. I tried to create a sandbox and make changes to rename the texts. But I am not able to edit them. How can I achieve this?

    ReplyDelete

Followers

OIM API for adding process task and retry failed task

 In this blog you can find how to add new process task and retry any failed/rejected tasks using API. Adding new process task: /************...