import/use connector in boundary timer


I want to use a connector that calculates a duration in order to use it in a boundary timer event. if I use the connector in a task all works as it should, but when I try to import it (using groovy script) in a boundary timer it fails every time, with the following error:

Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
BScript9.groovy: 1: unable to resolve class org.mycompany.connector.DiasUteis
@ line 1, column 1.
import org.mycompany.connector.DiasUteis

here is the script:

import org.mycompany.connector.DiasUteis
def d = new DiasUteis();
return d.calcula_data_milisegundos(12, "CBR")

and here is the beginning of the java class for the connector (the rest are all aux methods used by calcula_data_milisegundos):

package org.mycompany.connector;

public class DiasUteis extends AbstractDiasUteis implements Connector{

static final Long DAY_IN_MILLIS = 86400000L;

protected void executeBusinessLogic() throws ConnectorException {
Long tdl_tempoEmMilisegundos = calcula_data_milisegundos(
getTdl_numeroDiasUteis(), getTds_municipio());

public static long calcula_data_milisegundos(long numero_de_dias_uteis,
String municipio) {
Date dt = null;
Date dtaux = null;
long data_final_milisegundos = 0;
Date data_inicial = new Date();
Date data_util = new Date();


what am I doing wrong? I'm going crazy over this..


Submitted by tcarmo20 on Wed, 01/18/2017 - 13:01


No answers yet.