Hello,
It's depends of the BDM architecture.
What you have to know is:
* you can't assign anything in a groovy script. A groovy script is here to calculated a value, not to realize operation (technicaly speaking, the execution of a Groovy Script does not start by a "Begin transaction" and finish by a "Commit" ==> That's depend the Bonita Version, but it's definitively not the spirit of the product
* use OPERATION or "Output of connector" to realise that.
Saying that, solution will show up more easy.
So, in your process, you should have 2 Business Variables : oml_O21 and "adt_A04" isn't ?
What about "oml_O21.msgContent : it's another BDM isn't ? Is the msg_content link in the oml_O21 by a COMPOSITION or by a AGGREGATION?
And the pv1 must be AN AGGREGATION (can't be a composition, you reference it in oml_21 and in adt_04)
COMPOSITION : msgContent is "part of oml_21", so the modification is on oml_21.
Use an operation, saying "OML_21" as modification, click on expression, and choose "setmsg_content"
In the groovy script, do something like
var msgContentVar = OLM_21.getMsgContent();
msgContentVar.pv1 = adt_A04.msg_content.pv1
AGGREGATION
Then you must have a variable named "msg_Content"
so, do a first operation
MsgContent / setpv1 / groovy : "return adt_A04.msg_content.pv1"
Second operation (not needed if msgContent is already linked)
OML_21 / setMsgContent / variable: MsgContent
Hope this is clear