This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new b8851e0  [Feature-8017][Document] Add example and notice about task 
type Sub_process (#733)
b8851e0 is described below

commit b8851e0e85a8c571774047da154c827250d7fa70
Author: QuakeWang <[email protected]>
AuthorDate: Mon Mar 14 22:33:19 2022 +0800

    [Feature-8017][Document] Add example and notice about task type Sub_process 
(#733)
---
 docs/en-us/dev/user_doc/guide/task/sub-process.md |  50 +++++++++++++++++----
 docs/zh-cn/dev/user_doc/guide/resource.md         |   2 +-
 docs/zh-cn/dev/user_doc/guide/task/sub-process.md |  51 ++++++++++++++++++----
 img/tasks/demo/subprocess_task01.png              | Bin 0 -> 133613 bytes
 img/tasks/demo/subprocess_task02.png              | Bin 0 -> 180555 bytes
 img/tasks/demo/subprocess_task03.png              | Bin 0 -> 139031 bytes
 img/tasks/icons/sub_process.png                   | Bin 0 -> 692 bytes
 7 files changed, 84 insertions(+), 19 deletions(-)

diff --git a/docs/en-us/dev/user_doc/guide/task/sub-process.md 
b/docs/en-us/dev/user_doc/guide/task/sub-process.md
index f8ac1a5..86c0f7d 100644
--- a/docs/en-us/dev/user_doc/guide/task/sub-process.md
+++ b/docs/en-us/dev/user_doc/guide/task/sub-process.md
@@ -1,14 +1,46 @@
 # SubProcess
 
-- The sub-process node is to execute a certain external workflow definition as 
a task node.
-> Drag the 
![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SUB_PROCESS.png)
 task node in the toolbar to the drawing board, as shown in the following 
figure:
+## Overview
 
-<p align="center">
-   <img src="/img/sub-process-en.png" width="80%" />
- </p>
+The sub-process node is to execute a certain external workflow definition as a 
task node.
 
-- Node name: The node name in a workflow definition is unique
-- Run flag: identify whether this node can be scheduled normally
-- Descriptive information: describe the function of the node
+## Create Task
+
+- Click Project Management-Project Name-Workflow Definition, and click the 
"Create Workflow" button to enter the DAG editing page.
+- Drag <img src="/img/tasks/icons/sub_process.png" width="15"/> from the 
toolbar to the drawing board.
+
+## Task Parameter
+
+- Node name: The node name in a workflow definition is unique.
+- Run flag: Identifies whether this node can be scheduled normally, if it does 
not need to be executed, you can turn on the prohibition switch.
+- Descriptive information: describe the function of the node.
+- Task priority: When the number of worker threads is insufficient, they are 
executed in order from high to low, and when the priority is the same, they are 
executed according to the first-in first-out principle.
+- Worker grouping: Tasks are assigned to the machines of the worker group to 
execute. If Default is selected, a worker machine will be randomly selected for 
execution.
+- Environment Name: Configure the environment name in which to run the script.
 - Timeout alarm: Check the timeout alarm and timeout failure. When the task 
exceeds the "timeout period", an alarm email will be sent and the task 
execution will fail.
-- Sub-node: It is the workflow definition of the selected sub-process. Enter 
the sub-node in the upper right corner to jump to the workflow definition of 
the selected sub-process
\ No newline at end of file
+- Sub-node: It is the workflow definition of the selected sub-process. Enter 
the sub-node in the upper right corner to jump to the workflow definition of 
the selected sub-process.
+- Predecessor task: Selecting a predecessor task for the current task will set 
the selected predecessor task as upstream of the current task.
+
+## Task Example
+
+This example simulates a common task type, here we use a child node task to 
recall the [Shell](shell.md) to print out "hello world". This means that a 
shell task is executed as a child node.
+
+### Create Shell task
+
+Create a shell task to print "hello". And define the workflow for this as 
test_dag01.
+
+![subprocess_task01](/img/tasks/demo/subprocess_task01.png)
+
+## Create Sub_process task
+
+To use the sub_process, you need to create the  sub-node task, which is the 
shell task we created in the first step. Then, as shown in the diagram below, 
select the corresponding sub-node in the ⑤ position.
+
+![subprocess_task02](/img/tasks/demo/subprocess_task02.png)
+
+After creating the sub_process is complete, create a corresponding shell task 
for printing "world" and link the two together.Save the current workflow and 
run it to get the desired result.
+
+![subprocess_task03](/img/tasks/demo/subprocess_task03.png)
+
+## Notice
+
+When using sub_process to recall a sub-node task, you need to ensure that the 
defined sub-node is online, otherwise the sub_process workflow will not work 
properly.
diff --git a/docs/zh-cn/dev/user_doc/guide/resource.md 
b/docs/zh-cn/dev/user_doc/guide/resource.md
index 9fdefa9..66cee93 100644
--- a/docs/zh-cn/dev/user_doc/guide/resource.md
+++ b/docs/zh-cn/dev/user_doc/guide/resource.md
@@ -171,7 +171,7 @@ conf/common.properties
 
 【组内优先级】:在出现等待资源时,优先级高的任务会最先被master分发给worker执行,该部分数值越大,优先级越高。
 
-###  任务组的实现逻辑
+### 任务组的实现逻辑
 
 #### 获取任务组资源:
 
diff --git a/docs/zh-cn/dev/user_doc/guide/task/sub-process.md 
b/docs/zh-cn/dev/user_doc/guide/task/sub-process.md
index 231d620..1e5a989 100644
--- a/docs/zh-cn/dev/user_doc/guide/task/sub-process.md
+++ b/docs/zh-cn/dev/user_doc/guide/task/sub-process.md
@@ -1,14 +1,47 @@
 # 子流程节点
 
-- 子流程节点,就是把外部的某个工作流定义当做一个任务节点去执行。
-> 
拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SUB_PROCESS.png)任务节点到画板中,如下图所示:
+## 综述
 
-<p align="center">
-   <img src="/img/subprocess_edit.png" width="80%" />
- </p>
+子流程节点,就是把外部的某个工作流定义当做一个节点去执行。
 
-- 节点名称:一个工作流定义中的节点名称是唯一的
-- 运行标志:标识这个节点是否能正常调度
-- 描述信息:描述该节点的功能
+## 创建任务
+
+- 点击项目管理 -> 项目名称 -> 工作流定义,点击”创建工作流”按钮,进入 DAG 编辑页面:
+
+- 拖动工具栏的 <img src="/img/tasks/icons/sub_process.png" width="15"/> 任务节点到画板中。
+
+## 任务参数
+
+- 节点名称:设置任务的名称。一个工作流定义中的节点名称是唯一的。
+- 运行标志:标识这个节点是否能正常调度,如果不需要执行,可以打开禁止执行开关。
+- 描述:描述该节点的功能。
+- 任务优先级:worker 线程数不足时,根据优先级从高到低依次执行,优先级一样时根据先进先出原则执行。
+- Worker 分组:任务分配给 worker 组的机器执行,选择 Default 会随机选择一台 worker 机执行。
+- 环境名称:配置运行脚本的环境。
 - 超时告警:勾选超时告警、超时失败,当任务超过"超时时长"后,会发送告警邮件并且任务执行失败.
-- 子节点:是选择子流程的工作流定义,右上角进入该子节点可以跳转到所选子流程的工作流定义
\ No newline at end of file
+- 子节点:是选择子流程的工作流定义,右上角进入该子节点可以跳转到所选子流程的工作流定义。
+- 前置任务:选择当前任务的前置任务,会将被选择的前置任务设置为当前任务的上游。
+
+## 任务样例
+
+该样例模拟了常见的任务类型,这里我们使用子结点任务调用 [Shell](shell.md) 打印出 ”hello world“。即将一个 shell 
任务当作子结点来执行。
+
+### 创建 shell 任务
+
+创建一个 shell 任务,用于打印 “hello”。并为该工作流定义为 test_dag01。
+
+![subprocess_task01](/img/tasks/demo/subprocess_task01.png)
+
+### 创建 sub_process 任务
+
+在使用 sub_process 的过程中,需要创建所需的子结点任务,也就是我们第一步所创建的 shell 任务。然后如下图所示,在 ⑤ 
的位置选择对应的子结点即可。
+
+![subprocess_task02](/img/tasks/demo/subprocess_task02.png)
+
+创建 sub_process 完成之后,再创建一个对应的 shell 任务,用于打印 
“world”,并将二者连接起来。保存当前工作流,并上线运行,即可得到想要的结果。
+
+![subprocess_task03](/img/tasks/demo/subprocess_task03.png)
+
+## 注意事项
+
+在使用 sub_process 调用子结点任务的时候,需要保证定义的子结点为上线状态,否则 sub_process 的工作流无法正常运行。
diff --git a/img/tasks/demo/subprocess_task01.png 
b/img/tasks/demo/subprocess_task01.png
new file mode 100644
index 0000000..518620a
Binary files /dev/null and b/img/tasks/demo/subprocess_task01.png differ
diff --git a/img/tasks/demo/subprocess_task02.png 
b/img/tasks/demo/subprocess_task02.png
new file mode 100644
index 0000000..e80f9af
Binary files /dev/null and b/img/tasks/demo/subprocess_task02.png differ
diff --git a/img/tasks/demo/subprocess_task03.png 
b/img/tasks/demo/subprocess_task03.png
new file mode 100644
index 0000000..636cbb6
Binary files /dev/null and b/img/tasks/demo/subprocess_task03.png differ
diff --git a/img/tasks/icons/sub_process.png b/img/tasks/icons/sub_process.png
new file mode 100644
index 0000000..fb12061
Binary files /dev/null and b/img/tasks/icons/sub_process.png differ

Reply via email to