Update bdm variable in a groovy script (not Operation)

Hello,

I'm trying to update a variable of my bdm. Specifically, it is a multiple field, and what I need to do is add a value to its list of values.

If I do it through the "Operations" options, it is added correctly:

bdm.addToConsultes -- afegirResposta

Where the script afegirResposta is:

LlocDeTreballInfoAdicional lldta = new LlocDeTreballInfoAdicional();

lldta.setTipus("UTIC-SOL2");
lldta.setText("THE TEXT GOES HERE");

return lldta;


I have the problem if I try to do the same thing in the "Connectors in" section, using a groovy script:


LlocDeTreballInfoAdicional lldta = new LlocDeTreballInfoAdicional();

lldta.setTipus("UTIC-SOL1");
lldta.setText("THE TEXT GOES HERE");

bdm_llocdetreball.addToConsultes(lldta);

 

If I do it this way, it doesn't add anything. It doesn't give any error, but it doesn't work.

What is the problem ?. Maybe an error concept ?

Thank you very much for your responses:

Carlos Castillo

Hi Carlos,

Using operation to update BDM is the right way to do.

If you try to use a groovy script connector, this will under the hood use a distinct class loader, and will require you to reload data to ensure data integrity, especially when a multiple business data main contains existing and new values

Regards,

Laurent