Script

Automatically set data to contract

I have a process which has a gateway, in one way I want to set data to a list property automatically (the data will always be the same).

For example, let's say I have a business object with an array of strings called "names", when I reach one specific task I want to automtically set names to something like ['George','Michael'] and then finish the task, the user does not even realize this task was completed.

How can I achieve this?

How using bonita user-defined function

I have create a test function but is not present in Groovy Script user-defined List :

package com.company.script

public class MesScripts {

public static String test() {
return "test"
}

}

Can you help me ?

Thanks

Decision table

Hello,
I asking about the possibility of making script lines in the decision table for making a transition or it is only a comparison test?
if yes, can I, in the groovy script, make controls on information of organisation actors (country, job,..) and also access to data in MySQL database?

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 http://community.bonitasoft.com/project/file-upload-and-download-process...)
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.

Reagards
Mauro

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.

Notifications