Changes for page SetVar
Last modified by Outhman Moustaghfir on 2024/09/27 13:43
edited by Outhman Moustaghfir
on 2024/01/30 14:57
on 2024/01/30 14:57
edited by Outhman Moustaghfir
on 2024/01/30 15:04
on 2024/01/30 15:04
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 2 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,6 +2,8 @@ 2 2 3 3 == Overview == 4 4 5 +[[image:setvar.png]] 6 + 5 5 The SetVar connector is designed to set variables within a scenario by utilizing a JSON file. This connector allows users to define variables and even use dynamic values using expressions. 6 6 7 7 == Usage == ... ... @@ -8,6 +8,8 @@ 8 8 9 9 === JSON Format === 10 10 13 +[[image:Capture d'écran 2024-01-30 150237.png]] 14 + 11 11 The JSON file for SetVar has a simple structure. It consists of key-value pairs, where the keys represent variable names, and the values can be either static values or dynamic expressions. 12 12 13 13 ==== Example 1: ==== ... ... @@ -15,12 +15,11 @@ 15 15 {{{ 16 16 }}} 17 17 18 -{{code language=" XML"}}19 - SetVar(variable_name,value,global=False)22 +{{code language="json"}} 23 +{ "var1": "value1", "var2": "true" } 20 20 21 21 {{/code}} 22 22 23 -{ "var1": "value1", "var2": "true" } 24 24 25 25 ==== Example 2: ==== 26 26 ... ... @@ -27,12 +27,10 @@ 27 27 {{{ 28 28 }}} 29 29 30 -{{code language="XML"}} 31 -SetVar(variable_name, value, global=False) 32 - 33 +{{code language="json"}} 34 +{ "var1": "value1", "var2": "${GetVar;inputFile}", "nestedVar": { "nestedVar1": "val1", "nestedVar2": "val2" } } 33 33 {{/code}} 34 34 35 -{ "var1": "value1", "var2": "true", "inputFile1": "${GetVar;inputFile}", "nestedVar": { "nestedVar1": "val1", "nestedVar2": "val2" } } 36 36 37 37 === Dynamic Values === 38 38
- Capture d'écran 2024-01-30 150237.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.omoustaghfir - Size
-
... ... @@ -1,0 +1,1 @@ 1 +14.9 KB - Content
- setvar.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.omoustaghfir - Size
-
... ... @@ -1,0 +1,1 @@ 1 +3.6 KB - Content