How to remove a certain item from BDM through a script in Groovy?
I can access my BDM Logs but I can not delete them, how can I do this?
I’m getting the data from my PostgreSQL database and saving in my BDM to be able to display this data in a table in my UI Designer, that’s fine, but I do not want the same information to be added twice in BDM, for that reason I created this script that checks if the information that is being fetched from my external database is no longer added in BDM
`def transportadoraNova =
transportadoraNova.clear();
for (TransportadoraPostgreSQL transportadorasBDM : transportadorasBanco){
for(TransportadoraPostgreSQL transportadoraAVerificar : listaTransportadoras){
if (transportadorasBDM.getCodigo().toString().equals(transportadoraAVerificar.getCodigo().toString()) && transportadoraAVerificar.getCodigo() != 0){
transportadoraAVerificar.setCodigo(0)
transportadoraAVerificar.setNome(“NULL”)
transportadoraAVerificar.setStatus(“NULL”)
transportadoraNova.add(transportadorasBDM.getPersistenceId())
//logger.info(transportadorasBDM.getPersistenceId().toString())
//logger.info(transportadoraAVerificar.getPersistenceId().toString())
}
}
}
logger.info(transportadoraNova.toArray().toString())`
But I can not delete repeated information from BDM, how can I do this?