You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/05/18 09:44:06 UTC

[GitHub] [dolphinscheduler] zhongjiajie commented on a diff in pull request #10045: [Docment][Feature] Refactor global parameter docment

zhongjiajie commented on code in PR #10045:
URL: https://github.com/apache/dolphinscheduler/pull/10045#discussion_r875683806


##########
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 demo uses a shell task to print out the previous day's date.

Review Comment:
   ```suggestion
   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.
   ```



##########
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 demo uses a shell task to print out the previous day's date.
 
-<p align="center">
-   <img src="/img/supplement_global_parameter_en.png" width="80%" />
- </p>
+### 1. Create a Shell task

Review Comment:
   we should avoid use number in title
   ```suggestion
   ### Create a Shell task
   ```



##########
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 demo uses a shell task to print out the previous day's date.
 
-<p align="center">
-   <img src="/img/supplement_global_parameter_en.png" width="80%" />
- </p>
+### 1. 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)
+
+### 2. Save the workflow and set global parameters

Review Comment:
   ```suggestion
   ### Save the workflow and set global parameters
   ```



##########
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 demo uses a shell task to print out the previous day's date.
 
-<p align="center">
-   <img src="/img/supplement_global_parameter_en.png" width="80%" />
- </p>
+### 1. 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)
+
+### 2. Save the workflow and set global parameters
+
+The global parameter configuration method is as follows: On the workflow definition page, click the plus sign to the right of "Set Global", fill in the corresponding variable name and corresponding value, and save it. As shown below:
+
+![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.
+
+### 3. In task instance view execution result

Review Comment:
   ```suggestion
   ### In task instance view execution result
   ```



##########
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>
+### 1、创建 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)
+
+### 2、保存工作流,并设置全局参数

Review Comment:
   ```suggestion
   ### 保存工作流,并设置全局参数
   ```



##########
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>
+### 1、创建 Shell 任务

Review Comment:
   ```suggestion
   ### 创建 Shell 任务
   ```



##########
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>
+### 1、创建 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)
+
+### 2、保存工作流,并设置全局参数
+
+全局参数配置方式如下:在工作流定义页面,点击“设置全局”右边的加号,填写对应的变量名称和对应的值,保存即可。如下图所示:
+
+![global-parameter02](/img/new_ui/dev/parameter/global_parameter02.png)
+
+> 注:这里定义的 dt 参数可以被其它任一节点的局部参数引用。
+
+### 3、任务实例查看执行结果

Review Comment:
   ```suggestion
   ### 任务实例查看执行结果
   ```



##########
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 demo uses a shell task to print out the previous day's date.
 
-<p align="center">
-   <img src="/img/supplement_global_parameter_en.png" width="80%" />
- </p>
+### 1. 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)
+
+### 2. Save the workflow and set global parameters
+
+The global parameter configuration method is as follows: On the workflow definition page, click the plus sign to the right of "Set Global", fill in the corresponding variable name and corresponding value, and save it. As shown below:

Review Comment:
   ```suggestion
   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
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org