diff --git a/docs/docs/en/guide/parameter/global.md b/docs/docs/en/guide/parameter/global.md index bd4b25d47b26..882b1098d22b 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. -
- -
+### Create a Shell task -- -
+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 57716d8afe97..3d91c165ff7a 100644 --- a/docs/docs/zh/guide/parameter/global.md +++ b/docs/docs/zh/guide/parameter/global.md @@ -2,18 +2,29 @@ ## 作用域 -在工作流定义页面配置的参数,作用于该工作流中全部的任务 +全局参数是指针对**整个工作流**的所有任务节点都有效的参数,在工作流定义页面配置。 ## 使用方式 -全局参数配置方式如下:在工作流定义页面,点击“设置全局”右边的加号,填写对应的变量名称和对应的值,保存即可 +具体的使用方式可结合实际的生产情况而定,这里演示为使用 Shell 任务打印出前一天的日期。 -- -
+### 创建 Shell 任务 -- -
+创建一个 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 5bc6c097c665..000000000000 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 2d72f03cb88e..000000000000 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 000000000000..f2d6c0303cd7 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 000000000000..326f4954a206 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 000000000000..2308b6a7527c 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 2fd7d17cc6d8..000000000000 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 f026f71e2ee4..000000000000 Binary files a/docs/img/supplement_global_parameter_en.png and /dev/null differ