Wednesday 10 April 2019

OIM Certification - Modify Composite to have all the Closed Loop Remediation(CLR) Requests to be Auto-Approved.


Login to SOA Composer(http://<HOST_NAME>:8001/soa/composer) using weblogic credential.


Click on “Open Rules” as shown in below screenshot.


Open “DefaultRequestApproval” composite.


Click on “Edit”.


Expand “Ruleset1” and change “stageType” (challenge to auto) as shown in below screen shot.





Now expand “Ruleset2” and change “stageType” (challenge to auto)







Commit changes.




Happy Learning!!!

Thursday 4 April 2019

OIM - How to Add User Defined Field(UDF) in Certification Line Item Page?


Login to the Identity Console through sysadmin user and then click on “Sandboxes”.


Click on “Create Sandbox”.


Provide sandbox name and then click  “Save and Close”.



Click on “Certification” tile.


Open certification and click on Customize.


Go to Structure Tab.


Select User Login.


Select table as highlighted in below screen shot.


Click on add component icon.


Go to Data Component - Certification as shown in below.


Open “UserCertificatiionUserVO1”.


Scroll down and find JobCode and then add that attribute as ADF Table Column.


Select JobCode and click on cut icon.


Scroll right and select last column then click on “Paste After” as highlighted in below screen shot.


Close this window.


Export Sandbox and then publish it.

Added Successfully. 


Saturday 30 March 2019

OIM - Unable to Load Lookup Data in Design Console Due to Large Record.

Open xlclient.cmd and add below line.

-Dweblogic.MaxMessageSize=50000000 ^
 

OIM API - Get Comma Separated Member's UserLogin for Given Role in Java Embedding.


java.sql.PreparedStatement ps = null;
java.sql.ResultSet rs = null;
java.sql.Connection connection = null;                                                                                                                              
javax.sql.DataSource datasource = null;                
String dataSourceName = "jdbc/operationsDB";
String roleName = "TestRole";

String sqlQuery = "select RTRIM(XMLAGG(XMLELEMENT(E,usr.usr_login,'|').EXTRACT('//text()') ORDER BY usr.usr_login).GetClobVal(),'|') AS MEMBERS from UGP,USG,USR where USG.UGP_KEY = UGP.UGP_KEY AND USG.USR_KEY = USR.USR_KEY AND UGP_NAME = '" + roleName + "'";   

try{   
    addAuditTrailEntry( "****** Get comma separated member's user login for role *******"); 
 
    javax.naming.InitialContext initialcontext = new javax.naming.InitialContext();     
    datasource = (javax.sql.DataSource) initialcontext.lookup(dataSourceName);     
                
    if(null != datasource){     
        connection = datasource.getConnection(); 
 
        ps = connection.prepareStatement(sqlQuery);    
        rs = ps.executeQuery();   

        while(rs.next()){   
            System.out.println("Role Members : " + rs.getString("MEMBERS")); 
            addAuditTrailEntry("Role Members : " + rs.getString("MEMBERS"));  
        }    
    }else{ 
        System.out.println("Error while getting datasource from JNDI"); 
    }    
}catch(Exception e){    
    System.out.println("********Error******"); 
    System.out.println("Exception : " + e.getMessage());    
    addAuditTrailEntry("Exception : " + e.getMessage());
}finally{ 
    if (rs != null) { 
            try { 
                    rs.close(); 
                    rs = null; 
            } catch (java.sql.SQLException e) { 
                    System.out.println("Exception while closing ResultSet : " + e.getMessage()); 
            } 
    } 

    if (ps != null) { 
            try { 
                    ps.close(); 
                    ps = null; 
            } catch (java.sql.SQLException e) { 
                    System.out.println("Exception while closing PreparedStatement : " + e.getMessage()); 
            } 
    } 

    if (connection != null) { 
            try { 
                    connection.close(); 
                    connection = null; 
            } catch (java.sql.SQLException e) { 
                    System.out.println("Exception while closing Connection : " + e.getMessage()); 
            } 
    } 
}



SOA - Custom Solution for Escalating Request to Group after Specified duration.

Open ApprovalProcess.bpel file and do below configuration.



Set expiry for existing human task.



Add one more switch condition for EXPIRED outcome in existing human task.




Add new human task for group.




Configure assignment to group for newly created human task.



In value set role name.



Happy Learning!!!

Thursday 14 March 2019

OIM API - How to Remove Data From Child Form?

public void removeDataFromChildForm(long processInstanceKey) throws Exception {
String childTableName = "UD_LDAP_ROL";//child table name 
String columnName = "UD_LDAP_ROL_ROLE_NAME";//column name 
String columnValue = "TestRole";//role name which you want to delete
String childTablePrimaryKey = childTableName + "_KEY";

tcFormInstanceOperationsIntf formInstanceOperationsIntf = Platform.getService(Thor.API.Operations.tcFormInstanceOperationsIntf.class);

long processFormDefinitionKey = formInstanceOperationsIntf.getProcessFormDefinitionKey(processInstanceKey);
int processParentFormVersion = formInstanceOperationsIntf.getProcessFormVersion(processInstanceKey);
tcResultSet childFormDef = formInstanceOperationsIntf.getChildFormDefinition(processFormDefinitionKey,processParentFormVersion);

for(int k = 0; k < childFormDef.getRowCount(); k++){
childFormDef.goToRow(k);
String childFrmName = childFormDef.getStringValue("Structure Utility.Table Name");
if(childFrmName.equalsIgnoreCase(childTableName)){
long childKey = childFormDef.getLongValue("Structure Utility.Child Tables.Child Key");
tcResultSet childData = formInstanceOperationsIntf.getProcessFormChildData(childKey, processInstanceKey);

for (int i = 0; i < childData.getRowCount(); i++) {
childData.goToRow(i);
String roleName = childData.getStringValue(columnName);

if (roleName.equals(columnValue)) {
long rowKey = childData.getLongValue(childTablePrimaryKey);
formInstanceOperationsIntf.removeProcessFormChildData(childKey, rowKey);
System.out.println("Removed successfully!!!");
}
}
}
}
 }

Monday 11 March 2019

OIM API - How to Add Data in Child Form?

public void addDataInChildForm(long processInstanceKey) throws Exception {
    String childTableName = "UD_LDAP_ROL"; //child table name 
    String columnName = "UD_LDAP_ROL_ROLE_NAME"; //column name
    String columnValue = "TestRole"; //column value 
    
    tcFormInstanceOperationsIntf formInstanceOperationsIntf = Platform.getService(Thor.API.Operations.tcFormInstanceOperationsIntf.class);
    
  long processFormDefinitionKey = formInstanceOperationsIntf.getProcessFormDefinitionKey(processInstanceKey);
int processParentFormVersion = formInstanceOperationsIntf.getProcessFormVersion(processInstanceKey);

tcResultSet childFormDefinition = formInstanceOperationsIntf.getChildFormDefinition(processFormDefinitionKey,processParentFormVersion);

for(int i = 0; i < childFormDefinition.getRowCount(); i++){
childFormDefinition.goToRow(i);
String childFrmName = childFormDefinition.getStringValue("Structure Utility.Table Name");

if(childFrmName.equalsIgnoreCase(childTableName)){
long childKey = childFormDefinition.getLongValue("Structure Utility.Child Tables.Child Key");

HashMap addAttr = new HashMap();
addAttr.put(columnName, columnValue);

formInstanceOperationsIntf.addProcessFormChildData(childKey, processInstanceKey, addAttr);
System.out.println("Added successfully!!!");
}
}
 }