You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/05/23 07:01:21 UTC
[dolphinscheduler] 32/33: [doc] Refactor global parameter docment (#10045)
This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch 3.0.0-beta-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit e737d8ee30cfaf38cb8d2285ac033b3eb405cce6
Author: QuakeWang <45...@users.noreply.github.com>
AuthorDate: Mon May 23 10:46:11 2022 +0800
[doc] Refactor global parameter docment (#10045)
(cherry picked from commit 0abfb5e74485d6658d8db33d92549d1f469ab752)
---
docs/docs/en/guide/parameter/global.md | 28 +++++++++++++-------
docs/docs/zh/guide/parameter/global.md | 29 ++++++++++++++-------
docs/img/local_parameter.png | Bin 42275 -> 0 bytes
docs/img/local_parameter_en.png | Bin 72458 -> 0 bytes
.../new_ui/dev/parameter/global_parameter01.png | Bin 0 -> 148147 bytes
.../new_ui/dev/parameter/global_parameter02.png | Bin 0 -> 141585 bytes
.../new_ui/dev/parameter/global_parameter03.png | Bin 0 -> 312613 bytes
docs/img/supplement_global_parameter.png | Bin 295951 -> 0 bytes
docs/img/supplement_global_parameter_en.png | Bin 124936 -> 0 bytes
9 files changed, 39 insertions(+), 18 deletions(-)
diff --git a/docs/docs/en/guide/parameter/global.md b/docs/docs/en/guide/parameter/global.md
index bd4b25d47b..882b1098d2 100644
--- a/docs/docs/en/guide/parameter/global.md
+++ b/docs/docs/en/guide/parameter/global.md
@@ -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)
diff --git a/docs/docs/zh/guide/parameter/global.md b/docs/docs/zh/guide/parameter/global.md
index 57716d8afe..3d91c165ff 100644
--- a/docs/docs/zh/guide/parameter/global.md
+++ b/docs/docs/zh/guide/parameter/global.md
@@ -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获得的值
diff --git a/docs/img/local_parameter.png b/docs/img/local_parameter.png
deleted file mode 100644
index 5bc6c097c6..0000000000
Binary files a/docs/img/local_parameter.png and /dev/null differ
diff --git a/docs/img/local_parameter_en.png b/docs/img/local_parameter_en.png
deleted file mode 100644
index 2d72f03cb8..0000000000
Binary files a/docs/img/local_parameter_en.png and /dev/null differ
diff --git a/docs/img/new_ui/dev/parameter/global_parameter01.png b/docs/img/new_ui/dev/parameter/global_parameter01.png
new file mode 100644
index 0000000000..f2d6c0303c
Binary files /dev/null and b/docs/img/new_ui/dev/parameter/global_parameter01.png differ
diff --git a/docs/img/new_ui/dev/parameter/global_parameter02.png b/docs/img/new_ui/dev/parameter/global_parameter02.png
new file mode 100644
index 0000000000..326f4954a2
Binary files /dev/null and b/docs/img/new_ui/dev/parameter/global_parameter02.png differ
diff --git a/docs/img/new_ui/dev/parameter/global_parameter03.png b/docs/img/new_ui/dev/parameter/global_parameter03.png
new file mode 100644
index 0000000000..2308b6a752
Binary files /dev/null and b/docs/img/new_ui/dev/parameter/global_parameter03.png differ
diff --git a/docs/img/supplement_global_parameter.png b/docs/img/supplement_global_parameter.png
deleted file mode 100644
index 2fd7d17cc6..0000000000
Binary files a/docs/img/supplement_global_parameter.png and /dev/null differ
diff --git a/docs/img/supplement_global_parameter_en.png b/docs/img/supplement_global_parameter_en.png
deleted file mode 100644
index f026f71e2e..0000000000
Binary files a/docs/img/supplement_global_parameter_en.png and /dev/null differ