add: elixFormsAPI check richiedente DSAN
This commit is contained in:
+88
@@ -0,0 +1,88 @@
|
||||
info:
|
||||
name: Nuovo check richiedente DSAN
|
||||
type: http
|
||||
seq: 19
|
||||
|
||||
http:
|
||||
method: POST
|
||||
url: "{{elixFormsApiUrl}}/eftl/process/v1"
|
||||
headers:
|
||||
- name: x-requested-with
|
||||
value: XMLHttpRequest
|
||||
- name: x-api-key
|
||||
value: "{{elixFormsWsAuthenticationToken}}"
|
||||
- name: x-ef-request-id
|
||||
value: "24281"
|
||||
body:
|
||||
type: json
|
||||
data: |-
|
||||
{
|
||||
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
||||
"userContext": {
|
||||
"lang": "IT",
|
||||
"crlf": "\r\n",
|
||||
"codiciFiscaliAmmessi": ";MMMPPL74T17E463A;"
|
||||
}
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: |-
|
||||
// Copy-pasta your EFTL document below inside the template literals (`)
|
||||
var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw`
|
||||
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
|
||||
[VAR name="checkUtentePartecipante" type="string"][% utentePartecipante = "Il richiedente non è ammesso alla compilazione perché non partecipa alle ripartizioni"; %][/VAR]
|
||||
[VAR name="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="richiedentePropostaCF" type="string"][TAG]GETVALUEBYTAG,PROPOSTA_RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
|
||||
[VAR name="coppieRipartizioniProposta" type="string"][TAG]GETVALUEBYTAG,COPPIE_RIPARTIZIONI,REQUEST,IUQOID,CONCAT,#[/TAG][/VAR]
|
||||
[VAR name="exitIf" type="boolean"][% exitIf = false; %][/VAR]
|
||||
|
||||
[!-- Il richiedente non deve essere il RS che ha presentato la Proposta --]
|
||||
[!-- Il richiedente deve comparire fra le ripartizioni --]
|
||||
[!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --]
|
||||
[IF]
|
||||
[CONDITION][IS_EMPTY varname="richiedenteCF" /][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "Nessun richiedente trovato"; exitIf = true; %][/THEN]
|
||||
[/IF]
|
||||
|
||||
[IF]
|
||||
[CONDITION][% exitIf == false %][/CONDITION]
|
||||
[THEN]
|
||||
[IF]
|
||||
[CONDITION][% richiedenteCF == richiedentePropostaCF %][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente della Proposta non deve compilare la DSAN"; exitIf = true; %][/THEN]
|
||||
[/IF]
|
||||
[/THEN]
|
||||
[/IF]
|
||||
|
||||
[IF]
|
||||
[CONDITION][% exitIf == false %][/CONDITION]
|
||||
[THEN]
|
||||
[IF]
|
||||
[CONDITION][CONTAINS varname="coppieRipartizioniProposta"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "trovato in coppie"; exitIf = true; %][/THEN]
|
||||
[/IF]
|
||||
[/THEN]
|
||||
[/IF]
|
||||
|
||||
[IF]
|
||||
[CONDITION][% exitIf == false %][/CONDITION]
|
||||
[THEN]
|
||||
[IF]
|
||||
[CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION]
|
||||
[THEN][% checkUtentePartecipante = "trovato in CF ammessi"; exitIf = true; %][/THEN]
|
||||
[/IF]
|
||||
[/THEN]
|
||||
[/IF]
|
||||
|
||||
[%= checkUtentePartecipante %]
|
||||
[/EFTL]
|
||||
`));
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
followRedirects: true
|
||||
maxRedirects: 5
|
||||
Reference in New Issue
Block a user