77 lines
2.9 KiB
YAML
77 lines
2.9 KiB
YAML
info:
|
|
name: Richiedente ammesso ADVANCED
|
|
type: http
|
|
seq: 11
|
|
|
|
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: "31555"
|
|
body:
|
|
type: json
|
|
data: |-
|
|
{
|
|
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
|
"userContext": {
|
|
"lang": "IT",
|
|
"crlf": "\r\n",
|
|
"useTestCF": false
|
|
}
|
|
}
|
|
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="checkUtentePartecipante" type="string"][% checkUtentePartecipante = "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="ripartizioniDatiCompleti" type="string"][TAG]GETVALUEBYTAG,RIPARTIZIONE_DATI_COMPLETI,REQUEST,IUQOID[/TAG][/VAR]
|
|
|
|
[!-- ATTENZIONE: gli ELSEIF non rispettano la logica di esclusione dei blocchi! Lasciare le condizioni in questo ordine! --]
|
|
[!-- 1. Il richiedente non deve essere vuoto --]
|
|
[!-- 2. Il richiedente deve comparire fra le ripartizioni --]
|
|
[!-- 3. Il richiedente può eventualmente comparire fra i nominativi ammessi (DEBUG) --]
|
|
[!-- 4. Il richiedente non deve essere il RS che ha presentato la Proposta --]
|
|
[IF]
|
|
[CONDITION][IS_EMPTY varname="richiedenteCF" /][/CONDITION]
|
|
[THEN][% checkUtentePartecipante = "Nessun richiedente trovato"; %][/THEN]
|
|
[ELSE IF]
|
|
[CONDITION][CONTAINS varname="ripartizioniDatiCompleti"];;[VALUE_OF varname="richiedenteCF" /];;[/CONTAINS][/CONDITION]
|
|
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
|
[/ELSE IF]
|
|
[ELSE IF]
|
|
[CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION]
|
|
[THEN][% checkUtentePartecipante = ""; %][/THEN]
|
|
[/ELSE IF]
|
|
[ELSE IF]
|
|
[CONDITION][% richiedenteCF == richiedentePropostaCF %][/CONDITION]
|
|
[THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente della Proposta non deve compilare la DSAN"; %][/THEN]
|
|
[/ELSE IF]
|
|
[/IF]
|
|
|
|
[%= checkUtentePartecipante %]
|
|
[/EFTL]
|
|
`);
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|
|
|
|
docs: |-
|
|
SchemaId 709
|
|
Campo COL0118
|