Skip to Main Content

Security Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OIM API - Request creation

861395Sep 28 2011 — edited Sep 29 2011
Hi. I need some help writing some aPI code to request the revoke of an object from an user.

Here is my code as it is right now.

reqHash.clear();
reqHash.put("Requests.Object Request Type", "Revoke");
reqHash.put("Requests.Target Type", "U");
reqHash.put("Requests.Type", "U");
reqHash.put("Process Instance.Key", Long.toString(priKey));

reqKey = reqOps.createRequest(reqHash);
reqOps.addRequestUser(reqKey, usrKey);
reqOps.addRequestObject(reqKey, objKey,false); -> here it fails but i checked for objKey and is seems to be correct

reqOps.completeRequestCreation(reqKey);
-----------------------------


The error on log:
ERROR,28 sep 2011 18:22:10,403,[XELLERATE.SERVER],Class/Method: tcScheduleItem/getMilestoneInfo Error : ScheduleItem has No Milestone.
ERROR,28 sep 2011 18:22:10,408,[XELLERATE.ADAPTERS],Class/Method: tcRuleEvaluator/findTaskAssignmentRule encounter some problems: For input string: ""
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:431)
at java.lang.Long.parseLong(Long.java:468)
.
.
.
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
ERROR,28 sep 2011 18:22:10,410,[XELLERATE.SERVER],Class/Method: tcDataObj/save Error :Insertion of dataobject into database failed
ERROR,28 sep 2011 18:22:10,416,[XELLERATE.SERVER],Class/Method: tcDataObj/save Error :Insertion of dataobject into database failed
ERROR,28 sep 2011 18:22:10,417,[XELLERATE.REQUESTS],Class/Method: tcRequestOperationsBean/addRequestObject encounter some problems: Encountered Errors while saving record
Thor.API.Exceptions.tcAPIException: Encountered Errors while saving record

-------------------


And this is the info of the object i want to revoke from the user. Resultset of tcUserOperationsIntf -> getObjects:

Users-Object Instance For User.Key=12433
Requests.Key=1636
Users-Object Instance For User.Offlined Date=
Users-Object Instance For User.Offlined Action=
Object Instance.Key=162789
Object Instance.Status=Approved
Objects.Key=205 -------------------------------------------> objKey on my code
Objects.Name=Grupo de Aplicacion
Process Instance.Key=256771 --------------------------------> priKey on my code
Process Instance.Create=2011-09-28
Process Instance.Update Date=2011-09-28
Process Instance.Status=C
Process Instance.Descriptive Data=SGP_014_CRC_Madrid
Process Instance.Tasks Archived=
Objects.Object Status.Status=Provisioned
Objects.Object Form Key=269
Object Instance.Object Form Entries=1
Objects.Object Form Name=UD_GRPO
Process.Process Definition.Process Form Key=268
Process Instance.Process Form Entries=1
Process.Process Definition.Process Form Name=UD_GRPP
Users-Object Instance For User.Service Account Flag=0



Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 27 2011
Added on Sep 28 2011
2 comments
417 views