SWML
Write communication applications, call flows and AI agents
Return from execute or exit script.
execute
The return value.
No specific parameters. The value can be set to any type.
any
Set by the method:
1version: 1.0.0 2sections: 3 main: 4 - return: 1
1version: 1.0.0 2sections: 3 main: 4 - execute: 5 dest: fn_that_returns 6 - play: 7 url: 'say: returned ${return_value[0].a}' 8 fn_that_returns: 9 - return: 10 - a: 1 11 - b: 2
on_return
1version: 1.0.0 2sections: 3 main: 4 - execute: 5 dest: fn_that_returns 6 on_return: 7 - play: 8 url: 'say: returned ${return_value}' 9 fn_that_returns: 10 - return: hello
1version: 1.0.0 2sections: 3 main: 4 - return: {}
Additional examples are available in the introduction.