I need to save the whole form in an external Data Base(MySql5.5) Bonita 7.2, how can I dot it in a better way?

1
+1
-1

Hello every body!!! I wish some one could help me, I would thank any help.

Now I have make a Groovy script, and I use a jdbc mysql conector, but I have to map field by field to the query that makes the insert, this is a lite bit old school method, it is really tedious and archaic.
I Would like to use Hibernate or JPA as ORM, to make a save or persist of the object, because I have to do it in many tasks, to save diferents Web forms, for an external Application.

This works, but I guess if I can do a external jar that uses hibernate an use this to save the object BPM of my flow or any object?

Here is a part of my source code:

[...]
Sql sql = BonitaSql.newInstance("jdbc:mysql://BBDD/***","BBDD_user","BBDD_pass", new com.mysql.jdbc.Driver());

try {
    String consulta = "INSERT INTO notificaciones (id,descRiesgo,dni_notificante,nombre_notificante,apellidos_notificante,correo_notificante,tipo_notificacion,asunto_notificacion,descripcion_notificacion) 
    VALUES (?,?,?,?,?,?,?,?,?)";

    sql.execute(consulta,null,
    notificacionRiesgo.getDescripcion(),notificacionRiesgo.getDni(), notificacionRiesgo.getNombre(),           

            notificacionRiesgo.getApellidos(),
    notificacionRiesgo.getCorreo(),notificacionRiesgo.getTipo(),
    notificacionRiesgo.getAsunto(),notificacionRiesgo.getDescripcion());    

}

[...]

Thanks

2 answers

1
0
-1

A note for the community is placed for the thick of the things for all society. The skills of the essay writing services review are opened for the terms. The change is wisely informed for the top of the faculty for the attachment for all people.

1
0
-1

Of course, I don't want to use a data base connector with an sql script because I want to have more control and I wnat to to execute some actions before doing the insert.

Notifications