View Module Export Code
JSON
{
"subflows": [
{
"flow": [
{
"id": 1,
"module": "util:SetVariables",
"version": 1,
"parameters": {},
"mapper": {
"variables": [
{
"name": "text",
"value": "Lorem ipsum test sit amet, hello adipiscing elit, sed do eiusmod tempor incididunt ut labore et test magna aliqua. Ut enim ad minim hello, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea test hello. Duis aute irure test in reprehenderit in voluptate velit esse cillum test hello fugiat nulla pariatur. Excepteur sint occaecat cupidatat test proident, sunt in culpa qui officia deserunt hello anim id est hello."
},
{
"name": "searchArray",
"value": "{{split(\"test|hello\"; \"|\")}}"
},
{
"name": "replaceArray",
"value": "{{split(\"SUCCESS|GOODBYE\"; \"|\")}}"
}
],
"scope": "roundtrip"
},
"metadata": {
"designer": {
"x": -560,
"y": -128,
"name": "Set Text, Search, Replace vars"
},
"restore": {
"expect": {
"variables": {
"items": [
null,
null,
null
]
},
"scope": {
"label": "One cycle"
}
}
},
"expect": [
{
"name": "variables",
"type": "array",
"label": "Variables",
"spec": [
{
"name": "name",
"label": "Variable name",
"type": "text",
"required": true
},
{
"name": "value",
"label": "Variable value",
"type": "any"
}
]
},
{
"name": "scope",
"type": "select",
"label": "Variable lifetime",
"required": true,
"validate": {
"enum": [
"roundtrip",
"execution"
]
}
}
],
"interface": [
{
"name": "text",
"label": "text",
"type": "any"
},
{
"name": "searchArray",
"label": "searchArray",
"type": "any"
},
{
"name": "replaceArray",
"label": "replaceArray",
"type": "any"
}
]
}
},
{
"id": 2,
"module": "builtin:BasicRepeater",
"version": 1,
"parameters": {},
"mapper": {
"step": "1",
"start": "1",
"repeats": "{{if(length(1.searchArray) = length(1.replaceArray); length(1.searchArray); null)}}"
},
"metadata": {
"designer": {
"x": -336,
"y": -129,
"name": "Replace ALL"
},
"restore": {},
"expect": [
{
"name": "start",
"type": "number",
"label": "Initial value",
"required": true
},
{
"name": "repeats",
"type": "number",
"label": "Repeats",
"required": true,
"validate": {
"max": 10000,
"min": 0
}
},
{
"name": "step",
"type": "number",
"label": "Step",
"required": true
}
]
}
},
{
"id": 3,
"module": "util:GetVariable2",
"version": 1,
"parameters": {},
"mapper": {
"name": "text"
},
"metadata": {
"designer": {
"x": -114,
"y": -128,
"name": "Get current replaced text"
},
"restore": {},
"expect": [
{
"name": "name",
"type": "text",
"label": "Variable name",
"required": true
}
],
"interface": [
{
"name": "text",
"type": "any",
"label": "text"
}
]
}
},
{
"id": 4,
"module": "util:SetVariable2",
"version": 1,
"parameters": {},
"mapper": {
"name": "text",
"scope": "roundtrip",
"value": "{{replace(3.text; 1.searchArray[2.i]; 1.replaceArray[2.i])}}"
},
"metadata": {
"designer": {
"x": 109,
"y": -129,
"name": "Perform replace"
},
"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": "text",
"type": "any",
"label": "text"
}
]
}
},
{
"id": 5,
"module": "util:TextAggregator",
"version": 1,
"parameters": {
"feeder": 2,
"rowSeparator": "other",
"otherRowSeparator": ""
},
"mapper": {
"value": "{{if(2.i != length(1.searchArray); emptystring; 4.text)}}"
},
"metadata": {
"designer": {
"x": 329,
"y": -128,
"name": "Get final replace result",
"messages": [
{
"category": "last",
"severity": "warning",
"message": "A transformer should not be the last module in the route."
}
]
},
"restore": {
"extra": {
"feeder": {
"label": "Replace ALL"
}
},
"flags": {
"groupBy": {
"collapsed": true
},
"stopIfEmpty": {
"collapsed": true
}
},
"parameters": {
"rowSeparator": {
"label": "Other"
}
}
},
"parameters": [
{
"name": "rowSeparator",
"type": "select",
"label": "Row separator",
"validate": {
"enum": [
"\n",
"\t",
"other"
]
}
},
{
"name": "otherRowSeparator",
"type": "text",
"label": "Separator"
}
],
"expect": [
{
"name": "value",
"type": "text",
"label": "Text"
}
],
"advanced": true
}
}
]
}
],
"metadata": {
"version": 1
}
}