info: name: Codice fiscale ammesso type: http seq: 2 http: method: POST url: "{{elixFormsApiUrl}}/eftl/process/v1" headers: - name: x-requested-with value: XMLHttpRequest - name: x-api-key value: "{{elixFormsWsAuthenticationToken}}" - name: x-ef-request-id value: "22224" body: type: json data: |- { "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script "userContext": { "lang": "IT", "codiciFiscaliAmmessi": ";MMMPPL74T17E463A;;" } } auth: inherit runtime: scripts: - type: before-request code: |- // Copy-pasta your EFTL document below inside the template literals (`) var eftlDocumentToBeProcessed = String.raw` [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] [VAR name="isRichiedenteInRS" type="string"][% isRichiedenteInRS = "Utente non ammesso alla compilazione perché non RS del contratto!"; %][/VAR] [VAR name="responsabiliScientifici" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR] [VAR name="codiceFiscaleUtente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] [VAR name="codiceFiscaleUtenteDebug" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] [% codiceFiscaleUtente = ", CF: " + codiceFiscaleUtente + " "; %] [IF] [CONDITION][CONTAINS varname="responsabiliScientifici"][VALUE_OF varname="codiceFiscaleUtente" /][/CONTAINS][/CONDITION] [THEN][% isRichiedenteInRS = ""; %][/THEN] [ELSE IF] [CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="codiceFiscaleUtenteDebug" /][/CONTAINS][/CONDITION] [THEN][% isRichiedenteInRS = ""; %][/THEN] [/ELSE IF] [/IF] [%= isRichiedenteInRS %] [/EFTL] `; var base64EncodedDocument = btoa(eftlDocumentToBeProcessed); bru.setVar("elixBase64EftlDocument", base64EncodedDocument); settings: encodeUrl: true timeout: 0 followRedirects: true maxRedirects: 5