Send data from automatic task

1
0
-1
Hello, I have two tasks, one automatic and one human.
I also have an attribute that refers to another table and in turn is multiple in the BDM.

I need from the automatic task to create an instance of that attribute and assign some values ​​to it.

My idea is that once it goes through the automatic task, it reaches the human task with the data previously assigned.

This is my code currently (doesn't work for me)

def compraList = []
//For each item collected in multiple input
compra.compras.each{
//Add Compra instance
compraList.add({ currentCompraInput ->
def compraVar= compra.compras.find { it.persistenceId.toString() == currentCompraInput.persistenceId_string} ?: new com.company.model.mantenimiento.Compra()
compraVar.nombre = 'Mantenimiento externo al taller'
compraVar.cantidad = 1
return compraVar
}(it))
}
return compraList

No answers yet.
Notifications