From ded6d25b80c3261f0e918262c453665ca3067b75 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Mon, 20 Apr 2026 15:47:17 +0200 Subject: [PATCH] add EFTL test for riprotocollazione --- ...G per riprotocollazione (integrazione).yml | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 collections/elixForms API v2/EFTL processing/Test vari/TAG per riprotocollazione (integrazione).yml diff --git a/collections/elixForms API v2/EFTL processing/Test vari/TAG per riprotocollazione (integrazione).yml b/collections/elixForms API v2/EFTL processing/Test vari/TAG per riprotocollazione (integrazione).yml new file mode 100644 index 0000000..7098e3f --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/Test vari/TAG per riprotocollazione (integrazione).yml @@ -0,0 +1,77 @@ +info: + name: TAG per riprotocollazione (integrazione) + type: http + seq: 3 + +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: "27399" + - name: x-ef-request-id + value: "27535" + disabled: true + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n" + } + } + auth: inherit + +runtime: + scripts: + - type: before-request + code: |- + const { prepareEftlDocument } = require("./elixFormsJs.js") + // Copy-pasta your EFTL document below inside the template literals (`) + prepareEftlDocument(String.raw` + [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] + [VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR] + [VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR] + + [VAR name="folderSubject" type="string"][% folderSubject = "Richieste di Subappalti e Comunicazioni Subcontratti e Distacchi"; %][/VAR] + [VAR name="subfolderSubject" type="string"][TAG]SCHEMAID,17,COL0013,IUQOID, , ,,yyyy[/TAG][/VAR] + + [VAR name="tipologiaRichiesta" type="string"][TAG]GETVALUEBYTAG,TIPOLOGIA_RICHIESTA,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="impresaAppaltatrice" type="string"][TAG]GETVALUEBYTAG,IMPRESA_APPALTATRICE,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="lavori" type="string"][TAG]GETVALUEBYTAG,RICHIESTA_OGGETTO_LAVORI,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="cig" type="string"][TAG]GETVALUEBYTAG,RICHIESTA_OGGETTO_CIG,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="cup" type="string"][TAG]GETVALUEBYTAG,RICHIESTA_OGGETTO_CUP,REQUEST,IUQOID[/TAG][/VAR] + + [VAR name="riapertureIter" type="iterable"][SPLIT regex="\|" emptyIfBlank="true"][TAG]SCHEMAID,198,COL0001,IUQOID,,|[/TAG][/SPLIT][/VAR] + + Date inoltro prima della riapertura: [TAG]SCHEMAID,198,COL0003,IUQOID,,|[/TAG] + Date conferma prima della riapertura: [TAG]SCHEMAID,198,COL0004,IUQOID,,|[/TAG] + Data ultimo inoltro: [TAG]SCHEMAID,17,COL0013,IUQOID, , [/TAG] + + [VAR name="dataCompletamento" type="string"][TAG]SCHEMAID,17,COL0013,IUQOID, , [/TAG][/VAR] + [VAR name="confermePrecedenti" type="string"][TAG]SCHEMAID,198,COL0004,IUQOID,,|[/TAG][/VAR] + + [VAR name="integrazione"][% integrazione = ""; %][/VAR] + [IF][CONDITION][% confermePrecedenti != "" %][/CONDITION][THEN][% integrazione = " (INTEGRAZIONE del " + dataCompletamento + ")"; %][/THEN][/IF] + + [VAR name="nomeDocumento" type="string"][% nomeDocumento = tipologiaRichiesta + " " + impresaAppaltatrice + " - Commessa: " + lavori + " (CIG: " + cig + " - CUP: " + cup + ")" + integrazione; %][/VAR] + + Nome documento: [%= nomeDocumento %] + IF: [IF][CONDITION][ISEMPTY][TAG]SCHEMAID,198,COL0004,IUQOID,,|[/TAG][/ISEMPTY][/CONDITION][THEN][%= " (INTEGRAZIONE del " + dataCompletamento + ")" %][/THEN][/IF] + + Test: + + [/EFTL] + `); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5