From f3d2cea76b66acd67be7bb12b0937b80971622b6 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Thu, 19 Feb 2026 09:39:51 +0100 Subject: [PATCH 1/2] update eftl --- ...olo ripartizione per tipologia persona.yml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml index bdde3c7..6679095 100644 --- a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml @@ -19,6 +19,9 @@ http: disabled: true - name: x-ef-request-id value: "22744" + disabled: true + - name: x-ef-request-id + value: "23258" body: type: json data: |- @@ -37,7 +40,7 @@ runtime: - type: before-request code: |- // Copy-pasta your EFTL document below inside the template literals (`) - var eftlDocumentToBeProcessed = String.raw` + var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw` [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] [VAR name="arrayCFdocenti" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTI_QUALIFICA_DOCENTE,REQUEST,IUQOID[/TAG][/VAR] [VAR name="arrayCFaltro" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTI_QUALIFICA_ALTRO,REQUEST,IUQOID[/TAG][/VAR] @@ -58,7 +61,7 @@ runtime: [DO] [VAR name="personaImporto" type="number"][VALUE_OF varname="ripartizioniImportiIterable" index="ripartizioneIdx" /][/VAR] [VAR name="personaNominativoIterable" type="iterable"][SPLIT regex=" \(CF: "][VALUE_OF varname="ripartizioniNominativiIterable" index="ripartizioneIdx" /][/SPLIT][/VAR] - [VAR name="personaNominativoRightIterable" type="iterable"][SPLIT regex="\)"][VALUE_OF varname="personaNominativoIterable" index="secondItem" /][/SPLIT][/VAR] + [VAR name="personaNominativoRightIterable" type="iterable"][SPLIT regex=", Qualifica: "][VALUE_OF varname="personaNominativoIterable" index="secondItem" /][/SPLIT][/VAR] [VAR name="personaCF" type="string"][VALUE_OF varname="personaNominativoRightIterable" index="firstItem" /][/VAR] [IF] [CONDITION][CONTAINS varname="arrayCFdocenti" value="personaCF" /][/CONDITION] @@ -71,14 +74,15 @@ runtime: [/WHILE] [/THEN][/IF] - [%= totalePersonaleDocente %] - [%= totalePersonaleAltro %] + NOM: [VALUE_OF varname="ripartizioniNominativiIterable" /] + [%= crlf %] + IMP: [VALUE_OF varname="ripartizioniImportiIterable" /] + [%= crlf %] + DOC: [FORMAT type="number" pattern="0.00"][% totalePersonaleDocente %][/FORMAT] + [%= crlf %] + PTA: [FORMAT type="number" pattern="0.00"][% totalePersonaleAltro %][/FORMAT] [/EFTL] - `; - - var base64EncodedDocument = btoa(eftlDocumentToBeProcessed); - - bru.setVar("elixBase64EftlDocument", base64EncodedDocument); + `)); settings: encodeUrl: true From a06daf5572d7715c424cf3bd92411d7b5a8bc9b8 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Thu, 19 Feb 2026 16:15:22 +0100 Subject: [PATCH 2/2] add new request update eftl --- ...lcolo importo per singolo partecipante.yml | 80 +++++++++++++++++++ ...olo ripartizione per tipologia persona.yml | 10 +++ 2 files changed, 90 insertions(+) create mode 100644 collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo importo per singolo partecipante.yml diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo importo per singolo partecipante.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo importo per singolo partecipante.yml new file mode 100644 index 0000000..19e840d --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo importo per singolo partecipante.yml @@ -0,0 +1,80 @@ +info: + name: Calcolo importo per singolo partecipante + type: http + seq: 16 + +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: "22737" + disabled: true + - name: x-ef-request-id + value: "22224" + disabled: true + - name: x-ef-request-id + value: "22744" + disabled: true + - name: x-ef-request-id + value: "23258" + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n", + "qualificheDocenti": ";Docente;Ricercatore;" + } + } + 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="arrayCFdocenti" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTI_QUALIFICA_DOCENTE,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="arrayCFaltro" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTI_QUALIFICA_ALTRO,REQUEST,IUQOID[/TAG][/VAR] + + [VAR name="importoDocente" type="number"][% importoDocente = 0; %][/VAR] + [VAR name="importoAltro" type="number"][% importoAltro = 0; %][/VAR] + + [VAR name="lastUpdatedNominativo" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR] + [VAR name="lastUpdatedImporto" type="string"][TAG]GETVALUEBYTAG,IMPORTO_RIPARTIZIONE,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR] + + [VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR] + [VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR] + [VAR name="lastUpdatedNominativoIterable" type="iterable"][SPLIT regex=" \(CF: "][VALUE_OF varname="lastUpdatedNominativo" /][/SPLIT][/VAR] + [VAR name="lastUpdatedNominativoRightIterable" type="iterable"][SPLIT regex=", Qualifica: "][VALUE_OF varname="lastUpdatedNominativoIterable" index="secondItem" /][/SPLIT][/VAR] + [VAR name="lastUpdatedNominativoCF" type="string"][VALUE_OF varname="lastUpdatedNominativoRightIterable" index="firstItem" /][/VAR] + + [IF] + [CONDITION][CONTAINS varname="arrayCFdocenti" value="lastUpdatedNominativoCF" /][/CONDITION] + [THEN][% importoDocente = lastUpdatedImporto; %][/THEN] + [ELSE][% importoAltro = lastUpdatedImporto; %][/ELSE] + [/IF] + + [TAG]GETVALUEBYTAG,IMPORTO_RIPARTIZIONE,REQUEST,IUQOID,,,"#,###.00"[/TAG] + [%= crlf %] + [TAG]SCHEMAID,717,COL0010,IUQOID, , ,,"#,###.00"[/TAG] + [%= crlf %] + [%= importoDocente %] + [%= crlf %] + [%= importoAltro %] + [/EFTL] + `)); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml index 6679095..aa93e55 100644 --- a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ripartizione per tipologia persona.yml @@ -74,13 +74,23 @@ runtime: [/WHILE] [/THEN][/IF] + [!-- NOM: [VALUE_OF varname="ripartizioniNominativiIterable" /] [%= crlf %] IMP: [VALUE_OF varname="ripartizioniImportiIterable" /] [%= crlf %] + --] DOC: [FORMAT type="number" pattern="0.00"][% totalePersonaleDocente %][/FORMAT] [%= crlf %] PTA: [FORMAT type="number" pattern="0.00"][% totalePersonaleAltro %][/FORMAT] + + [!-- + PART_CONCAT: [TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,CONCAT,#[/TAG] + IMPR_CONCAT: [TAG]GETVALUEBYTAG,IMPORTO_RIPARTIZIONE,REQUEST,IUQOID,CONCAT,#[/TAG] + + [%= crlf %] + [TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,UPDATED_LAST[/TAG]: [TAG]GETVALUEBYTAG,IMPORTO_RIPARTIZIONE,REQUEST,IUQOID,UPDATED_LAST[/TAG] + --] [/EFTL] `));