BDM and Groovy script
I use the following Groovy script to retrieve data stored in the BDM. In the BDM I defined a "business Object" called "Rutas" that has two "attributes", "nombreRuta" and "valor".
The script I use is:
import com.company.model.Rutas List rtSubir = rutasDAO.findByNombreRuta("rutaSubir",0,100) return rtSubir
But I fails. I think that left me something, but I can not to find out what it is.
Any suggestions?. Thank you.
What does your log say?
Also, where are you using the output of this script?
Is it in an operation bound to a BDM object?
Using a DAO in a connector is not supported as:
- accessing a DAO requires the use of a DB transaction
- for performance reasons connectors are executed outside of transactions
We will update our documentation to be clearer on that limitation.
In order to bypass this limitation, you should use an operation to execute your Groovy script with the DAO calls.
Is there any other way wherein i can get the value of data in bdm. My purpose is to create a sequential number per company.