Current section
Files
Jump to
Current section
Files
examples/workflow9.json
[
{
"define_password": {
"call": "file.read",
"args": {
"input_path": "examples/password.json",
"read_as": "json"
},
"result": "password_storage"
}
},
{
"define_var": {
"call": "file.read",
"args": {
"input_path": "examples/array.csv",
"read_as": "csv"
},
"result": "array_var"
}
},
{
"define": {
"assign": [
{
"array": "${array_var.array}"
},
{
"result": ""
},
{
"i": 0
}
]
}
},
{
"check_condition": {
"switch": [
{
"condition": "${len(array) > i}",
"next": "iterate"
}
],
"next": "exit_loop"
}
},
{
"iterate": {
"assign": [
{
"result": "${result + array[i]}"
},
{
"i": "${i+1}"
}
],
"next": "write_file"
}
},
{
"write_file": {
"call": "file.write",
"args": {
"input_string": "${result}",
"output_path": "${\"output/templates/loop\" + string(i) + \".out\"}"
},
"next": "check_condition"
}
},
{
"exit_loop": {
"return": "${result}"
}
}
]