Remove item from BDM

1
0
-1

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?

Comments

Submitted by Sean McP on Sun, 03/05/2017 - 21:34

A Tip on displaying CODE/LOGS correctly in Posts:

Do not use the Supplied Buttons above, for some reason they refuse to work correctly, and despite bringing it to Bonitasofts attention, it's low priority.

To Show Code/Logs correctly use

< code >
your code/log
< /code >

removing the spaces to allow the showing of code/logs correctly as here:

your code/log

You should still be able to edit your post to ensure the correct formatting of the code to help us understand it easier.

Thanks and regards
Seán

No answers yet.
Notifications