elixFormsAPI - update syntax and add prepare global function
This commit is contained in:
+1
-2
@@ -137,7 +137,6 @@ examples:
|
||||
|
||||
docs: |-
|
||||
Viene ritornato l'esito dell'operazione di storicizzazione si elixForms©.
|
||||
La ricezione di "ok" o "ko" provocherà una decisione nel workflow semplice (analogo a quello di elixFlow©) in base a quanto disposto in
|
||||
elixForms per il modulo.
|
||||
La ricezione di "ok" o "ko" provocherà una decisione nel workflow semplice (analogo a quello di elixFlow©) in base a quanto disposto in elixForms per il modulo.
|
||||
Esempio="OK","VAL","..." imposta lo stato di workflow semplice corrispondente imposta lo step ad "evasa" notifica email
|
||||
Esempio="KO","KO","..." imposta lo stato di workflow semplice corrispondente non cambia lo stato dello step
|
||||
|
||||
@@ -22,31 +22,24 @@ http:
|
||||
type: path
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"clientUsername\": \"MMMPPL74T17E463A\", // string, <(*) username dell'utente che richiede la clonazione>\r
|
||||
|
||||
\ \"cloningReason\": \"Request cloning test\", // string, <(*) motivazione della copia>\r
|
||||
|
||||
\ \"cloningDate\": {{elixRequestCloningDate}}, // dateTime, <(*) data in formato ISO: \"2021-05-18T00:00:00\">\r
|
||||
|
||||
\ \"cloneLogId\": null // number, <generic id dello storico di clonazione eventualmente da aggiornare; se non specificato viene automaticamente generato un nuovo log (Scheda \"RW2 - Clone\")>\r
|
||||
|
||||
}"
|
||||
data: |-
|
||||
{
|
||||
"clientUsername": "MMMPPL74T17E463A", // string, <(*) username dell'utente che richiede la clonazione>
|
||||
"cloningReason": "Request cloning test", // string, <(*) motivazione della copia>
|
||||
"cloningDate": {{elixRequestCloningDate}}, // dateTime, <(*) data in formato ISO: "2021-05-18T00:00:00">
|
||||
"cloneLogId": null // number, <generic id dello storico di clonazione eventualmente da aggiornare; se non specificato viene automaticamente generato un nuovo log (Scheda "RW2 - Clone")>
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "var currentDate = new Date().toISOString();\r
|
||||
code: |-
|
||||
var currentDate = new Date().toISOString();
|
||||
|
||||
\r
|
||||
console.log(currentDate);
|
||||
|
||||
console.log(currentDate);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixRequestCloningDate\", JSON.stringify(currentDate));"
|
||||
bru.setVar("elixRequestCloningDate", JSON.stringify(currentDate));
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+15
-26
@@ -15,39 +15,28 @@ http:
|
||||
type: query
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"requestId\": 5102, // <(*) id della request>\r
|
||||
|
||||
\ \"clientUserId\": 29, // <id dell'utenza \"reale\", (non quella sistemistica) che ha generato la riapertura, i.e. utenza loggata>\r
|
||||
|
||||
\ \"reopeningReason\": \"string\", // <motivazine della riapertura>\r
|
||||
|
||||
\ \"reopeningNotificationDate\": {{elixReopeningNotificationDate}}, // <data in formato ISO: \"2021-05-18T00:00:00\"> (viene precalcolata dal pre-request script!)\r
|
||||
|
||||
\ \"reopenLogId\": null, // <se esiste un log di storicizzazione da aggiornare e si conosce il generic id della scheda; se non specificato logga l'operazione in nuova scheda>\r
|
||||
|
||||
\ \"reopeningAttachmentFileName\": null, // <nome del file in attach, i.e. miofile.pdf>\r
|
||||
|
||||
\ \"reopeningAttachmentMimeType\": null, // <mimetype del file in attach, i.e. \"application/pdf\">\r
|
||||
|
||||
\ \"reopeningAttachment\": null // <bytes del file in attach>\r
|
||||
|
||||
}\r\n"
|
||||
data: |
|
||||
{
|
||||
"requestId": 5102, // <(*) id della request>
|
||||
"clientUserId": 29, // <id dell'utenza "reale", (non quella sistemistica) che ha generato la riapertura, i.e. utenza loggata>
|
||||
"reopeningReason": "string", // <motivazine della riapertura>
|
||||
"reopeningNotificationDate": {{elixReopeningNotificationDate}}, // <data in formato ISO: "2021-05-18T00:00:00"> (viene precalcolata dal pre-request script!)
|
||||
"reopenLogId": null, // <se esiste un log di storicizzazione da aggiornare e si conosce il generic id della scheda; se non specificato logga l'operazione in nuova scheda>
|
||||
"reopeningAttachmentFileName": null, // <nome del file in attach, i.e. miofile.pdf>
|
||||
"reopeningAttachmentMimeType": null, // <mimetype del file in attach, i.e. "application/pdf">
|
||||
"reopeningAttachment": null // <bytes del file in attach>
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "var currentDate = new Date().toISOString();\r
|
||||
code: |-
|
||||
var currentDate = new Date().toISOString();
|
||||
|
||||
\r
|
||||
console.log(currentDate);
|
||||
|
||||
console.log(currentDate);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixReopeningNotificationDate\", JSON.stringify(currentDate));"
|
||||
bru.setVar("elixReopeningNotificationDate", JSON.stringify(currentDate));
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
@@ -15,39 +15,28 @@ http:
|
||||
type: query
|
||||
body:
|
||||
type: json
|
||||
data: "{\r
|
||||
|
||||
\ \"requestId\": 5102, // <(*) id della request>\r
|
||||
|
||||
\ \"clientUserId\": 29, // <id dell'utenza \"reale\", (non quella sistemistica) che ha generato la riapertura, i.e. utenza loggata>\r
|
||||
|
||||
\ \"reopeningReason\": \"string\", // <motivazine della riapertura>\r
|
||||
|
||||
\ \"reopeningNotificationDate\": {{elixReopeningNotificationDate}}, // <data in formato ISO: \"2021-05-18T00:00:00\"> (viene precalcolata dal pre-request script!)\r
|
||||
|
||||
\ \"reopenLogId\": null, // <se esiste un log di storicizzazione da aggiornare e si conosce il generic id della scheda; se non specificato logga l'operazione in nuova scheda>\r
|
||||
|
||||
\ \"reopeningAttachmentFileName\": null, // <nome del file in attach, i.e. miofile.pdf>\r
|
||||
|
||||
\ \"reopeningAttachmentMimeType\": null, // <mimetype del file in attach, i.e. \"application/pdf\">\r
|
||||
|
||||
\ \"reopeningAttachment\": null // <bytes del file in attach>\r
|
||||
|
||||
}\r\n"
|
||||
data: |
|
||||
{
|
||||
"requestId": 5102, // <(*) id della request>
|
||||
"clientUserId": 29, // <id dell'utenza "reale", (non quella sistemistica) che ha generato la riapertura, i.e. utenza loggata>
|
||||
"reopeningReason": "string", // <motivazine della riapertura>
|
||||
"reopeningNotificationDate": {{elixReopeningNotificationDate}}, // <data in formato ISO: "2021-05-18T00:00:00"> (viene precalcolata dal pre-request script!)
|
||||
"reopenLogId": null, // <se esiste un log di storicizzazione da aggiornare e si conosce il generic id della scheda; se non specificato logga l'operazione in nuova scheda>
|
||||
"reopeningAttachmentFileName": null, // <nome del file in attach, i.e. miofile.pdf>
|
||||
"reopeningAttachmentMimeType": null, // <mimetype del file in attach, i.e. "application/pdf">
|
||||
"reopeningAttachment": null // <bytes del file in attach>
|
||||
}
|
||||
auth: inherit
|
||||
|
||||
runtime:
|
||||
scripts:
|
||||
- type: before-request
|
||||
code: "var currentDate = new Date().toISOString();\r
|
||||
code: |-
|
||||
var currentDate = new Date().toISOString();
|
||||
|
||||
\r
|
||||
console.log(currentDate);
|
||||
|
||||
console.log(currentDate);\r
|
||||
|
||||
\r
|
||||
|
||||
bru.setVar(\"elixReopeningNotificationDate\", JSON.stringify(currentDate));"
|
||||
bru.setVar("elixReopeningNotificationDate", JSON.stringify(currentDate));
|
||||
|
||||
settings:
|
||||
encodeUrl: true
|
||||
|
||||
+1
-5
@@ -109,18 +109,14 @@ docs: |-
|
||||
The elixRegisterResultColumns variable must be built like the following:
|
||||
|
||||
- one index=value couple for every field in the SWF schema that must be updated, where index is the "name" of the schema field (e.g.: COL0003, if the field is found in the SWF schema) and the value is the string content that must be assigned
|
||||
|
||||
- each couple must be separated by a semi-period (\`;\` character)
|
||||
|
||||
|
||||
|
||||
For example, suppose the request has a SWF schema with ID 356, containing:
|
||||
|
||||
- State = COL0001
|
||||
|
||||
- Date = COL0002
|
||||
|
||||
- Email = COL0003
|
||||
|
||||
- Message = COL0004
|
||||
|
||||
|
||||
|
||||
-6
@@ -105,20 +105,14 @@ docs: |-
|
||||
The elixRegisterResultColumns variable must be built like the following:
|
||||
|
||||
- one index=value couple for every field in the SWF schema that must be updated, where index is the "name" of the schema field (e.g.: COL0003, if the field is found in the SWF schema) and the value is the string content that must be assigned
|
||||
|
||||
- each couple must be separated by a semi-period (\`;\` character)
|
||||
|
||||
|
||||
For example, suppose the request has a SWF schema with ID 356, containing:
|
||||
|
||||
- State = COL0001
|
||||
|
||||
- Date = COL0002
|
||||
|
||||
- Email = COL0003
|
||||
|
||||
- Message = COL0004
|
||||
|
||||
|
||||
If you want to change the CURRENT state's date and message values, you will put into the variable the following value:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user