Groovy Script

¿Se puede cargar en un único script de Groovy (o conector de Base de Datos) varias consultas y almacenar los resultados y diferentes variables del proceso?¿Cómo?

!Hola buenas a toda la comunidad de Bonita! Estoy empezando con Bonita 7.2, y cualquier ayuda sera agradecida.
El problema que tengo es el siguiente, necesito inicializar varios(20) Select Item desde base de datos, actualmente tengo como diez conectores de BD, uno por cada Select Item, pero supongo que habrá alguna manera de usar un único conector de base de datos y desde este utilizando Groovy Script devolver cada una de las consultas en una variable diferente.

Can I load in a unique Groovy Scrip (or DB Connector) many queries form data base and save this data in many processes variables? How?

Hello to the hole Bonita community, I’m new in Bonita 7.2, any help will be appreciated.
The problem is that I have too many Data Base connectors, and I think should exist a different way of doing this in an optimal way, with only one connector executing multiples queries.

depends on "oPersona" is neither defined in the script nor in dependencies.

def solicitudVar = new com.eninetworks.ordenamiento.Solicitud()
solicitudVar.oSolicitante = {
def oSolicitanteVar = solicitudVar.oSolicitante == null ? new com.eninetworks.ordenamiento.oSolicitante() : solicitudVar.oSolicitante
oSolicitanteVar.oPersona = {
def oPersonaVar = oSolicitanteVar.oPersona == null ? new com.eninetworks.ordenamiento.oPersona() : oSolicitanteVar.oPersona
oPersonaVar.strNombreSolicitante = solicitudInput.oSolicitante.oPersona.strNombreSolicitante

Use process variable in groovy script

Hi everyone,

i want to alter/update a row in my local business data model via an operation. The business object gets the value via a process variable. Normaly i would do it with a custom SQL UPDATE query, but Bonita supports only custom SELECT queries. Is it possible to get the right value with a groovy script? (i never worked with groovy before)

f.e.:
newValue = oldValue - someValue

Every value needed is stored in process variables, but i dont know how to get these variables/values in the groovy script. I would appreciate it if someone could give me a hint :)

communicating between process

Thanks for reading and at least trying to help

I have some difficulties to work with two process.

The first has a task which 'lock' the process while 'things' are not done in the second.

The second do some validation things and then I try to :

  • update business data in the first process
  • end the 'waiting' task
  • make the first process continue to next task regarding the validation done by the second

I try to do this with Apiaccessor in a groovy script

Groovy script that count the number of lines in a files in my process

Hi everyone ,

im trying to count the number of lines in a document in my process . My script is :
//////////////////////////////////////////////////////////////////////////////////
def lines = 0
doc_Integrateur_Enseignes_CSV.eachLine {
lines++
}

////////////////////////////////////////////////////////////////////////////////

BOS Studio 7.0.1 error while creating Validator using Groovy Expression in a Form or Field

Hello, on both 7.0 and 7.0.1 BOS community studio, when trying to create a Validator on a form or a field, using a Groovy expression, the following error occurs:

"An error has occurred. See error log for more details. org.eclipse.ui.part.FileEditorInput cannot be cast to org.eclipse.emf.ecore.EObject"

I've tried the Studio on several machines with the same results. The error does not happen in Studio v6.5.1 Seems like a bug. Java version: 1.8.0_31 Error stack and configuration follows:

unreachable variable for groovy script

Hi.. I am doing a similar script to configure DB. Above is my script.

unreachable variable for groovy script

Hi.. I am doing a similar script to configure DB. Above is my script.

Le groovy script ne peut pas être compiler

Que signifie ce message d'erreur?

Le Groovy script .... ne peut pas être compiler avec l'erreur : Le type java.lang.Object ne peut pas être résolu. Il est référencé indirectement à partir de fchier .class requis. La hiérarchie de type Nothing n'est pas cohérente. Le type java.lang.String ne peut pas être résolu. Il est référencé indirectement à partir de fchier .class requis.

Notifications