Access DAO object in Constraint script

Hello All,

It seems it's not possible to access DAO objects in a Constraint validation script. For instance, when I try to validate using objectDAO.findByCode(input.myCode, 0, 1), I get the following error:

objectDAO is neither defined in the script nor in dependencies.

Is it so or am I doing something wrong? And if so, what alternative is feasible to validate input data against BDM (database) values?

Thank you in advance.

Remove item from BDM

How to remove a certain item from BDM through a script in Groovy?
I can access my BDM Logs but I can not delete them, how can I do this?

I'm getting the data from my PostgreSQL database and saving in my BDM to be able to display this data in a table in my UI Designer, that's fine, but I do not want the same information to be added twice in BDM, for that reason I created this script that checks if the information that is being fetched from my external database is no longer added in BDM

contentMimeType becomes null when Document is updated

I've created a document under Data and I am able to add and delete the files (I followed the example in
When the following script is run in Operations to update an attached Document, the contentMimeType gets updated from application/pdf to null.

Using a groovy script in a groovy custom page?

I have a grrovy script "MyUtil.groovy" written using the "Development->Manage Groovy Scripts" menu option in the studio and use it extensively in various connectors, operations etc in my process.

However I'd now like to use it in groovy custom page as well, but cant get it to work.

"import MyUtil;" says it cant resolve.

And any attempt to use MyUtil.myFunction(...) in the page code also reports that there is no variable called "MyUtil".

I presume this is a class path issue, but cant work out how to tell the page code to use the script.

Any clues?

using PDFBox.jar in a groovy script

Hi, I need to take data of a PDF file, for that i want to use PDFbox. I imported the .jar via developement-> manage jars -> import. But when I want to code the sript, i cant import the libraries. So I want to know if there is anithing else i should do to be able to use this library.


Problemas al mostrar un Widget personalizado con una tabla, no muestra valores

Hola a todos,
Soy nuevo en Bonita 7.2, y estoy topando con problemas para mostrar los valores obtenidos en un Widget de tabla personalizada desde base de datos MySql, cualquier ayuda será agradecida.

I can't populate or display data from My Sql DB in a Custom Widget Table(JSON)

Hi all

I am a newbie at Bonita 7.2, struggling with displaying values, retrieved from a My SQL DB, in a custom table Widget. I need a little help, please.

Extraer y procesar contenido de un PDF

Buenos días,

Tengo varios días investigando y desarrollando algún script que me permita extraer información de un pdf cargado por el usuario el cual almaceno en una variable "Document" desde Bonita BPM, mapeando un contrato con dicha variable, sin embargo, no he logrado acceder al contenido de dicho documento, puesto que necesito validar la información del mismo para tomar decisiones.

¿Alguien ha logrado hacer esto?

Gracias de antemano,
Isaac Herrera.

postgresql bonitasql connection

I've moved on - using postgres, stock, in a new, clean 7.2.2 studio

script looks like this:

import groovy.sql.Sql;

def result=[];

Sql sql = BonitaSql.newInstance("jdbc:postgres://", "bonita_db_user", "bpm", new org.postgresql.Driver());


Trying to do this as simply and straightforward, stock, out-of-the-box as possible.

Problem is:

BONITA 7: Start a process instance from script

Hello, In Bonita 7 I'm trying to create a new instance of a process from a script but I can not. My process (process1) has a service task in which I add a script to launch a new process called "process2" version "1.0". Examples of Bonita's documentation not have all the code and sometimes lack me how to get the current session, other times to get the current users ... please does anyone have a complete example or can help me?

Thank you. Regards,