SaveObject() and CommitTransaction() Not Updating the all rows in SailPoint Tables

Hi,

I have a requirement where I have to read data from one of the our sailpoint table [ client load this file on weekly basis]. i have to create each entry as “Application” object and save it as an row in spt_application table;

i execute the below rule to read data from that table and create Application entry and to be updated in Application table.

  1. now we have few entries already present in spt_application table. I have to update few columns for those existing entries. when i read and try to save the values in existing App object, it is not getting stored. code i am attaching here.

Connection conn = DriverManager.getConnection(dbURL, user, pass);

if(conn!=null)
{
String sqlQue= “SELECT * FROM [identityiq].[identityiq].[ApplicationMetadata]”;
PreparedStatement statement = conn.prepareStatement(sqlQue);
ResultSet resultSet = statement.executeQuery();

while(resultSet.next())
{
String appName =resultSet.getString(“ApplicationAltName”)== null ? “” : resultSet.getString(“ApplicationAltName”).toString();
String SystemEndpointID = resultSet.getString(“ApplicationRawName”)== null ? “” : resultSet.getString(“ApplicationRawName”).toString();
—reading all columns from that table and storing it as strign object.

Application app = context.getObjectById(Application.class, appID);

if(null != app)
{
appList = appList + SystemEndpointID + " **** " + appName + “\n”;

if(null != id)
app.setOwner(id);

app.addDescription(“en_US”,LongDescription);
HashMap appAttr = new HashMap();
appAttr = app.getAttributes();

appAttr.put(“AccessAdministrator”,AccessAdministrator);
appAttr.put(“eTLType”,ETLType);
appAttr.put(“fusionID”,FusionID);
appAttr.put(“LongDescription”,LongDescription);

app.setAttributes(appAttr);
context.saveObject(app);
context.commitTransaction();
context.decache(app);

}}}

this is sample code snippet. when i run the rule it updates only 2 rows in Application table. when i change the sql query with some order by options, it updates 85 rows. but unfortunately we have 1000+ records in our client table. if i comment out commitTransation(), rule reads all rows from client table but not updating any data in application table as we commented out commit statement. I i keep that commit statement,it updates only 2 rows in application table.

Please help.