Merge branch 'main' of https://gitea.synno-qc.synology.me/UniPR/Bruno-API
# Conflicts: # collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore equivalenti.yml
This commit is contained in:
+81
@@ -0,0 +1,81 @@
|
||||
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: |-
|
||||
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="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
|
||||
+4
-3
@@ -18,7 +18,7 @@ http:
|
||||
value: "22224"
|
||||
disabled: true
|
||||
- name: x-ef-request-id
|
||||
value: "23663"
|
||||
value: "23719"
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
@@ -36,8 +36,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw`
|
||||
prepareEftlDocument(String.raw`
|
||||
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
|
||||
|
||||
[VAR name="codiceFiscaleRichiedente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
@@ -62,7 +63,7 @@ runtime:
|
||||
|
||||
[%= importoRichiedente * fattore %]
|
||||
[/EFTL]
|
||||
`));
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+24
-9
@@ -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: |-
|
||||
@@ -36,8 +39,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = String.raw`
|
||||
prepareEftlDocument(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 +62,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 +75,25 @@ 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]
|
||||
|
||||
[!--
|
||||
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]
|
||||
`;
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);
|
||||
|
||||
bru.setVar("elixBase64EftlDocument", base64EncodedDocument);
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+44
-94
@@ -15,111 +15,61 @@ http:
|
||||
value: "21306"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\",\r
|
||||
|
||||
\ \"codiciFiscaliAmmessi\": \";XMMPPL74T17E463A;;\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n",
|
||||
"codiciFiscaliAmmessi": ";XMMPPL74T17E463A;;"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
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="checkUtentePartecipante" type="string"][% utentePartecipante = "Utente non ammesso alla compilazione perché non partecipante al contratto!"; %][/VAR]
|
||||
[VAR name="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
[VAR name="rsProponenteCF" type="string"][TAG]GETVALUEBYTAG,RSP_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="responsabili" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="partecipanti" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/VAR]
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
|
||||
[VAR name=\"checkUtentePartecipante\" type=\"string\"][% utentePartecipante = \"Utente non ammesso alla compilazione perché non partecipante al contratto!\"; %][/VAR]\r
|
||||
[!-- Hack for the CONTAIN below... --]
|
||||
[VAR name="richiedenteCFcontain" type="string"][% richiedenteCFcontain = ", CF: " + richiedenteCF + ", Qualifica: "; %][/VAR]
|
||||
|
||||
[VAR name=\"richiedenteCF\" type=\"string\"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
[!-- Il richiedente non deve essere il RS proponente --]
|
||||
[!-- Il richiedente deve comparire fra i responsabili --]
|
||||
[!-- Il richiedente deve comparire fra i partecipanti --]
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]
|
||||
|
||||
\r
|
||||
[IF]
|
||||
[CONDITION][% richiedenteCF == rsProponenteCF %][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente non deve compilare la DSAN"; %][/THEN]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="responsabili"][VALUE_OF varname="richiedenteCFcontain" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "1"; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="partecipanti"][VALUE_OF varname="richiedenteCFcontain" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "2"; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[/IF]
|
||||
|
||||
[VAR name=\"rsProponenteCF\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_CODFIS,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"responsabili\" type=\"string\"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanti\" type=\"string\"][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Hack for the CONTAIN below... --]\r
|
||||
|
||||
[VAR name=\"richiedenteCFcontain\" type=\"string\"][% richiedenteCFcontain = \", CF: \" + richiedenteCF + \", Qualifica: \"; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Il richiedente non deve essere il RS proponente --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i responsabili --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i partecipanti --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]\r
|
||||
|
||||
\r
|
||||
|
||||
[IF]\r
|
||||
|
||||
\ [CONDITION][% richiedenteCF == rsProponenteCF %][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"Il Responsabile Scientifico proponente non deve compilare la DSAN\"; %][/THEN]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"responsabili\"][VALUE_OF varname=\"richiedenteCFcontain\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"1\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"partecipanti\"][VALUE_OF varname=\"richiedenteCFcontain\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"2\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"codiciFiscaliAmmessi\"][VALUE_OF varname=\"richiedenteCF\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
[/IF]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= checkUtentePartecipante %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= checkUtentePartecipante %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+46
-98
@@ -15,115 +15,63 @@ http:
|
||||
value: "21223"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\",\r
|
||||
|
||||
\ \"nominativiAmmessi\": \";MAMMI Pier Paolo;;\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n",
|
||||
"nominativiAmmessi": ";MAMMI Pier Paolo;;"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
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="checkUtentePartecipante" type="string"][% utentePartecipante = "Utente non ammesso alla compilazione perché non partecipante al contratto!"; %][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
[VAR name="rsProponenteCognome" type="string"][TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="rsProponenteNome" type="string"][TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="responsabili" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="partecipanti" type="string"][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/VAR]
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
[!-- [VAR name="nominativoUtentePlain" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_NOMINATIVO,REQUEST,IUQOID[/TAG][/VAR] --]
|
||||
[VAR name="nominativoUtentePlain" type="string"][% nominativoUtentePlain = "mammi Pier Paolo"; %][/VAR]
|
||||
|
||||
[VAR name=\"checkUtentePartecipante\" type=\"string\"][% utentePartecipante = \"Utente non ammesso alla compilazione perché non partecipante al contratto!\"; %][/VAR]\r
|
||||
[!-- Hack for the CONTAIN below... --]
|
||||
[VAR name="nominativoUtente" type="string"][% nominativoUtente = " " + nominativoUtentePlain + ", CF: "; %][/VAR]
|
||||
|
||||
\r
|
||||
[!-- Il richiedente non deve essere il RS proponente --]
|
||||
[!-- Il richiedente deve comparire fra i responsabili --]
|
||||
[!-- Il richiedente deve comparire fra i partecipanti --]
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]
|
||||
|
||||
[VAR name=\"rsProponenteCognome\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
[IF]
|
||||
[CONDITION][% nominativoUtentePlain == rsProponenteCognome + " " + rsProponenteNome %][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente non deve compilare la DSAN"; %][/THEN]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="responsabili"][VALUE_OF varname="nominativoUtente" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="partecipanti"][VALUE_OF varname="nominativoUtente" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="nominativiAmmessi"][VALUE_OF varname="nominativoUtentePlain" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[/IF]
|
||||
|
||||
[VAR name=\"rsProponenteNome\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"responsabili\" type=\"string\"][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanti\" type=\"string\"][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- [VAR name=\"nominativoUtentePlain\" type=\"string\"][TAG]GETVALUEBYTAG,RICHIEDENTE_NOMINATIVO,REQUEST,IUQOID[/TAG][/VAR] --]\r
|
||||
|
||||
[VAR name=\"nominativoUtentePlain\" type=\"string\"][% nominativoUtentePlain = \"mammi Pier Paolo\"; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Hack for the CONTAIN below... --]\r
|
||||
|
||||
[VAR name=\"nominativoUtente\" type=\"string\"][% nominativoUtente = \" \" + nominativoUtentePlain + \", CF: \"; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Il richiedente non deve essere il RS proponente --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i responsabili --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i partecipanti --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]\r
|
||||
|
||||
\r
|
||||
|
||||
[IF]\r
|
||||
|
||||
\ [CONDITION][% nominativoUtentePlain == rsProponenteCognome + \" \" + rsProponenteNome %][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"Il Responsabile Scientifico proponente non deve compilare la DSAN\"; %][/THEN]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"responsabili\"][VALUE_OF varname=\"nominativoUtente\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"partecipanti\"][VALUE_OF varname=\"nominativoUtente\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"nominativiAmmessi\"][VALUE_OF varname=\"nominativoUtentePlain\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
[/IF]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= checkUtentePartecipante %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= checkUtentePartecipante %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+3
-6
@@ -29,8 +29,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = String.raw`
|
||||
prepareEftlDocument(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]
|
||||
@@ -51,11 +52,7 @@ runtime:
|
||||
|
||||
[%= isRichiedenteInRS %]
|
||||
[/EFTL]
|
||||
`;
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);
|
||||
|
||||
bru.setVar("elixBase64EftlDocument", base64EncodedDocument);
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+38
-80
@@ -21,95 +21,53 @@ http:
|
||||
value: "21344"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\",\r
|
||||
|
||||
\ \"codiciFiscaliAmmessi\": \";MMMPPL74T17E463A;;\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
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 (`)\r
|
||||
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="checkUtentePartecipante" type="string"][% utentePartecipante = "Il richiedente non è ammesso alla compilazione perché non rientra tra le ripartizioni proposte"; %][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
[VAR name="ripartizioniDaProposta" type="string"][TAG]GETVALUEBYTAG,RIPARTIZIONI,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="rsProponenteCF" type="string"][TAG]GETVALUEBYTAG,RSP_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="richiedenteCFregex" type="string"][% richiedenteCFregex = " (CF: " + richiedenteCF + ")"; %][/VAR]
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
[!-- Il richiedente non deve essere il RS proponente --]
|
||||
[!-- Il richiedente deve comparire fra i responsabili --]
|
||||
[!-- Il richiedente deve comparire fra i partecipanti --]
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]
|
||||
|
||||
[VAR name=\"checkUtentePartecipante\" type=\"string\"][% utentePartecipante = \"Il richiedente non è ammesso alla compilazione perché non rientra tra le ripartizioni proposte\"; %][/VAR]\r
|
||||
[IF]
|
||||
[CONDITION][% richiedenteCF == rsProponenteCF %][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente non deve compilare la DSAN"; %][/THEN]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="ripartizioniDaProposta"][VALUE_OF varname="richiedenteCFregex" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[ELSE IF]
|
||||
[CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
||||
[/ELSE IF]
|
||||
[/IF]
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"ripartizioniDaProposta\" type=\"string\"][TAG]GETVALUEBYTAG,RIPARTIZIONI,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"rsProponenteCF\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_CODFIS,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"richiedenteCF\" type=\"string\"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"richiedenteCFregex\" type=\"string\"][% richiedenteCFregex = \" (CF: \" + richiedenteCF + \")\"; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Il richiedente non deve essere il RS proponente --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i responsabili --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i partecipanti --]\r
|
||||
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]\r
|
||||
|
||||
\r
|
||||
|
||||
[IF]\r
|
||||
|
||||
\ [CONDITION][% richiedenteCF == rsProponenteCF %][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"Il Responsabile Scientifico proponente non deve compilare la DSAN\"; %][/THEN]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"ripartizioniDaProposta\"][VALUE_OF varname=\"richiedenteCFregex\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][CONTAINS varname=\"codiciFiscaliAmmessi\"][VALUE_OF varname=\"richiedenteCF\" /][/CONTAINS][/CONDITION]\r
|
||||
|
||||
\ [THEN][% checkUtentePartecipante = \"\"; %][/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
[/IF]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= checkUtentePartecipante %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= checkUtentePartecipante %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+45
-97
@@ -18,115 +18,63 @@ http:
|
||||
value: "21334"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
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="ripartizioniIterableWithSep" type="iterable"][SPLIT regex="#"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,CONCAT,#[/TAG][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioniCount" type="string"][SIZE_OF varname="ripartizioniIterableWithSep" /][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
[VAR name="ripartizioniJoin" type="string"][% ripartizioniJoin = ""; %][/VAR]
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
[IF][CONDITION][% ripartizioniCount > 0 %][/CONDITION][THEN]
|
||||
[VAR name="ripartizioneIdx" type="string"][% ripartizioneIdx = 0; %][/VAR]
|
||||
[VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR]
|
||||
[VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR]
|
||||
|
||||
[VAR name=\"ripartizioniIterableWithSep\" type=\"iterable\"][SPLIT regex=\"#\"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,CONCAT,#[/TAG][/SPLIT][/VAR]\r
|
||||
[WHILE threshold="99"]
|
||||
[CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION]
|
||||
[DO]
|
||||
[VAR name="ripartizioneFull" type="string"][VALUE_OF varname="ripartizioniIterableWithSep" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneFullIterable" type="iterable"][SPLIT regex=" \(CF: "][TRIM][VALUE_OF varname="ripartizioneFull" /][/TRIM][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneCFIterable" type="iterable"][SPLIT regex="\)"][VALUE_OF varname="ripartizioneFullIterable" index="secondItem" /][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneCF" type="string"][VALUE_OF varname="ripartizioneCFIterable" index="firstItem" /][/VAR]
|
||||
[% ripartizioniJoin = ripartizioniJoin + ripartizioneCF; %]
|
||||
|
||||
[VAR name=\"ripartizioniCount\" type=\"string\"][SIZE_OF varname=\"ripartizioniIterableWithSep\" /][/VAR]\r
|
||||
[% ripartizioneIdx = ripartizioneIdx + 1; %]
|
||||
|
||||
\r
|
||||
[IF][CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION][THEN]
|
||||
[% ripartizioniJoin = ripartizioniJoin + "#"; %]
|
||||
[/THEN][/IF]
|
||||
[/DO]
|
||||
[/WHILE]
|
||||
[/THEN][/IF]
|
||||
|
||||
[VAR name=\"ripartizioniJoin\" type=\"string\"][% ripartizioniJoin = \"\"; %][/VAR]\r
|
||||
[!--
|
||||
[%= ripartizioniCount %]
|
||||
[%= crlf %]
|
||||
[%= ripartizioneIdx %]
|
||||
[%= crlf %]
|
||||
[%= "JOIN: " ripartizioniJoin %]
|
||||
--]
|
||||
|
||||
\r
|
||||
|
||||
[IF][CONDITION][% ripartizioniCount > 0 %][/CONDITION][THEN]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneIdx\" type=\"string\"][% ripartizioneIdx = 0; %][/VAR]\r
|
||||
|
||||
\ [VAR name=\"firstItem\" type=\"number\"][% firstItem = 0; %][/VAR]\r
|
||||
|
||||
\ [VAR name=\"secondItem\" type=\"number\"][% secondItem = 1; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [WHILE threshold=\"99\"]\r
|
||||
|
||||
\ [CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION]\r
|
||||
|
||||
\ [DO]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneFull\" type=\"string\"][VALUE_OF varname=\"ripartizioniIterableWithSep\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneFullIterable\" type=\"iterable\"][SPLIT regex=\" \\(CF: \"][TRIM][VALUE_OF varname=\"ripartizioneFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneCFIterable\" type=\"iterable\"][SPLIT regex=\"\\)\"][VALUE_OF varname=\"ripartizioneFullIterable\" index=\"secondItem\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneCF\" type=\"string\"][VALUE_OF varname=\"ripartizioneCFIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\ [% ripartizioniJoin = ripartizioniJoin + ripartizioneCF; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% ripartizioneIdx = ripartizioneIdx + 1; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [IF][CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION][THEN]\r
|
||||
|
||||
\ [% ripartizioniJoin = ripartizioniJoin + \"#\"; %]\r
|
||||
|
||||
\ [/THEN][/IF]\r
|
||||
|
||||
\ [/DO]\r
|
||||
|
||||
\ [/WHILE]\r
|
||||
|
||||
[/THEN][/IF]\r
|
||||
|
||||
\r
|
||||
|
||||
[!--\r
|
||||
|
||||
[%= ripartizioniCount %]\r
|
||||
|
||||
[%= crlf %]\r
|
||||
|
||||
[%= ripartizioneIdx %]\r
|
||||
|
||||
[%= crlf %]\r
|
||||
|
||||
[%= \"JOIN: \" ripartizioniJoin %]\r
|
||||
|
||||
--]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= ripartizioniJoin %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= ripartizioniJoin %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+99
-204
@@ -15,221 +15,116 @@ http:
|
||||
value: "8760"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"docs\": [\r
|
||||
|
||||
\ {\r
|
||||
|
||||
\ \"name\": \"doc1\",\r
|
||||
|
||||
\ \"quantity\": 3,\r
|
||||
|
||||
\ \"price\": 123.3\r
|
||||
|
||||
\ },\r
|
||||
|
||||
\ {\r
|
||||
|
||||
\ \"name\": \"doc2\",\r
|
||||
|
||||
\ \"quantity\": 5,\r
|
||||
|
||||
\ \"price\": 213.3\r
|
||||
|
||||
\ },\r
|
||||
|
||||
\ {\r
|
||||
|
||||
\ \"name\": \"doc3\",\r
|
||||
|
||||
\ \"quantity\": 10,\r
|
||||
|
||||
\ \"price\": 321.3\r
|
||||
|
||||
\ }\r
|
||||
|
||||
\ ],\r
|
||||
|
||||
\ \"docsAsEntities\": [\r
|
||||
|
||||
\ {\r
|
||||
|
||||
\ \"eftlEntityType\": \"com.anthesi.elixforms.api.eftl.model.mock.EftlDoc\",\r
|
||||
|
||||
\ \"eftlEntity\": {\r
|
||||
|
||||
\ \"name\": \"doc1\",\r
|
||||
|
||||
\ \"quantity\": 3,\r
|
||||
|
||||
\ \"price\": 123.3\r
|
||||
|
||||
\ }\r
|
||||
|
||||
\ },\r
|
||||
|
||||
\ {\r
|
||||
|
||||
\ \"eftlEntityType\": \"com.anthesi.elixforms.api.eftl.model.mock.EftlDoc\",\r
|
||||
|
||||
\ \"eftlEntity\": {\r
|
||||
|
||||
\ \"name\": \"doc2\",\r
|
||||
|
||||
\ \"quantity\": 5,\r
|
||||
|
||||
\ \"price\": 213.3\r
|
||||
|
||||
\ }\r
|
||||
|
||||
\ },\r
|
||||
|
||||
\ {\r
|
||||
|
||||
\ \"eftlEntityType\": \"com.anthesi.elixforms.api.eftl.model.mock.EftlDoc\",\r
|
||||
|
||||
\ \"eftlEntity\": {\r
|
||||
|
||||
\ \"name\": \"doc3\",\r
|
||||
|
||||
\ \"quantity\": 10,\r
|
||||
|
||||
\ \"price\": 321.3\r
|
||||
|
||||
\ }\r
|
||||
|
||||
\ }\r
|
||||
|
||||
\ ],\r
|
||||
|
||||
\ \"singleEntity\": {\r
|
||||
|
||||
\ \"eftlEntityType\": \"com.anthesi.elixforms.api.eftl.model.mock.EftlDoc\",\r
|
||||
|
||||
\ \"eftlEntity\": {\r
|
||||
|
||||
\ \"name\": \"doc1\",\r
|
||||
|
||||
\ \"quantity\": 3,\r
|
||||
|
||||
\ \"price\": 123.3\r
|
||||
|
||||
\ }\r
|
||||
|
||||
\ },\r
|
||||
|
||||
\ \"simpleList\": [\r
|
||||
|
||||
\ \"s1\",\r
|
||||
|
||||
\ \"s2\",\r
|
||||
|
||||
\ \"s3\"\r
|
||||
|
||||
\ ],\r
|
||||
|
||||
\ \"docsSize\": 3\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"docs": [
|
||||
{
|
||||
"name": "doc1",
|
||||
"quantity": 3,
|
||||
"price": 123.3
|
||||
},
|
||||
{
|
||||
"name": "doc2",
|
||||
"quantity": 5,
|
||||
"price": 213.3
|
||||
},
|
||||
{
|
||||
"name": "doc3",
|
||||
"quantity": 10,
|
||||
"price": 321.3
|
||||
}
|
||||
],
|
||||
"docsAsEntities": [
|
||||
{
|
||||
"eftlEntityType": "com.anthesi.elixforms.api.eftl.model.mock.EftlDoc",
|
||||
"eftlEntity": {
|
||||
"name": "doc1",
|
||||
"quantity": 3,
|
||||
"price": 123.3
|
||||
}
|
||||
},
|
||||
{
|
||||
"eftlEntityType": "com.anthesi.elixforms.api.eftl.model.mock.EftlDoc",
|
||||
"eftlEntity": {
|
||||
"name": "doc2",
|
||||
"quantity": 5,
|
||||
"price": 213.3
|
||||
}
|
||||
},
|
||||
{
|
||||
"eftlEntityType": "com.anthesi.elixforms.api.eftl.model.mock.EftlDoc",
|
||||
"eftlEntity": {
|
||||
"name": "doc3",
|
||||
"quantity": 10,
|
||||
"price": 321.3
|
||||
}
|
||||
}
|
||||
],
|
||||
"singleEntity": {
|
||||
"eftlEntityType": "com.anthesi.elixforms.api.eftl.model.mock.EftlDoc",
|
||||
"eftlEntity": {
|
||||
"name": "doc1",
|
||||
"quantity": 3,
|
||||
"price": 123.3
|
||||
}
|
||||
},
|
||||
"simpleList": [
|
||||
"s1",
|
||||
"s2",
|
||||
"s3"
|
||||
],
|
||||
"docsSize": 3
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
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="idxNome" type="number"][% idxNome = 0; %][/VAR]
|
||||
[VAR name="idxCfPIva" type="number"][% idxCfPIva = 1; %][/VAR]
|
||||
[VAR name="idxSede" type="number"][% idxSede = 2; %][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = `\r
|
||||
[VAR name="elencoContraentiCompleto" type="string"][% elencoContraentiCompleto = ""; %][/VAR]
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
[VAR name="contraenti" type="iterable"][SPLIT regex="\n"][TAG]SCHEMAID,341,COL0004,IUQOID, , [/TAG][/SPLIT][/VAR]
|
||||
[VAR name="countContraenti" type="number"][SIZE_OF varname="contraenti" /][/VAR]
|
||||
[VAR name="idxContraente" type="number"][% idxContraente = 0; %][/VAR]
|
||||
|
||||
[VAR name=\"idxNome\" type=\"number\"][% idxNome = 0; %][/VAR]\r
|
||||
[!-- Estraggo i dati del primo contraente (ce ne sarà sempre almeno uno) --]
|
||||
[VAR name="currContraente" type="string"][VALUE_OF varname="contraenti" index="idxContraente" /][/VAR]
|
||||
[VAR name="currContraenteSplit" type="iterable"][SPLIT regex=", (.*?):"][TRIM][VALUE_OF varname="currContraente" /][/TRIM][/SPLIT][/VAR]
|
||||
[VAR name="currContraenteNome" type="string"][TRIM][VALUE_OF varname="currContraenteSplit" index="idxNome" /][/TRIM][/VAR]
|
||||
[VAR name="currContraenteCfPIva" type="string"][TRIM][VALUE_OF varname="currContraenteSplit" index="idxCfPIva" /][/TRIM][/VAR]
|
||||
[VAR name="currContraenteSede" type="string"][TRIM][VALUE_OF varname="currContraenteSplit" index="idxSede" /][/TRIM][/VAR]
|
||||
[% elencoContraentiCompleto = currContraenteNome + " (CF/PIVA: " + currContraenteCfPIva + ") con sede legale in " + currContraenteSede; %]
|
||||
|
||||
[VAR name=\"idxCfPIva\" type=\"number\"][% idxCfPIva = 1; %][/VAR]\r
|
||||
[!-- Se c'è più di un contraente, ciclo su tutti i rimanenti (tutto questo per non avere una ", " in fondo alla stringa finale...) --]
|
||||
[WHILE]
|
||||
[CONDITION][% idxContraente < countContraenti - 1 %][/CONDITION]
|
||||
[DO]
|
||||
[% idxContraente = idxContraente + 1; %]
|
||||
|
||||
[VAR name=\"idxSede\" type=\"number\"][% idxSede = 2; %][/VAR]\r
|
||||
[VAR name="currContraente" type="string"][VALUE_OF varname="contraenti" index="idxContraente" /][/VAR]
|
||||
[VAR name="currContraenteSplit" type="iterable"][SPLIT regex=", (.*?):"][TRIM][VALUE_OF varname="currContraente" /][/TRIM][/SPLIT][/VAR]
|
||||
[VAR name="currContraenteNome" type="string"][VALUE_OF varname="currContraenteSplit" index="idxNome" /][/VAR]
|
||||
[VAR name="currContraenteCfPIva" type="string"][VALUE_OF varname="currContraenteSplit" index="idxCfPIva" /][/VAR]
|
||||
[VAR name="currContraenteSede" type="string"][VALUE_OF varname="currContraenteSplit" index="idxSede" /][/VAR]
|
||||
[% elencoContraentiCompleto = elencoContraentiCompleto + ", " + currContraenteNome + " (CF/PIVA: " + currContraenteCfPIva + ") con sede legale in " + currContraenteSede; %]
|
||||
[/DO]
|
||||
[/WHILE]
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"elencoContraentiCompleto\" type=\"string\"][% elencoContraentiCompleto = \"\"; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"contraenti\" type=\"iterable\"][SPLIT regex=\"\\n\"][TAG]SCHEMAID,341,COL0004,IUQOID, , [/TAG][/SPLIT][/VAR]\r
|
||||
|
||||
[VAR name=\"countContraenti\" type=\"number\"][SIZE_OF varname=\"contraenti\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"idxContraente\" type=\"number\"][% idxContraente = 0; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Estraggo i dati del primo contraente (ce ne sarà sempre almeno uno) --]\r
|
||||
|
||||
[VAR name=\"currContraente\" type=\"string\"][VALUE_OF varname=\"contraenti\" index=\"idxContraente\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"currContraenteSplit\" type=\"iterable\"][SPLIT regex=\", (.*?):\"][TRIM][VALUE_OF varname=\"currContraente\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
[VAR name=\"currContraenteNome\" type=\"string\"][TRIM][VALUE_OF varname=\"currContraenteSplit\" index=\"idxNome\" /][/TRIM][/VAR]\r
|
||||
|
||||
[VAR name=\"currContraenteCfPIva\" type=\"string\"][TRIM][VALUE_OF varname=\"currContraenteSplit\" index=\"idxCfPIva\" /][/TRIM][/VAR]\r
|
||||
|
||||
[VAR name=\"currContraenteSede\" type=\"string\"][TRIM][VALUE_OF varname=\"currContraenteSplit\" index=\"idxSede\" /][/TRIM][/VAR]\r
|
||||
|
||||
[% elencoContraentiCompleto = currContraenteNome + \" (CF/PIVA: \" + currContraenteCfPIva + \") con sede legale in \" + currContraenteSede; %]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Se c'è più di un contraente, ciclo su tutti i rimanenti (tutto questo per non avere una \", \" in fondo alla stringa finale...) --]\r
|
||||
|
||||
[WHILE]\r
|
||||
|
||||
\ [CONDITION][% idxContraente < countContraenti - 1 %][/CONDITION]\r
|
||||
|
||||
\ [DO]\r
|
||||
|
||||
\ [% idxContraente = idxContraente + 1; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [VAR name=\"currContraente\" type=\"string\"][VALUE_OF varname=\"contraenti\" index=\"idxContraente\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"currContraenteSplit\" type=\"iterable\"][SPLIT regex=\", (.*?):\"][TRIM][VALUE_OF varname=\"currContraente\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"currContraenteNome\" type=\"string\"][VALUE_OF varname=\"currContraenteSplit\" index=\"idxNome\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"currContraenteCfPIva\" type=\"string\"][VALUE_OF varname=\"currContraenteSplit\" index=\"idxCfPIva\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"currContraenteSede\" type=\"string\"][VALUE_OF varname=\"currContraenteSplit\" index=\"idxSede\" /][/VAR]\r
|
||||
|
||||
\ [% elencoContraentiCompleto = elencoContraentiCompleto + \", \" + currContraenteNome + \" (CF/PIVA: \" + currContraenteCfPIva + \") con sede legale in \" + currContraenteSede; %]\r
|
||||
|
||||
\ [/DO]\r
|
||||
|
||||
[/WHILE]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= elencoContraentiCompleto %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= elencoContraentiCompleto %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+109
-218
@@ -15,229 +15,120 @@ http:
|
||||
value: "21223"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
|
||||
[VAR name=\"newLine\" type=\"string\"][VALUE_OF varname=\"crlf\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"responsabili\" type=\"string\"][TRIM][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/TRIM][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanti\" type=\"string\"][TRIM][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/TRIM][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[!-- Aggiungi primo elemento \"nullo\" --]\r
|
||||
|
||||
[VAR name=\"ripartizioniElenco\" type=\"string\"][% ripartizioniElenco = \"[0] ---\" + newLine; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"responsabiliIterable\" type=\"iterable\"][SPLIT regex=\"\\n\"][VALUE_OF varname=\"responsabili\" /][/SPLIT][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipantiIterable\" type=\"iterable\"][SPLIT regex=\"\\n\"][VALUE_OF varname=\"partecipanti\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"responsabiliCount\" type=\"number\"][SIZE_OF varname=\"responsabiliIterable\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipantiCount\" type=\"number\"][SIZE_OF varname=\"partecipantiIterable\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"personaIdx\" type=\"string\"][% personaIdx = 0; %][/VAR]\r
|
||||
|
||||
[VAR name=\"dropdownIdx\" type=\"string\"][% dropdownIdx = 0; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[VAR name=\"firstItem\" type=\"number\"][% firstItem = 0; %][/VAR]\r
|
||||
|
||||
[VAR name=\"secondItem\" type=\"number\"][% secondItem = 1; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[WHILE threshold=\"99\"]\r
|
||||
|
||||
\ [CONDITION][% personaIdx < responsabiliCount %][/CONDITION]\r
|
||||
|
||||
\ [DO]\r
|
||||
|
||||
\ [VAR name=\"responsabileFull\" type=\"string\"][VALUE_OF varname=\"responsabiliIterable\" index=\"personaIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"responsabileIterable\" type=\"iterable\"][SPLIT regex=\", CF: \"][TRIM][VALUE_OF varname=\"responsabileFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- Recupera il nominativo --]\r
|
||||
|
||||
\ [VAR name=\"responsabileNominativo\" type=\"string\"][VALUE_OF varname=\"responsabileIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- Recupera il codice fiscale --]\r
|
||||
|
||||
\ [VAR name=\"responsabileResto\" type=\"string\"][VALUE_OF varname=\"responsabileIterable\" index=\"secondItem\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"responsabileRestoIterable\" type=\"iterable\"][SPLIT regex=\", Qualifica: \"][VALUE_OF varname=\"responsabileResto\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"responsabileCodiceFiscale\" type=\"string\"][VALUE_OF varname=\"responsabileRestoIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% personaIdx = personaIdx + 1; %]\r
|
||||
|
||||
\ [% dropdownIdx = dropdownIdx + 1; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- HACK ignobile per recuperare il numero che altrimenti verrebbe emesso come \"1.0\", etc... --]\r
|
||||
|
||||
\ [VAR name=\"responsabileKeyIterable\" type=\"iterable\"][SPLIT regex=\"\\.\"][% dropdownIdx + \"\" %][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"responsabileKey\" type=\"string\"][VALUE_OF varname=\"responsabileKeyIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% ripartizioniElenco = ripartizioniElenco + \"[\" + responsabileKey + \"] \" + responsabileNominativo + \" (CF: \" + responsabileCodiceFiscale + \")\"; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [IF]\r
|
||||
|
||||
\ [CONDITION][% personaIdx < responsabiliCount %][/CONDITION]\r
|
||||
|
||||
\ [THEN]\r
|
||||
|
||||
\ [% ripartizioniElenco = ripartizioniElenco + newLine; %]\r
|
||||
|
||||
\ [/THEN]\r
|
||||
|
||||
\ [ELSE IF]\r
|
||||
|
||||
\ [CONDITION][IS_NOT_EMPTY varname=\"partecipanti\" /][/CONDITION]\r
|
||||
|
||||
\ [THEN]\r
|
||||
|
||||
\ [% ripartizioniElenco = ripartizioniElenco + newLine; %]\r
|
||||
|
||||
\ [/THEN]\r
|
||||
|
||||
\ [/ELSE IF]\r
|
||||
|
||||
\ [/IF]\r
|
||||
|
||||
\ [/DO]\r
|
||||
|
||||
[/WHILE]\r
|
||||
|
||||
\r
|
||||
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname=\"partecipanti\" /][/CONDITION][THEN]\r
|
||||
|
||||
\ [% personaIdx = 0; %]\r
|
||||
|
||||
\ [WHILE threshold=\"99\"]\r
|
||||
|
||||
\ [CONDITION][% personaIdx < partecipantiCount %][/CONDITION]\r
|
||||
|
||||
\ [DO]\r
|
||||
|
||||
\ [VAR name=\"partecipanteFull\" type=\"string\"][VALUE_OF varname=\"partecipantiIterable\" index=\"personaIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"partecipanteIterable\" type=\"iterable\"][SPLIT regex=\", CF: \"][TRIM][VALUE_OF varname=\"partecipanteFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- Recupera il nominativo --]\r
|
||||
|
||||
\ [VAR name=\"partecipanteNominativo\" type=\"string\"][VALUE_OF varname=\"partecipanteIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- Recupera il codice fiscale --]\r
|
||||
|
||||
\ [VAR name=\"partecipanteResto\" type=\"string\"][VALUE_OF varname=\"partecipanteIterable\" index=\"secondItem\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"partecipanteRestoIterable\" type=\"iterable\"][SPLIT regex=\", Qualifica: \"][VALUE_OF varname=\"partecipanteResto\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"partecipanteCodiceFiscale\" type=\"string\"][VALUE_OF varname=\"partecipanteRestoIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% personaIdx = personaIdx + 1; %]\r
|
||||
|
||||
\ [% dropdownIdx = dropdownIdx + 1; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- HACK ignobile per recuperare il numero che altrimenti verrebbe emesso come \"1.0\", etc... --]\r
|
||||
|
||||
\ [VAR name=\"partecipanteKeyIterable\" type=\"iterable\"][SPLIT regex=\"\\.\"][% dropdownIdx + \"\" %][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"partecipanteKey\" type=\"string\"][VALUE_OF varname=\"partecipanteKeyIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% ripartizioniElenco = ripartizioniElenco + \"[\" + partecipanteKey + \"] \" + partecipanteNominativo + \" (CF: \" + partecipanteCodiceFiscale + \")\"; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [IF]\r
|
||||
|
||||
\ [CONDITION][% personaIdx < partecipantiCount %][/CONDITION]\r
|
||||
|
||||
\ [THEN]\r
|
||||
|
||||
\ [% ripartizioniElenco = ripartizioniElenco + newLine; %]\r
|
||||
|
||||
\ [/THEN]\r
|
||||
|
||||
\ [/IF]\r
|
||||
|
||||
\ [/DO]\r
|
||||
|
||||
\ [/WHILE]\r
|
||||
|
||||
[/THEN][/IF]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= ripartizioniElenco %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
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="newLine" type="string"][VALUE_OF varname="crlf" /][/VAR]
|
||||
|
||||
[VAR name="responsabili" type="string"][TRIM][TAG]GETVALUEBYTAG,CONTRATTO_RESPONSABILI,REQUEST,IUQOID[/TAG][/TRIM][/VAR]
|
||||
[VAR name="partecipanti" type="string"][TRIM][TAG]GETVALUEBYTAG,CONTRATTO_PARTECIPANTI,REQUEST,IUQOID[/TAG][/TRIM][/VAR]
|
||||
|
||||
[!-- Aggiungi primo elemento "nullo" --]
|
||||
[VAR name="ripartizioniElenco" type="string"][% ripartizioniElenco = "[0] ---" + newLine; %][/VAR]
|
||||
|
||||
[VAR name="responsabiliIterable" type="iterable"][SPLIT regex="\n"][VALUE_OF varname="responsabili" /][/SPLIT][/VAR]
|
||||
[VAR name="partecipantiIterable" type="iterable"][SPLIT regex="\n"][VALUE_OF varname="partecipanti" /][/SPLIT][/VAR]
|
||||
|
||||
[VAR name="responsabiliCount" type="number"][SIZE_OF varname="responsabiliIterable" /][/VAR]
|
||||
[VAR name="partecipantiCount" type="number"][SIZE_OF varname="partecipantiIterable" /][/VAR]
|
||||
|
||||
[VAR name="personaIdx" type="string"][% personaIdx = 0; %][/VAR]
|
||||
[VAR name="dropdownIdx" type="string"][% dropdownIdx = 0; %][/VAR]
|
||||
|
||||
[VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR]
|
||||
[VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR]
|
||||
|
||||
[WHILE threshold="99"]
|
||||
[CONDITION][% personaIdx < responsabiliCount %][/CONDITION]
|
||||
[DO]
|
||||
[VAR name="responsabileFull" type="string"][VALUE_OF varname="responsabiliIterable" index="personaIdx" /][/VAR]
|
||||
[VAR name="responsabileIterable" type="iterable"][SPLIT regex=", CF: "][TRIM][VALUE_OF varname="responsabileFull" /][/TRIM][/SPLIT][/VAR]
|
||||
|
||||
[!-- Recupera il nominativo --]
|
||||
[VAR name="responsabileNominativo" type="string"][VALUE_OF varname="responsabileIterable" index="firstItem" /][/VAR]
|
||||
|
||||
[!-- Recupera il codice fiscale --]
|
||||
[VAR name="responsabileResto" type="string"][VALUE_OF varname="responsabileIterable" index="secondItem" /][/VAR]
|
||||
[VAR name="responsabileRestoIterable" type="iterable"][SPLIT regex=", Qualifica: "][VALUE_OF varname="responsabileResto" /][/SPLIT][/VAR]
|
||||
[VAR name="responsabileCodiceFiscale" type="string"][VALUE_OF varname="responsabileRestoIterable" index="firstItem" /][/VAR]
|
||||
|
||||
[% personaIdx = personaIdx + 1; %]
|
||||
[% dropdownIdx = dropdownIdx + 1; %]
|
||||
|
||||
[!-- HACK ignobile per recuperare il numero che altrimenti verrebbe emesso come "1.0", etc... --]
|
||||
[VAR name="responsabileKeyIterable" type="iterable"][SPLIT regex="\."][% dropdownIdx + "" %][/SPLIT][/VAR]
|
||||
[VAR name="responsabileKey" type="string"][VALUE_OF varname="responsabileKeyIterable" index="firstItem" /][/VAR]
|
||||
|
||||
[% ripartizioniElenco = ripartizioniElenco + "[" + responsabileKey + "] " + responsabileNominativo + " (CF: " + responsabileCodiceFiscale + ")"; %]
|
||||
|
||||
[IF]
|
||||
[CONDITION][% personaIdx < responsabiliCount %][/CONDITION]
|
||||
[THEN]
|
||||
[% ripartizioniElenco = ripartizioniElenco + newLine; %]
|
||||
[/THEN]
|
||||
[ELSE IF]
|
||||
[CONDITION][IS_NOT_EMPTY varname="partecipanti" /][/CONDITION]
|
||||
[THEN]
|
||||
[% ripartizioniElenco = ripartizioniElenco + newLine; %]
|
||||
[/THEN]
|
||||
[/ELSE IF]
|
||||
[/IF]
|
||||
[/DO]
|
||||
[/WHILE]
|
||||
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname="partecipanti" /][/CONDITION][THEN]
|
||||
[% personaIdx = 0; %]
|
||||
[WHILE threshold="99"]
|
||||
[CONDITION][% personaIdx < partecipantiCount %][/CONDITION]
|
||||
[DO]
|
||||
[VAR name="partecipanteFull" type="string"][VALUE_OF varname="partecipantiIterable" index="personaIdx" /][/VAR]
|
||||
[VAR name="partecipanteIterable" type="iterable"][SPLIT regex=", CF: "][TRIM][VALUE_OF varname="partecipanteFull" /][/TRIM][/SPLIT][/VAR]
|
||||
|
||||
[!-- Recupera il nominativo --]
|
||||
[VAR name="partecipanteNominativo" type="string"][VALUE_OF varname="partecipanteIterable" index="firstItem" /][/VAR]
|
||||
|
||||
[!-- Recupera il codice fiscale --]
|
||||
[VAR name="partecipanteResto" type="string"][VALUE_OF varname="partecipanteIterable" index="secondItem" /][/VAR]
|
||||
[VAR name="partecipanteRestoIterable" type="iterable"][SPLIT regex=", Qualifica: "][VALUE_OF varname="partecipanteResto" /][/SPLIT][/VAR]
|
||||
[VAR name="partecipanteCodiceFiscale" type="string"][VALUE_OF varname="partecipanteRestoIterable" index="firstItem" /][/VAR]
|
||||
|
||||
[% personaIdx = personaIdx + 1; %]
|
||||
[% dropdownIdx = dropdownIdx + 1; %]
|
||||
|
||||
[!-- HACK ignobile per recuperare il numero che altrimenti verrebbe emesso come "1.0", etc... --]
|
||||
[VAR name="partecipanteKeyIterable" type="iterable"][SPLIT regex="\."][% dropdownIdx + "" %][/SPLIT][/VAR]
|
||||
[VAR name="partecipanteKey" type="string"][VALUE_OF varname="partecipanteKeyIterable" index="firstItem" /][/VAR]
|
||||
|
||||
[% ripartizioniElenco = ripartizioniElenco + "[" + partecipanteKey + "] " + partecipanteNominativo + " (CF: " + partecipanteCodiceFiscale + ")"; %]
|
||||
|
||||
[IF]
|
||||
[CONDITION][% personaIdx < partecipantiCount %][/CONDITION]
|
||||
[THEN]
|
||||
[% ripartizioniElenco = ripartizioniElenco + newLine; %]
|
||||
[/THEN]
|
||||
[/IF]
|
||||
[/DO]
|
||||
[/WHILE]
|
||||
[/THEN][/IF]
|
||||
|
||||
[%= ripartizioniElenco %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+54
-111
@@ -15,125 +15,68 @@ http:
|
||||
value: "19758"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
prepareEftlDocument(String.raw`
|
||||
[EFTL]
|
||||
[VAR name="newLine" type="string"][VALUE_OF varname="crlf" /][/VAR]
|
||||
[VAR name="ripartizioniNominativiWithSep" type="string"][TAG]SCHEMAID,538,COL0005,ID_OBJECT,,#[/TAG][/VAR]
|
||||
[VAR name="ripartizioniImportiWithSep" type="string"][TAG]SCHEMAID,538,COL0002,ID_OBJECT,,#[/TAG][/VAR]
|
||||
<table>
|
||||
<tr><th>Partecipante</th><th>Importo (EUR)</th></tr>
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname="ripartizioniNominativiWithSep" /][/CONDITION][THEN]
|
||||
[VAR name="ripartizioniNominativiIterable" type="iterable"][SPLIT regex="#"][VALUE_OF varname="ripartizioniNominativiWithSep" /][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioniImportiIterable" type="iterable"][SPLIT regex="#"][VALUE_OF varname="ripartizioniImportiWithSep" /][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioniCount" type="number"][SIZE_OF varname="ripartizioniNominativiIterable" /][/VAR]
|
||||
[VAR name="ripartizioneIdx" type="string"][% ripartizioneIdx = 0; %][/VAR]
|
||||
[VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR]
|
||||
[VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
|
||||
[EFTL]\r
|
||||
[FOR varName="ripartizione" iterable="ripartizioniNominativiIterable"]
|
||||
[VAR name="ripartizioneNominativoFull" type="string"][VALUE_OF varname="ripartizioniNominativiIterable" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneImporto" type="string"][VALUE_OF varname="ripartizioniImportiIterable" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneNominativoIterable" type="iterable"][SPLIT regex="] "][TRIM][VALUE_OF varname="ripartizioneNominativoFull" /][/TRIM][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneNominativo" type="string"][VALUE_OF varname="ripartizioneNominativoIterable" index="secondItem" /][/VAR]
|
||||
[% ripartizioneIdx = ripartizioneIdx + 1; %]
|
||||
[VAR name="ripartizioneKeyIterable" type="iterable"][SPLIT regex="\."][% ripartizioneIdx + "" %][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneKey" type="string"][VALUE_OF varname="ripartizioneKeyIterable" index="firstItem" /][/VAR]
|
||||
<tr><td>[VALUE_OF varname="ripartizioneNominativo" /]</td><td>[VALUE_OF varname="ripartizioneImporto" /]</td></tr>
|
||||
[/FOR]
|
||||
|
||||
[VAR name=\"newLine\" type=\"string\"][VALUE_OF varname=\"crlf\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"ripartizioniNominativiWithSep\" type=\"string\"][TAG]SCHEMAID,538,COL0005,ID_OBJECT,,#[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"ripartizioniImportiWithSep\" type=\"string\"][TAG]SCHEMAID,538,COL0002,ID_OBJECT,,#[/TAG][/VAR]\r
|
||||
|
||||
<table>\r
|
||||
|
||||
<tr><th>Partecipante</th><th>Importo (EUR)</th></tr>\r
|
||||
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname=\"ripartizioniNominativiWithSep\" /][/CONDITION][THEN]\r
|
||||
|
||||
\ [VAR name=\"ripartizioniNominativiIterable\" type=\"iterable\"][SPLIT regex=\"#\"][VALUE_OF varname=\"ripartizioniNominativiWithSep\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioniImportiIterable\" type=\"iterable\"][SPLIT regex=\"#\"][VALUE_OF varname=\"ripartizioniImportiWithSep\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioniCount\" type=\"number\"][SIZE_OF varname=\"ripartizioniNominativiIterable\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneIdx\" type=\"string\"][% ripartizioneIdx = 0; %][/VAR]\r
|
||||
|
||||
\ [VAR name=\"firstItem\" type=\"number\"][% firstItem = 0; %][/VAR]\r
|
||||
|
||||
\ [VAR name=\"secondItem\" type=\"number\"][% secondItem = 1; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\r
|
||||
|
||||
\ [FOR varName=\"ripartizione\" iterable=\"ripartizioniNominativiIterable\"]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativoFull\" type=\"string\"][VALUE_OF varname=\"ripartizioniNominativiIterable\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneImporto\" type=\"string\"][VALUE_OF varname=\"ripartizioniImportiIterable\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativoIterable\" type=\"iterable\"][SPLIT regex=\"] \"][TRIM][VALUE_OF varname=\"ripartizioneNominativoFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativo\" type=\"string\"][VALUE_OF varname=\"ripartizioneNominativoIterable\" index=\"secondItem\" /][/VAR]\r
|
||||
|
||||
\ [% ripartizioneIdx = ripartizioneIdx + 1; %]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneKeyIterable\" type=\"iterable\"][SPLIT regex=\"\\.\"][% ripartizioneIdx + \"\" %][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneKey\" type=\"string\"][VALUE_OF varname=\"ripartizioneKeyIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\ <tr><td>[VALUE_OF varname=\"ripartizioneNominativo\" /]</td><td>[VALUE_OF varname=\"ripartizioneImporto\" /]</td></tr>\r
|
||||
|
||||
\ [/FOR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!--\r
|
||||
|
||||
\ [WHILE threshold=\"99\"]\r
|
||||
|
||||
\ [CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION]\r
|
||||
|
||||
\ [DO]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativoFull\" type=\"string\"][VALUE_OF varname=\"ripartizioniNominativiIterable\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneImporto\" type=\"string\"][VALUE_OF varname=\"ripartizioniImportiIterable\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativoIterable\" type=\"iterable\"][SPLIT regex=\"] \"][TRIM][VALUE_OF varname=\"ripartizioneNominativoFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativo\" type=\"string\"][VALUE_OF varname=\"ripartizioneNominativoIterable\" index=\"secondItem\" /][/VAR]\r
|
||||
|
||||
\ [% ripartizioneIdx = ripartizioneIdx + 1; %]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneKeyIterable\" type=\"iterable\"][SPLIT regex=\"\\.\"][% ripartizioneIdx + \"\" %][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneKey\" type=\"string\"][VALUE_OF varname=\"ripartizioneKeyIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
<tr><td>[VALUE_OF varname=\"ripartizioneNominativo\" /]</td><td>[VALUE_OF varname=\"ripartizioneImporto\" /]</td></tr>\r
|
||||
|
||||
\ [/DO]\r
|
||||
|
||||
\ [/WHILE]\r
|
||||
|
||||
\ --]\r
|
||||
|
||||
[/THEN][/IF]\r
|
||||
|
||||
</table>\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[!--
|
||||
[WHILE threshold="99"]
|
||||
[CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION]
|
||||
[DO]
|
||||
[VAR name="ripartizioneNominativoFull" type="string"][VALUE_OF varname="ripartizioniNominativiIterable" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneImporto" type="string"][VALUE_OF varname="ripartizioniImportiIterable" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneNominativoIterable" type="iterable"][SPLIT regex="] "][TRIM][VALUE_OF varname="ripartizioneNominativoFull" /][/TRIM][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneNominativo" type="string"][VALUE_OF varname="ripartizioneNominativoIterable" index="secondItem" /][/VAR]
|
||||
[% ripartizioneIdx = ripartizioneIdx + 1; %]
|
||||
[VAR name="ripartizioneKeyIterable" type="iterable"][SPLIT regex="\."][% ripartizioneIdx + "" %][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneKey" type="string"][VALUE_OF varname="ripartizioneKeyIterable" index="firstItem" /][/VAR]
|
||||
<tr><td>[VALUE_OF varname="ripartizioneNominativo" /]</td><td>[VALUE_OF varname="ripartizioneImporto" /]</td></tr>
|
||||
[/DO]
|
||||
[/WHILE]
|
||||
--]
|
||||
[/THEN][/IF]
|
||||
</table>
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+49
-94
@@ -13,115 +13,70 @@ http:
|
||||
value: "{{elixFormsWsAuthenticationToken}}"
|
||||
- name: x-ef-request-id
|
||||
value: "19758"
|
||||
disabled: true
|
||||
- name: x-ef-request-id
|
||||
value: "23629"
|
||||
disabled: true
|
||||
- name: x-ef-request-id
|
||||
value: "23761"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
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="ripartizioniNominativiWithSep" type="string"][TAG]SCHEMAID,538,COL0005,ID_OBJECT,,#[/TAG][/VAR]
|
||||
[VAR name="ripartizioniImportiWithSep" type="string"][TAG]SCHEMAID,538,COL0002,ID_OBJECT,,#[/TAG][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
[%= "<table><tr><th>Partecipante</th><th>Importo (EUR)</th></tr>" %]
|
||||
|
||||
[EFTL]\r
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname="ripartizioniNominativiWithSep" /][/CONDITION][THEN]
|
||||
[VAR name="ripartizioniNominativiIterable" type="iterable"][SPLIT regex="#" emptyIfBlank="true"][VALUE_OF varname="ripartizioniNominativiWithSep" /][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioniImportiIterable" type="iterable" emptyIfBlank="true"][SPLIT regex="#"][VALUE_OF varname="ripartizioniImportiWithSep" /][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioniCount" type="number"][SIZE_OF varname="ripartizioniNominativiIterable" /][/VAR]
|
||||
[VAR name="ripartizioneIdx" type="string"][% ripartizioneIdx = 0; %][/VAR]
|
||||
[VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR]
|
||||
[VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR]
|
||||
|
||||
[HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
[WHILE threshold="99"]
|
||||
[CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION]
|
||||
[DO]
|
||||
[VAR name="ripartizioneNominativoFull" type="string"][VALUE_OF varname="ripartizioniNominativiIterable" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneImporto" type="number"][VALUE_OF varname="ripartizioniImportiIterable" index="ripartizioneIdx" /][/VAR]
|
||||
[VAR name="ripartizioneNominativoIterable" type="iterable"][SPLIT regex="] "][TRIM][VALUE_OF varname="ripartizioneNominativoFull" /][/TRIM][/SPLIT][/VAR]
|
||||
|
||||
[VAR name=\"ripartizioniNominativiWithSep\" type=\"string\"][TAG]SCHEMAID,538,COL0005,ID_OBJECT,,#[/TAG][/VAR]\r
|
||||
[!-- Recupera il nominativo --]
|
||||
[VAR name="ripartizioneNominativo" type="string"][VALUE_OF varname="ripartizioneNominativoIterable" index="secondItem" /][/VAR]
|
||||
|
||||
[VAR name=\"ripartizioniImportiWithSep\" type=\"string\"][TAG]SCHEMAID,538,COL0002,ID_OBJECT,,#[/TAG][/VAR]\r
|
||||
[% ripartizioneIdx = ripartizioneIdx + 1; %]
|
||||
|
||||
[VAR name=\"tabellaRipartizioni\" type=\"string\"][% tabellaRipartizioni = \"<table><tr><th>Partecipante</th><th>Importo (EUR)</th></tr>\"; %][/VAR]\r
|
||||
[!-- HACK ignobile per recuperare il numero che altrimenti verrebbe emesso come "1.0", etc... --]
|
||||
[VAR name="ripartizioneKeyIterable" type="iterable"][SPLIT regex="\."][% ripartizioneIdx + "" %][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioneKey" type="string"][VALUE_OF varname="ripartizioneKeyIterable" index="firstItem" /][/VAR]
|
||||
|
||||
\r
|
||||
[%= "<tr><td>" + ripartizioneNominativo + "</td><td>" %][FORMAT type="number" pattern="#,##0.00"][% ripartizioneImporto %][/FORMAT][%= "</td></tr>" %]
|
||||
[/DO]
|
||||
[/WHILE]
|
||||
[/THEN][/IF]
|
||||
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname=\"ripartizioniNominativiWithSep\" /][/CONDITION][THEN]\r
|
||||
|
||||
\ [VAR name=\"ripartizioniNominativiIterable\" type=\"iterable\"][SPLIT regex=\"#\"][VALUE_OF varname=\"ripartizioniNominativiWithSep\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioniImportiIterable\" type=\"iterable\"][SPLIT regex=\"#\"][VALUE_OF varname=\"ripartizioniImportiWithSep\" /][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioniCount\" type=\"number\"][SIZE_OF varname=\"ripartizioniNominativiIterable\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneIdx\" type=\"string\"][% ripartizioneIdx = 0; %][/VAR]\r
|
||||
|
||||
\ [VAR name=\"firstItem\" type=\"number\"][% firstItem = 0; %][/VAR]\r
|
||||
|
||||
\ [VAR name=\"secondItem\" type=\"number\"][% secondItem = 1; %][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [WHILE threshold=\"99\"]\r
|
||||
|
||||
\ [CONDITION][% ripartizioneIdx != ripartizioniCount %][/CONDITION]\r
|
||||
|
||||
\ [DO]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativoFull\" type=\"string\"][VALUE_OF varname=\"ripartizioniNominativiIterable\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneImporto\" type=\"string\"][VALUE_OF varname=\"ripartizioniImportiIterable\" index=\"ripartizioneIdx\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativoIterable\" type=\"iterable\"][SPLIT regex=\"] \"][TRIM][VALUE_OF varname=\"ripartizioneNominativoFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- Recupera il nominativo --]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneNominativo\" type=\"string\"][VALUE_OF varname=\"ripartizioneNominativoIterable\" index=\"secondItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% ripartizioneIdx = ripartizioneIdx + 1; %]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [!-- HACK ignobile per recuperare il numero che altrimenti verrebbe emesso come \"1.0\", etc... --]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneKeyIterable\" type=\"iterable\"][SPLIT regex=\"\\.\"][% ripartizioneIdx + \"\" %][/SPLIT][/VAR]\r
|
||||
|
||||
\ [VAR name=\"ripartizioneKey\" type=\"string\"][VALUE_OF varname=\"ripartizioneKeyIterable\" index=\"firstItem\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
\ [% tabellaRipartizioni = tabellaRipartizioni + \"<tr><td>\" + ripartizioneNominativo + \"</td><td>\" + ripartizioneImporto + \"</td></tr>\"; %]\r
|
||||
|
||||
\ [/DO]\r
|
||||
|
||||
\ [/WHILE]\r
|
||||
|
||||
[/THEN][/IF]\r
|
||||
|
||||
[% tabellaRipartizioni = tabellaRipartizioni + \"</table>\"; %]\r
|
||||
|
||||
[%= tabellaRipartizioni %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= "</table>" %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+38
-76
@@ -15,87 +15,49 @@ http:
|
||||
value: "19375"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
|
||||
[VAR name=\"elencoPartecipantiDebug\" type=\"string\"][% elencoPartecipantiDebug = \"\"; %][/VAR]\r
|
||||
|
||||
[VAR name=\"elencoPartecipantiCompleto\" type=\"string\"][% elencoContraentiCompleto = \"\"; %][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanti\" type=\"string\"][TRIM][TAG]SCHEMAID,542,COL0018,IUQOID, , [/TAG][/TRIM][/VAR]\r
|
||||
|
||||
[%= \"\" %]\r
|
||||
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname=\"partecipanti\" /][/CONDITION][THEN]\r
|
||||
|
||||
[VAR name=\"partecipantiSplit\" type=\"iterable\"][SPLIT regex=\"\\n\"][VALUE_OF varname=\"partecipanti\" /][/SPLIT][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipantiCount\" type=\"number\"][SIZE_OF varname=\"partecipantiSplit\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanteIdx\" type=\"number\"][% partecipanteIdx = 0; %][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanteNominativoIdx\" type=\"number\"][% partecipanteNominativoIdx = 0; %][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanteRestoIdx\" type=\"number\"][% partecipanteRestoIdx = 1; %][/VAR]\r
|
||||
|
||||
[WHILE threshold=\"99\"][CONDITION][% partecipanteIdx < partecipantiCount %][/CONDITION][DO]\r
|
||||
|
||||
[VAR name=\"partecipanteFull\" type=\"string\"][VALUE_OF varname=\"partecipantiSplit\" index=\"partecipanteIdx\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanteSplit\" type=\"iterable\"][SPLIT regex=\", CF: \"][TRIM][VALUE_OF varname=\"partecipanteFull\" /][/TRIM][/SPLIT][/VAR]\r
|
||||
|
||||
[!-- Recupera il nominativo --]\r
|
||||
|
||||
[VAR name=\"partecipanteNominativo\" type=\"string\"][VALUE_OF varname=\"partecipanteSplit\" index=\"partecipanteNominativoIdx\" /][/VAR]\r
|
||||
|
||||
[!-- Recupera il codice fiscale --]\r
|
||||
|
||||
[VAR name=\"partecipanteResto\" type=\"string\"][VALUE_OF varname=\"partecipanteSplit\" index=\"partecipanteRestoIdx\" /][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanteRestoSplit\" type=\"iterable\"][SPLIT regex=\", Qualifica: \"][VALUE_OF varname=\"partecipanteResto\" /][/SPLIT][/VAR]\r
|
||||
|
||||
[VAR name=\"partecipanteCodiceFiscale\" type=\"string\"][VALUE_OF varname=\"partecipanteRestoSplit\" index=\"partecipanteNominativoIdx\" /][/VAR]\r
|
||||
|
||||
[%= \"[\" %][FORMAT type=\"number\" pattern=\"integer\"][% partecipanteIdx + 1 %][/FORMAT][%= \"] \" + partecipanteNominativo + \" (CF: \" + partecipanteCodiceFiscale + \")\" %]\r
|
||||
|
||||
[% partecipanteIdx = partecipanteIdx + 1; %]\r
|
||||
|
||||
[/DO][/WHILE]\r
|
||||
|
||||
[/THEN][/IF]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
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="elencoPartecipantiDebug" type="string"][% elencoPartecipantiDebug = ""; %][/VAR]
|
||||
[VAR name="elencoPartecipantiCompleto" type="string"][% elencoContraentiCompleto = ""; %][/VAR]
|
||||
[VAR name="partecipanti" type="string"][TRIM][TAG]SCHEMAID,542,COL0018,IUQOID, , [/TAG][/TRIM][/VAR]
|
||||
[%= "" %]
|
||||
[IF][CONDITION][IS_NOT_EMPTY varname="partecipanti" /][/CONDITION][THEN]
|
||||
[VAR name="partecipantiSplit" type="iterable"][SPLIT regex="\n"][VALUE_OF varname="partecipanti" /][/SPLIT][/VAR]
|
||||
[VAR name="partecipantiCount" type="number"][SIZE_OF varname="partecipantiSplit" /][/VAR]
|
||||
[VAR name="partecipanteIdx" type="number"][% partecipanteIdx = 0; %][/VAR]
|
||||
[VAR name="partecipanteNominativoIdx" type="number"][% partecipanteNominativoIdx = 0; %][/VAR]
|
||||
[VAR name="partecipanteRestoIdx" type="number"][% partecipanteRestoIdx = 1; %][/VAR]
|
||||
[WHILE threshold="99"][CONDITION][% partecipanteIdx < partecipantiCount %][/CONDITION][DO]
|
||||
[VAR name="partecipanteFull" type="string"][VALUE_OF varname="partecipantiSplit" index="partecipanteIdx" /][/VAR]
|
||||
[VAR name="partecipanteSplit" type="iterable"][SPLIT regex=", CF: "][TRIM][VALUE_OF varname="partecipanteFull" /][/TRIM][/SPLIT][/VAR]
|
||||
[!-- Recupera il nominativo --]
|
||||
[VAR name="partecipanteNominativo" type="string"][VALUE_OF varname="partecipanteSplit" index="partecipanteNominativoIdx" /][/VAR]
|
||||
[!-- Recupera il codice fiscale --]
|
||||
[VAR name="partecipanteResto" type="string"][VALUE_OF varname="partecipanteSplit" index="partecipanteRestoIdx" /][/VAR]
|
||||
[VAR name="partecipanteRestoSplit" type="iterable"][SPLIT regex=", Qualifica: "][VALUE_OF varname="partecipanteResto" /][/SPLIT][/VAR]
|
||||
[VAR name="partecipanteCodiceFiscale" type="string"][VALUE_OF varname="partecipanteRestoSplit" index="partecipanteNominativoIdx" /][/VAR]
|
||||
[%= "[" %][FORMAT type="number" pattern="integer"][% partecipanteIdx + 1 %][/FORMAT][%= "] " + partecipanteNominativo + " (CF: " + partecipanteCodiceFiscale + ")" %]
|
||||
[% partecipanteIdx = partecipanteIdx + 1; %]
|
||||
[/DO][/WHILE]
|
||||
[/THEN][/IF]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
info:
|
||||
name: Get year from date
|
||||
type: http
|
||||
seq: 20
|
||||
|
||||
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: "23663"
|
||||
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" /]
|
||||
[TAG]SCHEMAID,709,COL0117,IUQOID, , ,,YYYY[/TAG]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
info:
|
||||
name: Notifiche email partecipanti - Body
|
||||
type: http
|
||||
seq: 22
|
||||
|
||||
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: "23761"
|
||||
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" /]
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||
<style>
|
||||
.intestazione { padding: 0 0 10px 0; margin: 0; font-family: Arial, Sans-serif; font-size: 16px; font-weight: bold; color: #222; }
|
||||
.warning { padding: 15px; border: 1px solid transparent; border-radius: 4px; background-position: 15px 15px; color: #8A6D3B; background-color: #FCF8E3; border-color: #FAEBCC; }
|
||||
.riepilogo { width: 100%; font-family: Arial, Sans-serif; border: 1px solid #ccc; border-width: 1px; background-color: #fff; }
|
||||
.etichetta { padding: 0 1em 10px 0; font-family: Arial, Sans-serif; font-size: 13px; font-style: normal; color: #888; white-space: nowrap; vertical-align: top; }
|
||||
.valore { padding-bottom: 10px; font-family: Arial, Sans-serif; font-size: 13px; color: #222; vertical-align: top; }
|
||||
.footer { background-color: #f6f6f6; color: #888; border-top: 1px solid #ccc; font-family: Arial, Sans-serif; font-size: 11px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table cellspacing="0" cellpadding="8" border="0" summary="" class="riepilogo"><tbody><tr><td><div style="padding: 2px;">
|
||||
|
||||
<h3 class="intestazione">Notifica domanda inoltrata di Proposta Ripartizione Utili / Compensi</h3>
|
||||
<table cellpadding="0" cellspacing="0" border="0"><tbody>
|
||||
<tr><td colspan="2" class="valore">
|
||||
<div class="warning">È necessario compilare la DSAN collegata all'istanza del modulo "Ripartizione Utili / Compensi - Presentazione Proposta" i cui dati sono riportati nel seguito!</div>
|
||||
</td></tr>
|
||||
<tr><td colspan="2" class="valore">Riepilogo dei dati della Proposta</td></tr>
|
||||
<tr><td colspan="2" class="valore"></td></tr>
|
||||
<tr>
|
||||
<td class="etichetta"><div>Domanda n.</div></td>
|
||||
<td class="valore">[%= requestId %]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="etichetta"><div>Numero ricevuta</div></td>
|
||||
<td class="valore">[TAG]SCHEMAID,17,COL0027,IUQOID, , [/TAG]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="etichetta"><div>Responsabile Scientifico proponente</div></td>
|
||||
<td class="valore">[TAG]GETVALUEBYTAG,RSP_TITOLO,REQUEST,ID_OBJECT[/TAG] [TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,ID_OBJECT[/TAG] [TAG]GETVALUEBYTAG,RSP_NOME,REQUEST,ID_OBJECT[/TAG]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="etichetta"><div>Codice contratto</div></td>
|
||||
<td class="valore">[TAG]GETVALUEBYTAG,ID_CONTRATTO,REQUEST,ID_OBJECT[/TAG]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="etichetta"><div>Data di inoltro</div></td>
|
||||
<td class="valore">[TAG]SCHEMAID,17,COL0013,IUQOID, , [/TAG]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="etichetta"><div>Modulo</div></td>
|
||||
<td class="valore">Ripartizione Utili / Compensi - Presentazione Proposta</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" class="valore"><br/>Collegati al modulo <a href="https://procedure.unipr.it/rwe2/module_preview.jsp?MODULE_TAG=RIPARTIZIONE_CCT_DSAN">Ripartizione Utili / Compensi - DSAN</a> per compilare e inoltrare la domanda.</td></tr>
|
||||
</tbody></table>
|
||||
|
||||
</div></td></tr></tbody></table>
|
||||
<table cellspacing="0" cellpadding="8" border="0" summary="" class="riepilogo"><tbody><tr><td class="footer">
|
||||
Questo messaggio è stato inoltrato automaticamente dal sistema elixForms. Si prega di <span style="text-decoration: underline">non rispondere via email</span>.
|
||||
<br>
|
||||
Per eventuali richieste di supporto, collegarsi all'area utente e utilizzare il servizio di " contatta il supporto".
|
||||
</td></tr></tbody></table>
|
||||
</body>
|
||||
</html>
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
info:
|
||||
name: Notifiche email partecipanti - Subject
|
||||
type: http
|
||||
seq: 21
|
||||
|
||||
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: "23761"
|
||||
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" /]
|
||||
*** https://procedure.unipr.it - Richiesta compilazione DSAN per Ripartizione Utili / Compensi - Contratto [TAG]GETVALUEBYTAG,ID_CONTRATTO,REQUEST,ID_OBJECT[/TAG] ***
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
+3
-6
@@ -32,8 +32,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = String.raw`
|
||||
prepareEftlDocument(String.raw`
|
||||
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
|
||||
[VAR name="newline"][% newline = ""; %][/VAR]
|
||||
[VAR name="codiceFiscaleProponente"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
@@ -54,11 +55,7 @@ runtime:
|
||||
[%= newline %]
|
||||
[%= ripartizioniCount %]
|
||||
[/EFTL]
|
||||
`;
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);
|
||||
|
||||
bru.setVar("elixBase64EftlDocument", base64EncodedDocument);
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+23
-37
@@ -13,51 +13,37 @@ http:
|
||||
value: "{{elixFormsWsAuthenticationToken}}"
|
||||
- name: x-ef-request-id
|
||||
value: "19758"
|
||||
disabled: true
|
||||
- name: x-ef-request-id
|
||||
value: "23761"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
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="ripartizioniIterable" type="iterable"][SPLIT regex="#" emptyIfBlank="true"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,CONCAT,#[/TAG][/SPLIT][/VAR]
|
||||
[VAR name="ripartizioniCount" type="string"][SIZE_OF varname="ripartizioniIterable" /][/VAR]
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
|
||||
[VAR name=\"ripartizioniIterable\" type=\"iterable\"][SPLIT regex=\"#\"][TAG]SCHEMAID,538,COL0005,ID_OBJECT,,#[/TAG][/SPLIT][/VAR]\r
|
||||
|
||||
[VAR name=\"ripartizioniCount\" type=\"string\"][SIZE_OF varname=\"ripartizioniIterable\" /][/VAR]\r
|
||||
|
||||
\r
|
||||
|
||||
[%= ripartizioniCount %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
[%= ripartizioniCount %]
|
||||
[%= crlf %]
|
||||
[%= ripartizioniIterable %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
info:
|
||||
name: Partecipanti HAS DSAN
|
||||
type: http
|
||||
seq: 23
|
||||
|
||||
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: "24075"
|
||||
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="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR]
|
||||
[VAR name="lastUpdatedNominativo" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR]
|
||||
[VAR name="hasDSAN" type="string"][% hasDSAN = "1"; %][/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]
|
||||
|
||||
[!--
|
||||
[%= richiedenteCF %]
|
||||
[%= crlf %]
|
||||
[%= lastUpdatedNominativoCF %]
|
||||
[% richiedenteCF = ""; %]
|
||||
--]
|
||||
|
||||
[IF]
|
||||
[CONDITION][% lastUpdatedNominativoCF != "" && lastUpdatedNominativoCF == richiedenteCF %][/CONDITION]
|
||||
[THEN][% hasDSAN = "0"; %][/THEN]
|
||||
[/IF]
|
||||
|
||||
[%= hasDSAN %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
+3
-6
@@ -30,8 +30,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = String.raw`
|
||||
prepareEftlDocument(String.raw`
|
||||
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
|
||||
[!-- Must be defined in EftlSolver attribute! --]
|
||||
[VAR name="newLine" type="string"][VALUE_OF varname="crlf" /][/VAR]
|
||||
@@ -75,11 +76,7 @@ runtime:
|
||||
[%= newLine %]
|
||||
[%= responsabiliScientifici + newLine + partecipanti %]
|
||||
[/EFTL]
|
||||
`;
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);
|
||||
|
||||
bru.setVar("elixBase64EftlDocument", base64EncodedDocument);
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+19
-38
@@ -15,49 +15,30 @@ http:
|
||||
value: "19758"
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"userDocument\": \"{{elixBase64EftlDocument}}\", // see the pre-request script\r
|
||||
|
||||
\ \"userContext\": {\r
|
||||
|
||||
\ \"lang\": \"IT\",\r
|
||||
|
||||
\ \"crlf\": \"\\r\\n\"\r
|
||||
|
||||
\ }\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "// Copy-pasta your EFTL document below inside the template literals (`)\r
|
||||
|
||||
var eftlDocumentToBeProcessed = String.raw`\r
|
||||
|
||||
[EFTL][HEADER name=\"trimDocument\" value=\"true\" type=\"boolean\" /]\r
|
||||
|
||||
[VAR name=\"rspTitolo\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_TITOLO,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"rspCognome\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[VAR name=\"rspNome\" type=\"string\"][TAG]GETVALUEBYTAG,RSP_NOME,REQUEST,IUQOID[/TAG][/VAR]\r
|
||||
|
||||
[%= rspTitolo + \" \" + rspCognome + \" \" rspNome %]\r
|
||||
|
||||
[/EFTL]\r
|
||||
|
||||
`;\r
|
||||
|
||||
\r
|
||||
|
||||
var base64EncodedDocument = btoa(eftlDocumentToBeProcessed);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixBase64EftlDocument\", base64EncodedDocument);"
|
||||
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="rspTitolo" type="string"][TAG]GETVALUEBYTAG,RSP_TITOLO,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="rspCognome" type="string"][TAG]GETVALUEBYTAG,RSP_COGNOME,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="rspNome" type="string"][TAG]GETVALUEBYTAG,RSP_NOME,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[%= rspTitolo + " " + rspCognome + " " rspNome %]
|
||||
[/EFTL]
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+6
-2
@@ -19,6 +19,9 @@ http:
|
||||
disabled: true
|
||||
- name: x-ef-request-id
|
||||
value: "23663"
|
||||
disabled: true
|
||||
- name: x-ef-request-id
|
||||
value: "23698"
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
@@ -36,8 +39,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw`
|
||||
prepareEftlDocument(String.raw`
|
||||
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
|
||||
|
||||
[VAR name="codiceFiscaleRichiedente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
@@ -60,7 +64,7 @@ runtime:
|
||||
|
||||
[%= importoRichiedente %]
|
||||
[/EFTL]
|
||||
`));
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+3
-2
@@ -35,8 +35,9 @@ runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
const { prepareEftlDocument } = require("./elixFormsJs.js")
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw`
|
||||
prepareEftlDocument(String.raw`
|
||||
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
|
||||
|
||||
[VAR name="lastUpdatedNominativo" type="string"][TAG]GETVALUEBYTAG,PARTECIPANTE,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR]
|
||||
@@ -51,7 +52,7 @@ runtime:
|
||||
|
||||
[%= lastUpdatedNominativoCF + ":" + lastUpdatedImporto %]
|
||||
[/EFTL]
|
||||
`));
|
||||
`);
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
Reference in New Issue
Block a user