oig 11g r2 field enablement training - oracle...oig 11g r2 field enablement training lab 12.1 –...

14
OIG 11G R2 Training Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 1 | Page OIG 11G R2 Field Enablement Training Lab 12.1 Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided for use only during the workshop. Please note that you are responsible for deleting them from your computers before you leave. If you would like to try out any of the Oracle products, you may download them from the Oracle Technology Network (http://www.oracle.com/technology/index.html ) or the Oracle E-Delivery WebSite (http://edelivery.oracle.com )

Upload: others

Post on 25-May-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 1 | P a g e

OIG 11G R2 Field Enablement Training

Lab 12.1 – Public TaskFlows

Disclaimer: The Virtual Machine Image and other software are provided for use

only during the workshop. Please note that you are responsible for deleting them

from your computers before you leave. If you would like to try out any of the Oracle

products, you may download them from the Oracle Technology Network

(http://www.oracle.com/technology/index.html) or the Oracle E-Delivery WebSite

(http://edelivery.oracle.com)

Page 2: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 2 | P a g e

Table of Contents

Introduction ……………………………………………………………………………………………………… 3

Deploying the Public taskflow and testing it ……………………………………………………….3

Invoking the Public taskflow in OIM UI ………………………………………………………………..10

Page 3: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 3 | P a g e

1. Introduction

OIM 11.1.2.2.0 (PS2) exposes set of task flows which can be called public task flows, since these

task flows can be called from the UI developed by customers. These task flows are available and

exposed in the product. Some of the use cases for these task flows might be.

Customer wants to launch the Request Details page for a given request id

Customer wants to launch the User Details page by clicking on the Manager login in the User

Details page

Similarly, they want to launch role details page, account details page, catalog item details

page etc...

In this lab we will first deploy the task flows and take a look at how to call these task flows. We will

then go through an example of how to provide a link to manager in an user detail page so that when

the link is clicked manager details are displayed.

2. Deploy the Public task flows and test it

The task flows are delivered in two sections. The code is placed in oracle.iam.ui.custom-

dev-starter-pack.war and the sandbox contains the necessary UI elements.

Note: We have already deployed the oracle.iam.ui.custom-dev-starter-pack.war as part

of the Request lab in Lab 4.1. If you have not completed Lab4.1 follow the below steps

a) Stop the OIM Server

b) Copy the war file . Navigate to /app/dummydata/Lab4.1 in a terminal

c) Issue the below command in single line

cp oracle.iam.ui.custom-dev-starter-pack.war

/app/Middleware/Oracle_IDM1/server/apps/

d) Start the OIM Server

1. Now lets import the sandbox for the public taskflows. Login to identity console as

admin/Oracle123

Page 4: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 4 | P a g e

2. Click on the Sandboxes link at the top

3. Click on Import Sandbox

4. Now in the browse window navigate to /app/dummydata/Lab12.1 and select

sandbox_publicTaskflows.zip file

5. Click on Import to import the sandbox

6. In the main window if you don’t see the sandbox listed click on Refresh and you should

see the imported sandbox

7. Click on Publish Sandbox to publish the imported sandbox

Note: You can open the sandbox and see the code. Extract the

sandbox_PublicTaskFlows.zip file in the /app/dummydata/Lab12.1 folder. Now open

the file lhs-nav.jsff.xml located at

sandbox_PublicTaskflows\oracle\iam\ui\platform\pages\mdssys\cust\site\site folder.

You can see the below line in there

<af:commandLink xmlns:af="http://xmlns.oracle.com/adf/faces/rich"

id="e8867949079" text="Public Taskflows" shortDesc="Link to Public Taskflows

Validation Page"

actionListener="#{backingBeanScope.publicTaskflowSampleReqBean.launchPublicTa

skflowsGuide}"/>

Page 5: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 5 | P a g e

As you can see the link will be displayed with Text Public TaskFlows and when the user

clicks on the link the bean publicTaskflowSampleReqBean will launch the task flow.

8. Now in the UI you should see a link Public TaskFlows. Click on it to open the task flows

on the right hand side. These are the public task flows that are supported. Each task

flow also talks about input needed to launch the taskflows

Page 6: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 6 | P a g e

9. Now let’s test some of the task flows. Let’s first test the user details task flow. Enter

the user id as JKRUASE and click on Launch User Details button.

10. You should be taken to the user details page for JKRAUSE. As mentioned earlier in the

introduction if customers would like to call the user details page from their UI they can

call this taskflow with the parameter which is the user login.

11. Go back to Publc Taskflows tab. Now lets test the Role Details task flow. Enter Denver

Badge and Launch the taskflow

12. You should see the Role details page

Page 7: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 7 | P a g e

13. Lets look at the Account Request Taskflow invocation. Scroll down to Account

TaskFlows section.

For the Application Instance Names enter: EnterpriseDirectoryOUD

Note: You should be entering the application instance name. Display name of the

application instance will not work.

For the User Login enter: JKRAUSE

Now Click on Launch Request Account

14. You would see that you would be taken to the Cart with your specified Beneficiary and

specified application instance

Page 8: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 8 | P a g e

15. Now Let’s check the Catalog Search taskflow.

Enter the below

Search Criteria : {entityType:"ApplicationInstance", criteriaName: "Enterprise", tags:

"Enterprise", allowSearch: "false"}

