Hi All,
I am working on the JDBC Provisioning Rule,
In the remove operation I’m trying to iterate the multiple Entitlements and executing the delete statement. But in the target system I am able to see only one Entitlement is deleted, instead of multiple Entitlements deletion.
Here is the code snippet of the remove operation:
String COMMA = ",";
String entName = "";
String[] entArr = ent.split(COMMA);
if("Remove".equals(getAttrReqOpName(account,"ENT_SET_NAME"))) {
log.error("inside remove ***************************************** ");
for (int i= 0; i<entArr.length;i++){
entName = entArr[i];
log.error("inside delete ent------------:"+entName);
log.error("inside delete *****************************************
");
statement = connection.prepareStatement( "delete from
XTPFILDBO.T_TKEO_ENTSET_OPER_XREF where oper_id=? AND ent_set_name = ?");
String oper_id = account.getNativeIdentity();
statement.setString ( 1, oper_id );
statement.setString ( 2, entName);
log.error("inside delete oper_id-------------:" + oper_id);
log.error("inside delete entName------------:"+entName);
log.error("before excuteupdate--------------:");
statement.executeUpdate();
log.error("Afterexcute--------------:");
log.error("inside delete oper_id-------------:" + oper_id);
log.error("inside delete entName------------:"+entName);
log.error("statement--------------:" + statement.toString());
}
result.setStatus( ProvisioningResult.STATUS_COMMITTED );
}
Below is the logs in which I’m able to see the different Entitlements in each iteration.
Please let me know where I am doing wrong.
Kind Regards,
Sai Krishna L