Groovy Script

How to evaluate Timer Script

Hello Community
I have a timer script on each human Task. I need to check if day of the week is Sunday to Thursday. Weekends are Friday and Saturday.

If its weekday then timer should execute at 24 hours. Else if its Friday or Saturday then timer should execute on Sunday. i have the below script.
But I still keep getting escalations on friday and saturday.Please suggest where is my script going wrong.

============================================================================================

Calendar cal = Calendar.getInstance();

Assign list type business variables

Hi;

I have to assign a complex business variable: oml_O21 with another one : adt_A04, in a groovy script, like this:

oml_O21.msg_Content.pv1=adt_A04.msg_Content.pv1; /where Pv1 is an business variable with attributes.

1- Is this assignment correct or do I have to assign each attribute with the one that matches it?

Also I have to assign:

oml_O21.msg_Content.obx=adt_A04.msg_Content.obx; /where obx is a list type business variable with attributes .

2- How can i make this assignment?

thank

Initialiser un variable métier 01 qui contient un autre variable métier 02,

Bonsoir;
Je voudrais initialiser un variable métier 01 qui contient un autre variable métier 02,

Comment je peut initialiser le var 01 en donnant des valeurs aux attributs de var 02.

ci-dessous un Groovy script qui initialise seulement les attributs directs d'un var:

processInstance.getParentInstanceUUID() alternative to Bonita v7.5.4

I am trying to migrate a workflow to v7.5.x. At a groovy script the parent process id is fetched: processInstance.getParentInstanceUUID().
How do I do this on v7.5.4?

Is it something like the above:
* apiAccessor.getProcessAPI().getProcessInstance(processInstanceId).getRootProcessInstanceId()
* apiAccessor.getProcessAPI().getProcessInstance(processInstanceId).getCallerId()

Thank you in advance.

Failed to get information in bdm and used it in operations.

Hi,

I am getting the max value of a certain column in bdm table using custom query with parameter. Then I call the query using DAO and used it in the operations once the manager have approved the task. But when i run the task it always fails. I set the petCashNo to store a new series of pet cash no. Just want to create a petcash series number

This is my custom query

SELECT MAX(p.petCashNo)
FROM PettyCashHeader p
WHERE p.branch = :branch

Return of custom query is single

This is how i call my query in operations

Tengo un error que se muestra en el log y no me permite ejecutar una query desde Groovy Script: sql.executeQuery():GRAVE: Message: Operation not allowed after ResultSet closed

Buenas tardes a todos.
Soy Nuevo en Bonita 7.2, estoy atascado en intentar mostrar los valores en una tabla personalizada desde una base de datos Mysql
Estoy ejecutando un Script groovy desde Bonita 7.2 y obtengo el siguiente error: GRAVE: Message: Operation not allowed after ResultSet closed . Y no entiendo por qué me da este error si no he cerrado el resultSet.

Este es mi GroovyScript:

I have an error in Groovy sql.executeQuery():GRAVE: Message: Operation not allowed after ResultSet closed

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.
I'm executin a groovy script, from Bonita 7.2 and I get an error saying: GRAVE: Message: Operation not allowed after ResultSet closed . I don't understand it because I don't have closed the resultSet.

This is my GroovyScript:

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