# groovy conectors, problem accesing bdm data

**URL:** <https://community.ofelia.com/t/groovy-conectors-problem-accesing-bdm-data/7247>\
**Category:** Q&A\
**Created:** [22 April 2016 15:38 UTC](https://community.ofelia.com/t/groovy-conectors-problem-accesing-bdm-data/7247 "2016-04-22T15:38:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![msevillano](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@msevillano](https://community.ofelia.com/u/msevillano)\
**Post date:** [22 April 2016 15:38 UTC](https://community.ofelia.com/t/groovy-conectors-problem-accesing-bdm-data/7247/1 "2016-04-22T15:38:32Z")

</div>

Greetings, Im having troubles with the bonita MicrosoftSQL server2008 conector. I need to make a query that depends on the data stored on the bdm. The exact problem is I can’t access the bdm data from the groovy script witch is creating th query

thanks a lot for the help

Mauro

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [25 April 2016 13:59 UTC](https://community.ofelia.com/t/groovy-conectors-problem-accesing-bdm-data/7247/2 "2016-04-25T13:59:36Z")

</div>

Hi, this is not possible. The answer is in **documentation** :

> “In a connector, code is executed outside a transaction, so retrieving or updating business data by DAO is not supported. Manipulate the business data outside the connector, and use business objects as connector input or output”

Regards,

Marcos Vinícius Pinto  
MXM Sistemas

---

<div class="post-metadata">

**Author:** ![cldrzdz](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@cldrzdz](https://community.ofelia.com/u/cldrzdz)\
**Post date:** [30 April 2016 23:35 UTC](https://community.ofelia.com/t/groovy-conectors-problem-accesing-bdm-data/7247/3 "2016-04-30T23:35:58Z")

</div>

You can use a GString variable in groovy to replace values in dbm, try something like that:

GString myGStringSql = “”"  
select \*  
from MyDatabase.MyTable  
where SomeColum=${myBdmData.getMyBdmFieldName()}  
“”";

return myGStringSql.toString();

In your data base connector you need to “Switch Editor” to have the posibility to use the groovy scrip to construct the SQL string.
