From d2f2a5c8a942ec259f2f38cf8eb8637166aeedce Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 27 Feb 2026 15:07:56 +0100 Subject: [PATCH] add: elixFormsAPI check richiedente DSAN --- .../Nuovo check richiedente DSAN.yml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml new file mode 100644 index 0000000..260220e --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml @@ -0,0 +1,88 @@ +info: + name: Nuovo check richiedente DSAN + type: http + seq: 19 + +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: "24281" + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n", + "codiciFiscaliAmmessi": ";MMMPPL74T17E463A;" + } + } + auth: inherit + +runtime: + scripts: + - type: before-request + code: |- + // Copy-pasta your EFTL document below inside the template literals (`) + var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw` + [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] + [VAR name="checkUtentePartecipante" type="string"][% utentePartecipante = "Il richiedente non è ammesso alla compilazione perché non partecipa alle ripartizioni"; %][/VAR] + [VAR name="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="richiedentePropostaCF" type="string"][TAG]GETVALUEBYTAG,PROPOSTA_RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="coppieRipartizioniProposta" type="string"][TAG]GETVALUEBYTAG,COPPIE_RIPARTIZIONI,REQUEST,IUQOID,CONCAT,#[/TAG][/VAR] + [VAR name="exitIf" type="boolean"][% exitIf = false; %][/VAR] + + [!-- Il richiedente non deve essere il RS che ha presentato la Proposta --] + [!-- Il richiedente deve comparire fra le ripartizioni --] + [!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --] + [IF] + [CONDITION][IS_EMPTY varname="richiedenteCF" /][/CONDITION] + [THEN][% checkUtentePartecipante = "Nessun richiedente trovato"; exitIf = true; %][/THEN] + [/IF] + + [IF] + [CONDITION][% exitIf == false %][/CONDITION] + [THEN] + [IF] + [CONDITION][% richiedenteCF == richiedentePropostaCF %][/CONDITION] + [THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente della Proposta non deve compilare la DSAN"; exitIf = true; %][/THEN] + [/IF] + [/THEN] + [/IF] + + [IF] + [CONDITION][% exitIf == false %][/CONDITION] + [THEN] + [IF] + [CONDITION][CONTAINS varname="coppieRipartizioniProposta"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION] + [THEN][% checkUtentePartecipante = "trovato in coppie"; exitIf = true; %][/THEN] + [/IF] + [/THEN] + [/IF] + + [IF] + [CONDITION][% exitIf == false %][/CONDITION] + [THEN] + [IF] + [CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION] + [THEN][% checkUtentePartecipante = "trovato in CF ammessi"; exitIf = true; %][/THEN] + [/IF] + [/THEN] + [/IF] + + [%= checkUtentePartecipante %] + [/EFTL] + `)); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5