ELFileBody dynamic parameters

Hi everybody,

I would like to use the ELFileBody function of gatling to post dynamic parameters for a specific request.

My request is very simple, just the creation of a new events on a JSON Calendar. But i don’t want to always create the same event.

Is that possible to have dynamic params. I’ve read about it but i don’t really understand how it works with scala.

Here is the scala code

//Validation Form New Event Agenda
.resources(http(“Validation Form Nouveau RDV I Agenda”)
.post(uri1 + “/agenda/ideoFront?controller=rdv.Rdv&webContext=%7B%22clePatien…”)
.headers(headers_6)
.body(RawFileBody(“request14.txt”))))

Here is the request14.txt body

{

“dateDebut”:“2016-07-20T10:30:00Z”,
“professionnelList”:[],
“patientList”:[{“id”:“PAT;LOC;1.2.250.1.192.7.1.18;196”,“debut”:0,“duree”:1800}],
“materielList”:[],
“agendaVirtuelList”:[],
“dateFin”:“2016-07-20T11:00:00Z”,
“etat”:“CFR”,
“groupObjectifList”:[],
“readOnlyRecurrence”:false,
“dureePlage”:1800,
“plagesOn”:false,
“recurrenceOn”:false,
“forcerSurbooking”:false,
“forcerProgrammation”:false,
“forcerCreateRdvInAbs”:false,
“forcerCreateRdvInUrg”:false,
“forcerCreateRdvInPast”:false,
“previousEtat”:“CFR”,
“motifAnnulation”:"",
“motifAnnulationAutre”:"",
“type”:“23b780ca-1c50-4272-9bf9-9d3f7812faa7”,
“modele”:“235a7e12-244b-4486-b975-6a0ac4671097”,
“color”:"#f9ed69",
“forcerCreateRdvNbRessource”:false,
“text”:“Conseil en SI de santé”,
“searchDispo”:false,
“isErrorNbRessource”:false

}

Thanks a lot for your help,

Regards,