Modify the documentation that python task will not work properly when '\n' indicates the presence of a variable and needs to use 'repr(value)' (#15145)

Co-authored-by: yangyanxing <yangyanxing@360.cn>
Co-authored-by: xiangzihao <460888207@qq.com>
This commit is contained in:
kevinkelin 2023-11-15 09:30:37 +08:00 committed by GitHub
parent b8e942208e
commit 3149928cdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,9 @@ For example
![python_context_param](../../../../img/new_ui/dev/parameter/python_context_param.png)
Attention: When the variable value contains the `\n` identifier, such as ` value = "hello \n world" `, value needs to be carried out in a special way. You need to use `print('${setValue(key=%s)}' % repr(value))`, otherwise the argument cannot be passed to the subsequent flow.
#### Pass parameter from SubProcess task to downstream
In the workflow definition of the subprocess, define `OUT` direction parameters as output parameters, and these parameters can be passed to the downstream tasks of the subprocess node.

View File

@ -91,6 +91,10 @@ Node_mysql 运行结果如下:
![python_context_param](../../../../img/new_ui/dev/parameter/python_context_param.png)
注意: 当变量 value 中含有 `\n` 标识,如 `value = "hello \n world"` 则需要将 value 进行特殊进行,需要使用 `print('${setValue(key=%s)}' % repr(value))`, 否则参数无法传递到后面的流程。
#### SubProcess 任务传递参数
在子流程的工作流定义中定义方向是 OUT 的变量作为输出参数,可以将这些参数传递到子流程节点的下游任务。