User Logins: JKRAUSE,DCRANE

16. You should see the result as below

Note: Notice the multiple beneficiaries since this task flow can take multiple target

users. Also notice that the search bar is not present, this is controlled by “allowSearch:

"false” which in our example we have prevented the search.

If you don’t supply User Login current user will be used.

Security: The OIM security will apply to public taskflow as well. User will only shown

the items from cart the user has permission to view (i.e only objects published to users

org is visible to the user)

Page 9: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 9 | P a g e

Also add directCheckout:true to the search and you should have the items in the cart

ready to checkout

Search Criteria : {entityType:"ApplicationInstance", criteriaName: "Enterprise", tags:

"Enterprise", allowSearch: "false",directCheckout:"true"}

User Logins: JKRAUSE,DCRANE

17. Also you can search for Roles and Entitlements by providing entityType as role and

entitlement.

Search Criteria : {entityType:"Role", criteriaName: "Enterprise", tags: "Badge",

hiddenTag:"San",allowSearch: "false"}

User Logins: JKRAUSE,DCRANE

Page 10: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 10 | P a g e

Search Criteria : {entityType:"Entitlement", criteriaName: "Enterprise", tags: "VPN",

allowSearch: "false"}

User Logins: JKRAUSE,DCRANE

3. Invoking the Public task flow in OIM UI

Now that we have seen how to invoke the public task flows. Let’s look at a real world use case.

We would like to modify user details page so that when we display the manager name in the user

details page the name will be highlighted with a clickable link. When the user clicks on this link

manager details are displayed. This is an example of calling the user details public task flow.

As with the public task flow we have two parts. The WAR file (oracle.iam.ui.custom-dev-starter-

pack.war) is already deployed. We have a sandbox sandbox_UserDetailsCustomization.zip which

contains the modification to display link for the manager.

1. Login to Identity console as admin/Oracle123

2. Click on Sandboxes on the top

3. In the Sandboxes screen click on Import Sandbox

4. Navigate and choose the file /app/dummydata/Lab12.1/

sandbox_UserDetailsCustomization.zip

5. Click on Import to import the sandbox

Page 11: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 11 | P a g e

6. On the main sandbox page click on Refresh first and then click on Publish Sandbox

Note: You can take a look at the sandbox code to see how the user details has been

called. Extract the file sandbox_UserDetailsCustomization.zip located in

/app/dummydata/Lab12.1

Now open the file userdetails.jsff.xml located at

sandbox_UserDetailsCustomization\oracle\iam\ui\manageusers\pages\mdssys\cust

\site\site folder.

Look at the below line

<af:commandLink xmlns:af="http://xmlns.oracle.com/adf/faces/rich"

id="e3850829320" text="#{bindings.userManagerName.inputValue}"

shortDesc="#{bindings.usr_manager_login.inputValue}"

actionListener="#{backingBeanScope.publicTaskflowSampleReqBean.invokeUserMan

agerDetails}"/>

The Text and Short Descriptions are populated dynamically based on the value of the

manager for each user

The actionListener shows the bean getting called to display the details. The bean is

publicTaskflowSampleReqBean and the java method is invokeUserManagerDetails

If you open the JDeveloper in the VM Image (By using the launchJDeveloper shortcut

in Startup Scripts under Desktop)

Open the Identity Samples source code under PublicTaskFlows project

Page 12: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 12 | P a g e

public void invokeUserManagerDetails(ActionEvent actionEvent) {

// Add event code here...

RichCommandLink userManagerLink = (RichCommandLink)(actionEvent.getSource());

String userManagerLogin = userManagerLink.getShortDesc();

String userManagerName = userManagerLink.getText();

if (userManagerLogin != null &&

!userManagerLogin.equals("")) {

Map<String, Object> params = new HashMap<String, Object>();

params.put("userLogin", userManagerLogin);

FacesUtils.launchTaskFlow("User_Details",

"/WEB-INF/oracle/iam/ui/taskflows/public/tfs/user-details-tf.xml#user-details-tf",

"User Details: " + userManagerName,

"/images/user_red.png", "description", "helpTopicId",

false, params);

}

Page 13: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 13 | P a g e

}

As you can see above the invokeUserManagerDetails is calling the taskflow user-

details-tf.xml#user-details-tf. If you look at the input that is passed. We only need to

pass the User Login as indicated in bold in the code above. If you recall the public

taskflow page earlier in the lab the user details taskflow only takes one parameter

which is the user login.

7. Now let’s test this task flow. Logged in as admin to identity console. Click on link Users.

Search for the user JKRAUSE

8. Open the user JKRAUSE. You should see the Manager Danny Crane has a link which can

be clicked

9. Click on the link Danny Crane

10. You should see the Manager Danny Crane information in another new tab. This shows

you how to call the public taskflow.

Page 14: OIG 11G R2 Field Enablement Training - Oracle...OIG 11G R2 Field Enablement Training Lab 12.1 – Public TaskFlows Disclaimer: The Virtual Machine Image and other software are provided

OIG 11G R2 Training

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class 14 | P a g e

Summary

In this lab we saw how PS2 has exposed taskflows that can be called from UI that

customers might have developed. We also saw an example of how the user details task

flow can be called to display the details of manager of an selected user.