There is a new bug 21171801 that I requested to be created. This bug has likely been with OIM for some time and is in all versions I can find.
The bug was first reported in 2013. Here is the issue: when attempting to update the group name of a lookup using the API, the write fails. Very few people read or write lookups using the API. I have written a schedule task to back up and restore lookups.
The bug is in the name of the Field lookup called Lookup Definition.Group which translates to LKU_TYPE_GROUP. If you query the LKU table for the field lookups you will see that each field lookup translates to a table field name in the database. There is no LKU_TYPE_GROUP in the database, it is called LKU_GROUP.
Field lookups cannot be exported, imported, or modified in the Design Console. The only fix to this is the following command executed as the OIM schema owner:
SQL> UPDATE LKU SET LKU_FIELD='LKU_GROUP' WHERE
2 LKU_TYPE_STRING_KEY='Lookup Definition.Group';
SQL> COMMIT;
I constructed this update query this way to prevent someone from accidentally forgetting the second line. This change has no effect on imports, exports, or editing of the Lookups including updating the lookup group name of any lookup. This translation appears to only be used by the API and does not appear to be used by the Design Console or Nexaweb, both of which are supposedly connected via the EJBs directly to the database.
I will update this blog when a patch for this bug is released.
Thanks for viewing my blog on Identity Management and Engineering (mostly IDM). Please follow and check out the advertisers.
Search This Blog
Showing posts with label Lookup. Show all posts
Showing posts with label Lookup. Show all posts
Wednesday, June 3, 2015
Tuesday, February 18, 2014
OIM11gR2 Using the old Thor interfaces
Sometimes you need to use the old Thor interfaces for getting information from the system. Lookups are one of these items, and that will be the example used here.
Also see my other posting OIM How to pull an IT Resource Parameter
Import the resource:
import Thor.API.Operations.tcLookupOperationsIntf;
Define the interface (spell something differently, in this case I used lower case L in lookup):
tcLookupOperationsIntf tclookupOperationsIntf =null;
Get the service:
tclookupOperationsintf = Platform.getService(tcLookupOperationsIntf.class);
Optionally you can do this all in one line. You should null check the returned value.
Here's a completed task that just checks to see if a value is in a list:
Thor.API.tcResultSet rs=null;
try {
rs=tclookupOperationsIntf.getLookupValues(validAccountLookup);
int rowcount=rs.getRowCount();
for (int irow=0; irow < rowcount; ++irow) {
rs.goToRow(irow);
String codeKey=rs.getStringValue
("Lookup Definition.Lookup Code Information.Code Key");
String decode=rs.getStringValue
("Lookup Definition.Lookup Code Information.Decode");
if (appInstanceName.equals(codeKey)) {
logger.logp(Level.FINE, getClass().getName(), methodName,
"Found "+appInstanceName+" in row "+irow+", returning true");
return true;
}
}
}
I left out all of the checks and catches, just showing functional code.
Also see my other posting OIM How to pull an IT Resource Parameter
Import the resource:
import Thor.API.Operations.tcLookupOperationsIntf;
Define the interface (spell something differently, in this case I used lower case L in lookup):
tcLookupOperationsIntf tclookupOperationsIntf =null;
Get the service:
tclookupOperationsintf = Platform.getService(tcLookupOperationsIntf.class);
Optionally you can do this all in one line. You should null check the returned value.
Here's a completed task that just checks to see if a value is in a list:
Thor.API.tcResultSet rs=null;
try {
rs=tclookupOperationsIntf.getLookupValues(validAccountLookup);
int rowcount=rs.getRowCount();
for (int irow=0; irow < rowcount; ++irow) {
rs.goToRow(irow);
String codeKey=rs.getStringValue
("Lookup Definition.Lookup Code Information.Code Key");
String decode=rs.getStringValue
("Lookup Definition.Lookup Code Information.Decode");
if (appInstanceName.equals(codeKey)) {
logger.logp(Level.FINE, getClass().getName(), methodName,
"Found "+appInstanceName+" in row "+irow+", returning true");
return true;
}
}
}
I left out all of the checks and catches, just showing functional code.
Subscribe to:
Posts (Atom)