84 lines
3.0 KiB
YAML
84 lines
3.0 KiB
YAML
info:
|
|
name: Codici fiscali ripartizioni
|
|
type: http
|
|
seq: 26
|
|
|
|
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: "21223"
|
|
disabled: true
|
|
- name: x-ef-request-id
|
|
value: "21334"
|
|
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="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 name="ripartizioniJoin" type="string"][% ripartizioniJoin = ""; %][/VAR]
|
|
|
|
[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]
|
|
|
|
[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; %]
|
|
|
|
[% ripartizioneIdx = ripartizioneIdx + 1; %]
|
|
|
|
[IF][CONDITION][% ripartizioneIdx < ripartizioniCount %][/CONDITION][THEN]
|
|
[% ripartizioniJoin = ripartizioniJoin + "#"; %]
|
|
[/THEN][/IF]
|
|
[/DO]
|
|
[/WHILE]
|
|
[/THEN][/IF]
|
|
|
|
[!--
|
|
[%= ripartizioniCount %]
|
|
[%= crlf %]
|
|
[%= ripartizioneIdx %]
|
|
[%= crlf %]
|
|
[%= "JOIN: " ripartizioniJoin %]
|
|
--]
|
|
|
|
[%= ripartizioniJoin %]
|
|
[/EFTL]
|
|
`);
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|