未验证 提交 0abfb5e7 编写于 作者: Q QuakeWang 提交者: GitHub

[doc] Refactor global parameter docment (#10045)

上级 bd34e66b
......@@ -2,18 +2,28 @@
## Scope
The parameters defined on the process definition page can apply to all the scope of the process tasks.
Global parameters are parameters that are valid for all task nodes of the entire workflow. It can be configured on the workflow definition page.
## Usage
Usage of global parameters is: at the process define page, click the '+' beside the 'Set global' and fill in the key and value to save:
The specific use method can be determined according to the actual production situation. This example uses a shell task to print out the date value of yesterday.
<p align="center">
<img src="/img/supplement_global_parameter_en.png" width="80%" />
</p>
### Create a Shell task
<p align="center">
<img src="/img/local_parameter_en.png" width="80%" />
</p>
Create a shell task and enter `echo ${dt}` in the script content. In this case, dt is the global parameter we need to declare. As shown below:
The `global_bizdate` parameter defined here can be referenced by local parameters of any other task node, and set the value of `global_bizdate` by referencing the system parameter `system.biz.date`.
\ No newline at end of file
![global-parameter01](/img/new_ui/dev/parameter/global_parameter01.png)
### Save the workflow and set global parameters
You could follow this guide to set global parameter: On the workflow definition page, click the plus sign to the right of "Set Global", after filling in the variable name and value, then save it
![global-parameter02](/img/new_ui/dev/parameter/global_parameter02.png)
> Note: The dt parameter defined here can be referenced by the local parameters of any other node.
### In task instance view execution result
On the task instance page, you can check the log to verify the execution result of the task and determine whether the parameters are valid.
![global-parameter03](/img/new_ui/dev/parameter/global_parameter03.png)
......@@ -2,18 +2,29 @@
## 作用域
在工作流定义页面配置的参数,作用于该工作流中全部的任务
全局参数是指针对**整个工作流**的所有任务节点都有效的参数,在工作流定义页面配置。
## 使用方式
全局参数配置方式如下:在工作流定义页面,点击“设置全局”右边的加号,填写对应的变量名称和对应的值,保存即可
具体的使用方式可结合实际的生产情况而定,这里演示为使用 Shell 任务打印出前一天的日期。
<p align="center">
<img src="/img/supplement_global_parameter.png" width="80%" />
</p>
### 创建 Shell 任务
<p align="center">
<img src="/img/local_parameter.png" width="80%" />
</p>
创建一个 Shell 任务,并在脚本内容中输入 `echo ${dt}`。此时 dt 则为我们需要声明的全局参数。如下图所示:
![global-parameter01](/img/new_ui/dev/parameter/global_parameter01.png)
### 保存工作流,并设置全局参数
全局参数配置方式如下:在工作流定义页面,点击“设置全局”右边的加号,填写对应的变量名称和对应的值,保存即可。如下图所示:
![global-parameter02](/img/new_ui/dev/parameter/global_parameter02.png)
> 注:这里定义的 dt 参数可以被其它任一节点的局部参数引用。
### 任务实例查看执行结果
进入任务实例页面,可以通过查看日志,验证任务的执行结果,判断参数是否有效。
![global-parameter03](/img/new_ui/dev/parameter/global_parameter03.png)
这里定义的global_bizdate参数可以被其它任一节点的局部参数引用,并设置global_bizdate的value为通过引用系统参数system.biz.date获得的值
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册