Hello,
I’m using Bonita 7.3.
I have created the following BDM:
-
Notificacion (BDM Object)
- codigo (String)
- descripcion (String)
- obligatoriedad (BDM Object)
-
Obligatoriedad (BDM Object)
- codigo (String)
- descripcion (String)
At the beginning of the process, I initialize a process var type “Notificacion” from BDM with an operation (with “findbypersistenceid”).
In a second task, I have a form which must retrieve the “Obligatoriedad” field and save it at BDM. For it, I have two form vars:
- “notificacion” that contain the business object ( …/{{context.notificacion_ref.link}} ).
- “tiposObligatoriedad” that contain the available types at BDM to bind with a dropdown ( …/API/bdm/businessData/com.company.model.Obligatoriedad?q=find&p=0&c=10 )
In the form I have used a DropDown with the following configuration:
- Available values: tiposObligatoriedad
- Key shown: descripcion
- Return key: empty to return the entire object
- Value: notificacion.obligatoriedad
The value of “formOutput” var is
return {
‘notificacionInput’: $data.notificacion
};
When I run this process, and select a value from the dropdown, the submit is OK, but when I check the database, I find following error:
Table “Notificacion” (BDM Notificacion)
- PERSISTENCEID = 1
- CODIGO = N5
- DESCRIPCION = “BLABLABLA”
- PERSISTENCEVERSION = 3
- OBLIGATORIEDAD_PID = 5
Table “Obligatoriedad” (BDM Obligatoriedad)
Three records with master data
RECORD 1
- PERSISTENCEID = 1
- CODIGO = OBL
- DESCRIPCION = OBLIGATORIA
- PERSISTENCEVERSION = 0
RECORD 2
- PERSISTENCEID = 2
- CODIGO = VOL
- DESCRIPCION = VOLUNTARIA
- PERSISTENCEVERSION = 0
RECORD 3
- PERSISTENCEID = 3
- CODIGO = NA
- DESCRIPCION = NO APLICA
- PERSISTENCEVERSION = 0
And a fourth record with the selected object at dropdown
RECORD 4
- PERSISTENCEID = 5
- CODIGO = NA
- DESCRIPCION = NO APLICA
- PERSISTENCEVERSION = 3
The problem is, that I need that if I select for example the value “NO APLICA” from the dropdown, BDM don’t create a new record. BDM must set the field “OBLIGATORIEDAD_PID” in “NOTIFICACION” table to the value 3, it is the PERSISTENCEID for the value selected (NO APLICA)
Some help please?