Showing posts with label OIM 11gR2 PS3 workflow not showing. Show all posts
Showing posts with label OIM 11gR2 PS3 workflow not showing. Show all posts

Monday, 28 January 2019

OIM PS3 Automated Testing Using Selenium

OIM's UI functionalities can be tested by automation tool like Selenium. There are lot of test cases we need to perform on OIM UI, after doing some developments or implementation (just to verify whether all existing functionalities are working fine). Some time it is very painful job to perform all per-defined test cases again and again. Using Selenium, all the UI based pre-defined test cases can be executed automatically with out any human intervention, and this way we can achieve automated testing on OIM, which is faster than manual testing, efficient and error free.

this blog will give an example of how we can build Selenium test script for OIM.

Selenium test script works on web element of an web page, like button, link etc. If we can identify those element, then it is not a very difficult job to build a test script for a scenario.

for example, I need to perform the below scenario on OIM PS3

************ As Requester ************************
 1. Login to OIM identity console as requester.
 2. Go to catalog and search for a disconnected application "".
 3. Click on Add To cart and checkout.
 4. Fill the application form.
 5. Provide business justification and submit the request.
 6. Logout from the OIM Identity console.

**************** As Approver *********************
 7. Login to OIM identity console as approver.
 8. Go to Pending Approval and search for the requested id generated by requester.
 9. Select the request and approve the same.
10. Logout from OIM Identity console.

**************** As Implementer *******************
11. Login to OIM Identity console as implementer.
12. Go to Pending Fulfillment and Search for the request id generated by requester.
13. Select the request and complete the same.
14. Now go to Track Request and verify the status of the request.

If I need to perform the automated testing of the above test scenario, I have to convert each and every steps with selenium methods. for example I if need to click a button or enter text into a text field, I need to first get the XPath or Element id of those components. Then using those details selenium can identify those element in  browser and perform action (like click or enter data).

in my case //*[@id=\"pt1:_pt_it1::content\"] is the XPath representation of User Login field of OIM login page. similarly //*[@id=\"pt1:_pt_cb1\"] is for Submit button, and so on.





Now here is the full Java code for Selenium Test. For basic of Selenium and how to setup environment refer Selenium HQ

Please check the below video for how the actual testing looks like.



Please note, all the XPaths mentioned in the above code, may not be exactly same for you (before running the test, verify all the XPaths form chrome browser).

Friday, 19 May 2017

OIM 11gR2 PS3 Workflow policy page showing blank

In OIM 11gR2 PS3, one should not update the default applications (Self-Service and Sysadmin) from Weblogic deployments.



Sometime during implementation of OIM UI Customizations, peoples are updating the oracle.iam.ui.custom. In PS3 you can find that while updating oracle.iam.ui.custom, automatically below depended applications got updated.



If by mistake oracle.iam.console.identity.self-service.ear and oracle.iam.console.identity.sysadmin.ear got updated then you may find the workflow policy in sysadmin console showing blank. See the below image where opening the Workflows -> Approvals showing a white page.






Reason:
In OIM PS3, if some how oracle.iam.console.identity.self-service.ear and oracle.iam.console.identity.sysadmin.ear got updated then the OPSS policy gets overwritten.


Solution:
To resolve this issue, we need to Re-Seed the policy again from self service and sysadmin.
There are 3 policy files you need to re-seed.


1. Copy 'jazn-data.xml' (from OIM.ear) to a different directory.
2. Copy 'jazn-data.xml' (found in oracle.iam.console.identity.self-service.ear) to a different directory.
3. Copy 'jazn-data-sysadmin.xml' (found in oracle.iam.console.identity.self-service.ear) to a different directory.


4. Go to [DOMAIN_HOME]/config/fmwconfig/ take a backup of the file 'jps-config-jse.xml' in the same folder


cp jps-config-jse.xml jps-config-jse_backup.xml


5. Open the backup file 'jps-config-jse_backup.xml' and add the below 2 jps contexts just before the "</jpsContexts>" tag.


<jpsContext name="mydst">
<serviceInstanceRef ref="policystore.db"/>
</jpsContext>

<jpsContext name="mysrc">
<serviceInstanceRef ref="mysource.policystore.xml"/>
</jpsContext>



6. Open the 'jps-config-jse_backup.xml' file and add the below 'serviceInstance' just before the "</serviceInstances>" tag.


<serviceInstance name="mysource.policystore.xml"
provider="policystore.xml.provider" location="<FILE PATH>">
<description>My source</description>
</serviceInstance>



Give an absolute path of jazn-dataXXXX.xml in <FILE PATH> as per the step 1. You need to change the <FILE PATH> 3 times to seed 3 different policies.


7. Goto the location "[MWHOME]/oracle_common/common/bin/" and execute "sh wlst.sh" script


8. Execute the below command to import policies from Jazn-dataxxx.xml to the OPSS store.


Syntax
migrateSecurityStore(type='appPolicies', configFile='/opt/app/oracle/Middleware/user_projects/domains/<oim_domain>/config/fmwconfig/jps-config-jse_backup.xml',
src='mysrc', dst='mydst', srcApp='<Follow point B mentioned above>', overWrite='false')



Example
migrateSecurityStore(type='appPolicies', configFile='[DOMAIN_HOME]/config/fmwconfig/jps-config-jse_backup.xml',src='mysrc', dst='mydst', srcApp='OIM', overWrite='false')


Note: srcApp value will be changed according to the policy data as below:
'jazn-data.xml' (from OIM.ear)  - srcApp is OIM
'jazn-data.xml' (found in oracle.iam.console.identity.self-service.ear) - srcApp is OracleIdentityManager
'jazn-data-sysadmin.xml' (found in oracle.iam.console.identity.self-service.ear) - srcApp is OracleIdentityManager




9. Exit the WLST session using exit() command.
10. Repeat from the Step 6 for the other 2 policies.
11. Once done take a restart of OIM servers.


Example for the WLS command for other 2 policies:


migrateSecurityStore(type='appPolicies', configFile='[DOMAIN_HOME]/config/fmwconfig/jps-config-jse_backup.xml',src='mysrc', dst='mydst', srcApp='OracleIdentityManager', overWrite='false')

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: /************...