Search This Blog

Thursday, September 30, 2010

Installation of Oracle Identity Analytics 11g


1.      What is OIA?

3.      For Oracle Identity Analytics Installation :
Details:
a.      Java JDK 1.6.0_21 (http://java.sun.com/javase/downloads/)
b.       Tomcat Application Server6.0.29 (http://tomcat.apache.org/download-70.cgi)
c.       MySQL 5.1 Database (http://dev.mysql.com/downloads/mysql/)
4.      Installation Startup :
·        JAVA SETUP
1.      Install Java JDK on your machine
2.      Set   PATH in your environment variables
PATH=%JAVA_HOME%;%PATH%;C:\Windows;C:\Windows\system32;C:\Program Files\Java\jdk1.6.0_21\bin
3.      Set  JAVA_HOME = C:\Program Files\Java\jdk1.6.0_21
4.      Go to Command Prompt and java –version to verify everything is correct.
·         APPLICATION  SERVER SETUP (TOMCAT)
1.      Unzip Tomcat. Unzip tomcat-6.0.28-preconfigured.zip into your C/D/E drive.
2.      E.g. Location is : E:\apache-tomcat-6.0.29
3.      Set CLASSPATH in your environment variables
CLASSPATH = .;C:\apache-tomcat-6.0.29\lib\servlet-api.jar;C:\apache-tomcat-6.0.29\lib\jsp-api.jar;C:\apache-tomcat-6.0.29\lib\el-api.jar;C:\Servlets+JSP;..;..\..
4.      Test the Server: Go to E:\apache-tomcat-6.0.29\bin and click on startup –Serve r should be started.
5.      Check  http://localhost:8080

·         SETUP MYSQL  DATABASE
1.      Download the installation setup from the link provided above.
2.      Typical Setup
3.      Skip Sign-Up
4.      Make sure "Configure the MySQL Server now" is checked
5.      "Detailed Configuration"
6.      "Developer Machine"
7.      "Multifunctional Database"
8.      "InnoDB Tablespace Settings" - leave everything default
9.      "Decision Support (DSS)/OLAP"
10.   Make sure "Enable TCP/IP Networking" is checked and leave the port number at 3306 (at this point, if you have a firewall, it will usually try to access itself on the localhost)
Leave "Enable Strict Mode" checked
11.  "Standard Character Set"
12.  Check "Install as Windows Service" and I would recommend leaving "Launch the MySQL Server automatically" checked.
13.  Enter a root password (and remember/write it down) and I would recommend leaving "Enable root access from remote machines" unchecked
14.  Then hit "execute" and it'll install and set it up.

·         SETUP   ORACLE  IDENTITY ANALYTICS
1. Create a folder E:\OIA and copy the download installation from the link above and extract it. It should look like below:
db
sample
conf
reports
legal
rbacx.war




2. This will be your RBACX_HOME, set the environment variable.


                       3. From sample folder, copy import and export directories and paste it to RBACX_HOME.
4. Setup database for OIA, use the schema script from RBACX_HOME\db folder.
For e.g. to load schema on mySQL database, use script named rbacx11.1.1.3.0_mysql_schema.sql
Go to mySQL folder on your drive through command prompt.


5.      mysql> \.rbacx-11.1.1.3.0_mysql_schema.sql
6.      Go to RBACX_HOME\conf folder and copy jdbc.properties from folder of name of your db to conf folder.
For e.g in case of mysql, copy jdbc.properties file from RBACX_HOME\conf\mysql folder and paste it to conf folder.Edit this properties file as per your database details. For instance, in case of mysql, replace $SERVER_NAME with host name of your database and port with 3306 (default for mysql)

7.      Edit iam.properties  file in RBACX_HOME\conf folder by replacing $RBACX_HOME with path of RBACX_HOME (so for our eg. it will be E:/OIA)

Extract rbacx.war from RBACX_HOME into temp folder.(e.g. C:\temp) [What we will do is to make some changes, add couple of jars and repack it again and deploy on server]
Now navigate to C:\temp\WEB-INF directory and edit below entry in log4j.properties file
log4j.appender.file.file=logs/rbacx.log (default)
log4j.appender.file.file=E:/OIA/logs/rbacx.log
8.      Similarly make changes to conf-context.xml file in C:\temp\WEB-INF folder. Replace $RBACX_HOME with path of RBACX_HOME
            9.  Copy below jars to C:\temp\WEB-INF\lib folder
1. jasper-jdt.jar (http://dlc.sun.com/rolemanager/Certification_And_Reporting)
2. jdbc driver for your database(mysql drivers are already included in lib folder so no need to add them ) For Oracle it would be ojdbc5.jar or ojdbc6.jar
3. Jars for the connectivity of the provisioning server, you will integrate with OIA.
(If OIM is provisioning server then get jars from ext and lib folder of your OIM_HOME)
(They are also available at http://dlc.sun.com/rolemanager/Provisioning_Server_Connectivity/)

10: Pack the folder C:\temp
C:\> cd C:\temp
C:\> jar -cvfm rbacx.war .

Step12: Use this war to deploy on your application server. Copy rbacx.war in WebApps folder of Tomcat and start the server.
Start the server and access the console using url


Default user name is rbacxadmin and password is password.
 







Thursday, September 23, 2010

Customizing OIM 11g Logo (Oracle identity Manager 11g)

1. Shutdown the OIM Server and Console

2. Navigate to \OIM_HOME\server\apps\oim.ear\iam-consoles-faces.war\images directory

3. Copy the demo.png file to this directory (this will change OIM logo to whatever logo we will give in this file)

4. Using the text editor , open the Admin.jspx file, located in the OIM_HOME\server\apps\oim.ear\admin.war\pages directory.

5. Locate the following line of code :




6. Below this line add the following code:





7. Locate the following line of code : 

8.Below this line add the following code






9. Save your changes to the Admin.jspx file.Close the file.

10. Restart OIM, you can see the change logo in the homepage of the console.

Monday, September 20, 2010

Field added in Lookup.USR_PROCESS_TRIGGERS are missing (Changes in GTC)

Task in Lookup.USR_PROCESS_TRIGGERS is missing if any modifications in GTC.

Solution :

When you add a UDF to Lookup.USR_PROCESS_TRIGGERS you also need to create a field type lookup for that field.
Please see the below example:
1. Create two UDF fields USR_UDF_1 and USR_UDF_2
2. Add the following in Lookup.USR_PROCESS_TRIGGERS
USR_UDF_1 - TaskUDF1
USR_UDF_2 - TaskUDF2
3. Created a new lookup
Code: LookupUDF1
Field: USR_UDF_1
Field Type radio checked
Group: Users
data:
UDF1 - TestUDF1
4. Created a new GTC connector
Results for Lookup.USR_PROCESS_TRIGGERS:
USR_UDF_1 - TaskUDF1 -> remains after the GTC creation
USR_UDF_2 - TaskUDF2 -> is deleted because it has no field type lookup

So please note that the added new row in Lookup.USR_PROCESS_TRIGGERS must be a valid usr table column. If this newly added row doesn't exist as field type lookup, it will be filtered out in OIM code. 

How to disable a user for the targets using Generic Technology Connector(OIM)

1.Find out the disable user field in the target(Field which we want to change in the target when user is disabled from OIM and to What) e.g. Active to Disabled, Yes to No.

2.Once done, create a lookup in oim (Status.Lookup)















3.Go to your GTC and add the lookup.status in the status lookup code and field name in the status attribute as shown below and then test it.


Tuesday, August 31, 2010

OIM Generic Technoloy Error-Reconciliation Issue

2010-08-30 12:47:33,055 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR XELLERATE.SERVER - Class/Method: tcRCE/createUserRecord encounter some problems: {1}
java.lang.NullPointerException
at com.thortech.xl.dataobj.util.tcAttributeSource.getAttrColumnName(Unknown Source)
at com.thortech.xl.dataobj.tcRCE.createUserRecord(Unknown Source)
at com.thortech.xl.dataobj.tcRCE.applyActionRules(Unknown Source)
at com.thortech.xl.dataobj.tcRCE.checkDataSorted(Unknown Source)
at com.thortech.xl.dataobj.tcRCE.eventPostUpdate(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.update(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
2010-08-30 12:47:33,058 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR XELLERATE.SERVER - Class/Method: tcDataObj/save Error :Data Update Failed
2010-08-30 12:47:33,059 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR XELLERATE.DATABASE - Class/Method: tcDataBase/rollbackTransaction encounter some problems: Rollback Executed From
java.lang.Exception: Rollback Executed From
at com.thortech.xl.dataaccess.tcDataBase.rollbackTransaction(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.rollback(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.doRollback(Unknown Source)
at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
at com.thortech.xl.dataobj.tcRCE.finishDataReceived(Unknown Source)
at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.finishReconciliationEvent(Unknown Source)
at com.thortech.xl.schedule.jms.reconOffline.ProcessOfflineReconMessages.execute(Unknown Source)
at com.thortech.xl.schedule.jms.messagehandler.MessageProcessUtil.processMessage(Unknown Source)
at com.thortech.xl.schedule.jms.messagehandler.ReconMessageHandlerMDB.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
2010-08-30 12:47:33,060 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR XELLERATE.JMS - An error occurred while processing the off lined reconciliation events


I was facing this issue yesterday.

Solution :

This issue occurs due to Bad Mapping. You should go in Process Definition-Reconciliation Field Mapping and Check all the mapping Correctly.

To see the details error in the log :
make Xellerate.JavaClient= DEBUG
and search for "display name" and "attr src "

Just before the null pointer exception, you will see the field name,which is not mapped properly.

Please let me know if any issues

Saturday, July 24, 2010

Oracle Identity Analytics


Oracle Identity Analytics
·         Oracle Identity Analytics formerly known as Sun Role Manager.
·         Oracle Identity Analytics is software that provides a comprehensive role lifecycle management and identity compliance solution that enables companies to proactively enforce internal security control policies and automate critical identity management process.

·         Features  of Oracle Identity Analytics


1. Role-based access control and identity-based controls automation
2. 360-degree view of access data through multilevel attestation
3. Automated removal of unauthorized access through out-of-box integration with Oracle Identity Manager and Oracle Waveset.
4. Complete role lifecycle management
5. Preventive simulation and detective controls for segregation of duties
6. Compliance and operational dashboards
7. Identity Warehouse with business-friendly glossary

Source : Oracle White Paper.

Wednesday, July 21, 2010

Schedule Task -From OIM Process Form to Text File

Hi All,

I designed a custom Schedule task last week.

OIM has a process form, resource object, and process Defn.

Case : All the users from reconciliation come into OIM and through automated policy get provisioned to the process Form.Custom Scheduled Task picks up all the users from the process form, which is present for any application (Table)(Dynamic Code) and places it in the text File. I have created a dynamic look-up in which you can enter all the fields in the code key which you need in the text file and decode key any label name appended with 00,01,02, etc. This numbering will put it in a sequence you want in a text File.

One more Thing I took care of is, suppose you are writing to text file, and other application comes to pick up the file. So, I have moved the file to temp location and once Schedule task is complete, then move to final location.

In Schedule task I have created five attributes.
 
FilePath (Temporary Location)
File Location(Final Location)
Look-up name
File Name
Process Form name (Table Name)

This is the dynamic one, which can be used for any process form in OIM and then push it in a text File or From any table and push it in a text File.

Thanks

Tuesday, June 15, 2010

User from the Approver Group Submits the Request (OIM)

Hi All,
             You designed a workflow for the request.

Generally a request is submitted by a user /manager  to get access to a particulate resource.Then request goes to higher approval group for approval.

Consider, a user from higher approval group submits the request for a particular user it goes  for approval to second user in that group by default as first person in that group is submitting the request. If you are sending email notifications, you will need to build a custom code to send email notification to second user for approving the request if higher priority user submits the request. Custom Java code needs to be implemented for this scenario in OIM.
I have implemented this requirement .Please put your comments if you need any help related to similar scenario.

Thanks

Email Notification on Field Update to a Particular Group(OIM)

Hi All,
            One more Scenario which I implemented recently :

If any fields are updated in OIM(oracle Identity Manager) a mail should go to administrator group with the old value and new value of that fields. It was dynamic , you can add any field in future if you want and you can delete any field too.

Email were sent only to specific users with special roles ( A lookup was created in OIM and if any user has any one or more roles from those  7 roles and any extra roles which is not in that list) a mail will go to that user who is considered as a Special user.(Privileged user).


One more lookup was created in OIM for attributes which should go in email ( Any attributes which are present in this lookup are updated from OIM) .Old and new values of those attributes will go in the mail. It was dynamic you can add any attribute in this lookup and it will go in the mail.

One more thing which I took care of is Whenever a new user is created a mail should not go as old value will be blank.

Please let me know if you are implementing any similar scenario and need help.Post the comment with your email address and I will get back to you.

Monday, June 14, 2010

Email Notification and Re-Assignment of the Task( Escalation)(OIM)

Hi All,
           Last week, There was a new requirement which was  quite Tedious and complex.

Scenario : A request is submitted by a user. Request goes to User Manager .User's manager approves the request.

After Manager approval - there were two more Level of Approvals.

1. Higher Manager Approval
2. Administrator Approval

After Manager approves the request, the request goes to the Highest priority User in the group "Higher manager Approval  ". If he doesn't reply for 3 days, then

1. Email Notification should go to second user in that group and task should be reassigned to him(Second User in that group).(Schedule task was written to acheive this)
Similarly, for the Administartor Approval group was done.

In the email notifications all the details were provided like who submitted the request, for who request was raised, for which resource, details of creation of request etc.

If you need any help in escalation for approval task.Please reply to this post with your email.I can help you with the code.



Thanks

Tuesday, April 20, 2010

How to insert the Request Details link in OOTB Email Notification

Hi All,
        
Scenario :  User submits the request for the access to the application. Requests goes to Manager/Administrator in email and you want to insert the request link in the email  so they can directly open it.

It can be done in following way. SSO needs to be enable to use this.

To be used in Email Template is

http://example.oracle.com:8080/xlWebApp/requestDetail.do?startIndexOfPage=1&searchResults.sortColumn=&backToListCode=BACKTO_APPROVALSSEARCHRESULTS_SELF&entityKey=&method=requestDetail&userAction=new&refreshData=false

Thanks to Ramesh.I came to know this from him.

Monday, March 29, 2010

OIM Description Field Change

Today, I came up with a unique requirement,

We wanted to change the description field with Userid when a user is provisioned or disabled from the key.

For Example,





Here Change Description from key to Username.

Steps:

1. Go to Process Definition.
2. Click Map Descriptive Field
3. Click on User Login
4. Save
5. Done.




After changing the output will be like this,




This case is useful when a user is disabled and user’s last name gets changed then Userid changes then we can keep track of resources for old user id and new user id.


Wednesday, March 24, 2010

Email Notification when a User is Created in OIM

import java.util.Properties;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

public class JavaMail
{


public void sendEMail(String firstName,String emailId,String userPassword)
{


try
{

StringBuffer stringBuffer=new StringBuffer();

Properties prop=System.getProperties();
prop.setProperty("mail.smtp.host","xyz.wmv.abc");
Session session=Session.getDefaultInstance(prop);
MimeMessage message=new MimeMessage(session);

stringBuffer.append("Hi, "+firstName);
stringBuffer.append("

Thank you for registering! We are pleased to welcome you to Test Mail.

");
stringBuffer.append("

To start using Test Page right now, please go to http://testoim:8080/xlWebApp/ and login using the following information:

");
stringBuffer.append("

Login: "+emailId+"
");
stringBuffer.append("Password: "+userPassword+"

");
stringBuffer.append("

If you have any difficulties logging into Test, please reply to this email with a description of what you are encountering and we will respond back as soon as possible.

");
stringBuffer.append("

Thank you,

");
stringBuffer.append("

Test Company
");
stringBuffer.append("Test Administration

");

//From Email Address goes here...
message.setFrom(new InternetAddress("oimadmin@test.com"));

//To Email Address goes here..
message.addRecipient(Message.RecipientType.TO,new InternetAddress(emailId));
message.setSubject("***Welcome to Test! You are registered.***");
message.setContent(stringBuffer.toString(),"text/html; charset=UTF-8");
Transport.send(message);

}
catch(MessagingException e)
{
e.printStackTrace();
}

}



}

Steps :

1. Create a jar file from this code by changing the host name in the code.
2. Create the adapter in OIM and put it as a dependant on successful user creation and mail will go to the user from oimadmin@test.com with his userid and password.

Please mail me if you have any questions.

Thanks

Wednesday, March 10, 2010

java.lang.RuntimeException: Could not find the OffLine WLST class

Hi All,
I was doing installation of Oracle identity Manager 9.1.0.1 on Weblogic 10.3.0.0 Clustering environment.I came across a issue related to WLST offline class error.

oracle/oim/xellerate/setup/setup.xml:443: The following error occurred while executing this line:
/oracle/oim/xellerate/setup/weblogic-setup.xml:196: java.lang.RuntimeException: Could not find the OffLine WLST class
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)


I tried different things like
1.checking all paths are set correct JAVA_HOME,BEA_HOME.
2.Checking version of Weblogic
3. ./wlst.sh
4. java weblogic.WLST and many other approach.Final solution is listed below :


Solution :
There is an existing Bug 8431390 - WLST NOT WORKING IF WE USE NON-DEFAULT INSTALLATION (WL_HOME OUTSIDE BEA_HOME)

As per this bug, the issue can be reproduced as follows:

Steps to reproduce:
1. Install WLS 10.3GA (essex) kit in a non-default fashion (WL_HOME outside
BEA_HOME)
2. Go to ur $WL_HOME/common/bin directory and execute wlst.cmd
3. It exits with the following exception:
java.lang.RuntimeException:could not find the OffLine WLST class

I have set up the same-way that's why.

Tuesday, March 9, 2010

OIM-Approval Workflows

Hi All,
I came through this scenario.
Scenario : A request is submitted by the Requester or User to get access through OIM. Once the request is submitted by the user, either user/Manager/Higher Administrator should be able to approve the request untill manager does not approve the request.Once the request is approved by manager,no one should be able to edit the request.

Steps and JAVA Code :

Assumption: Approval with multi-level approvals already exists for the Resource XXX.
1. Create a jar from the below code and place it into OIM_HOME/xellerate/JavaTasks
a. Import XML TaskAdapter.xml(Email me if you need this file)(Creation of Adapters)
2. Modify the Object Form (Design Console -> Development Tools -> Form Designer).
a. Add two String type fields into it and specify any :
i. Response
ii. RequestId
b. Make these two fields hidden from “Properties” Tab
c. Add any other fields as per requirement.
3. Modify the Approval Process for “XXX Resource Object”.
a. Create Task Named as “Update Request Id”
i. Attach adpCopyValue adapter and do the mapping as follows:
1. Input -> Request Info -> Request Id
2. Adapter Return Value -> Object Data -> RequestId
4. Go To Data Object Manager in Design Console and Search for Resource Object Form for Resource XXX.
a. In Pre-Update -> Assign -> adpRequestPermission adapter.
b. Do the mapping as follows:
i. ReqId -> Entity Field -> ResquestId (Field name will be as created in 2.a.ii)
ii. Adapter Return Value -> Entity Field -> Response (Field name will be as created in 2.a.i)
5. Error Message is “ADAPTER.PERMISSION.ERROR”. You can change the description of the error as per requirement. (Design Conole -> Development Tools -> Error Message Definition and search for “ADAPTER.PERMISSION.ERROR” as code key)



JAVA CODE :


package com.requestmodify.adapter;

import java.util.HashMap;
import java.util.Hashtable;
import Thor.API.tcResultSet;
import Thor.API.tcUtilityFactory;
import Thor.API.Operations.tcRequestOperationsIntf;
import Thor.API.Operations.tcUserOperationsIntf;
import com.thortech.util.logging.Logger;
import com.thortech.xl.crypto.tcCryptoUtil;
import com.thortech.xl.crypto.tcSignatureMessage;
import com.thortech.xl.util.config.ConfigurationClient;



public class RequestModifyPermisions {
public static Logger logger = Logger.getLogger("UPDATE.LOGGERS");
String response = null;
HashMap requestAssignMap = new HashMap();
HashMap requestMap = new HashMap();
HashMap userMap = new HashMap();
int countRequestAssignedToUser;
long managerKey;

ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
final Hashtable env = config.getAllSettings();

public String modifyRequest(String reqId) {
logger.debug("reqId :: " + reqId);
try {
tcSignatureMessage moSignature = tcCryptoUtil.sign("xelsysadm","PrivateKey");
tcUtilityFactory utilityFactory = new tcUtilityFactory(env, moSignature);
tcRequestOperationsIntf requestIntf = (tcRequestOperationsIntf)utilityFactory.getUtility("Thor.API.Operations.tcRequestOperationsIntf");
requestMap.put("Requests.Request ID", reqId);
tcResultSet requestResultSet = requestIntf.getRequestTargets(Long.parseLong(reqId));
requestResultSet.goToRow(0);
String targetUser = requestResultSet.getStringValue("Users.User ID");
logger.debug("targetUser :: " + targetUser);
userMap.put("Users.User ID", targetUser);
tcUserOperationsIntf userOperationsIntf = (tcUserOperationsIntf)utilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
tcResultSet findUserSet = userOperationsIntf.findAllUsers(userMap);
findUserSet.goToRow(0);
managerKey = findUserSet.getLongValue("Users.Manager Key");
logger.debug("managerKey :: " + managerKey);
tcResultSet requestAssignedToUser = requestIntf.getApprovalTasksAssignedToUser(managerKey, requestMap);
countRequestAssignedToUser = requestAssignedToUser.getRowCount();
logger.debug("countRequestAssignedToUser :: " + countRequestAssignedToUser);
if(countRequestAssignedToUser == 1 ){
response = "SUCCESS";
} else {
response = "FAILURE";
}
} catch (Exception e) {
logger.error("Exceprion in modifyRequest :: ", e);
}
logger.debug("response :: " + response);
return response;
}
}