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:

` import org.bonitasoft.engine.bpm.process.ProcessInstance;
import com.bonitasoft.engine.api.ProcessAPI;
import com.training.model.VacationRequest;
// Create a new instance of the VacationRequest Java class
VacationRequest vr = new VacationRequest();
// Get the start date from the contract input (a Map that map
// together BMD attribute names and values) and use it to set
// the attribute value of the Java object
vr.setStartDate(vacationRequestContract.get(“startDate”));
vr.setReturnDate(vacationRequestContract.get(“returnDate”));
// Get the id of the user who initiate the process using Engine API and variable “processInstanceId”
ProcessAPI processAPI = apiAccessor.getProcessAPI();
ProcessInstance processInstance = processAPI.getProcessInstance(processInstanceId);
long startedByUserId = processInstance.getStartedBy();
vr.setRequesterId(startedByUserId);
// Return the new Java object that will be used to initialize
// the business data variable
return vr;

`