Setting BDM in script connector
How would one normally update the value of a BDM Business Variable within a groovy script connector?
myBusinessVariable.value = "";
but neither seem to work.
Unfortunately I need to update 50+ variables like this, so using Operations is going to take a while to do, especially since each variable is going to need some processing done before being set. Ideally I want to be able to do this in a single script connector.
Your business variable should be a complex type with multiple fields. In the Groovy Script Connector, you should be able to get/set these fields using attributes like I think you suggested:
myBusinessVariable.field1 = "field1value"
If this does not work, you can try to return the businessVariable after edition from the script
and have an output operation to assign this returned value to your business variable as a whole.
Your second solution did the trick. I had the script return an instance of the business variable and assigned the output to the original business variable.
It's odd that the first solution doesn't work. Possible bug?