Yes, that’s right. I even tested it myself to see if it works.
Module Export
You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.
-
Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the canvas.
-
Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.
JSON
{
"subflows": [
{
"flow": [
{
"id": 102,
"module": "util:SetVariable2",
"version": 1,
"parameters": {},
"mapper": {
"name": "code",
"scope": "roundtrip",
"value": "18129"
},
"metadata": {
"designer": {
"x": 853,
"y": -984
},
"restore": {
"expect": {
"scope": {
"label": "One cycle"
}
}
},
"expect": [
{
"name": "name",
"type": "text",
"label": "Variable name",
"required": true
},
{
"name": "scope",
"type": "select",
"label": "Variable lifetime",
"required": true,
"validate": {
"enum": [
"roundtrip",
"execution"
]
}
},
{
"name": "value",
"type": "any",
"label": "Variable value"
}
],
"interface": [
{
"name": "code",
"label": "code",
"type": "any"
}
]
}
},
{
"id": 103,
"module": "util:SetVariable2",
"version": 1,
"parameters": {},
"filter": {
"name": "is valid",
"conditions": [
[
{
"a": "{{add(emptyarray; 18129; 62020)}}",
"o": "array:contain",
"b": "{{102.code}}"
}
]
]
},
"mapper": {
"name": "valid",
"scope": "roundtrip",
"value": "{{true}}"
},
"metadata": {
"designer": {
"x": 1149,
"y": -985
},
"restore": {
"expect": {
"scope": {
"label": "One cycle"
}
}
},
"expect": [
{
"name": "name",
"type": "text",
"label": "Variable name",
"required": true
},
{
"name": "scope",
"type": "select",
"label": "Variable lifetime",
"required": true,
"validate": {
"enum": [
"roundtrip",
"execution"
]
}
},
{
"name": "value",
"type": "any",
"label": "Variable value"
}
],
"interface": [
{
"name": "valid",
"label": "valid",
"type": "any"
}
]
}
}
]
}
],
"metadata": {
"version": 1
}
}