Skip to content

Commit

Permalink
improvement 16586
Browse files Browse the repository at this point in the history
  • Loading branch information
SbloodyS committed Sep 5, 2024
1 parent fee4955 commit dff5cf8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions docs/configs/docsdev.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export default {
link: '/en-us/docs/dev/user_doc/guide/task/shell.html',
},
{
title: 'SubProcess',
link: '/en-us/docs/dev/user_doc/guide/task/sub-process.html',
title: 'SubWorkflow',
link: '/en-us/docs/dev/user_doc/guide/task/sub-workflow.html',
},
{
title: 'Dynamic',
Expand Down Expand Up @@ -822,8 +822,8 @@ export default {
link: '/zh-cn/docs/dev/user_doc/guide/task/shell.html',
},
{
title: 'SubProcess',
link: '/zh-cn/docs/dev/user_doc/guide/task/sub-process.html',
title: 'SubWorkflow',
link: '/zh-cn/docs/dev/user_doc/guide/task/sub-workflow.html',
},
{
title: 'Dynamic',
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/en/guide/parameter/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DolphinScheduler allows parameter transfer between tasks. Currently, transfer di
* [SQL](../task/sql.md)
* [Procedure](../task/stored-procedure.md)
* [Python](../task/python.md)
* [SubProcess](../task/sub-process.md)
* [SubProcess](../task/sub-workflow)
* [Kubernetes](../task/kubernetes.md)

When defining an upstream node, if there is a need to transmit the result of that node to a dependency related downstream node. You need to set an `OUT` direction parameter to [Custom Parameters] of the [Current Node Settings]. If it is a SubProcess node, there is no need to set a parameter in [Current Node Settings], but an `OUT` direction parameter needs to be set in the workflow definition of the subprocess.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SubProcess Node
# SubWorkflow Node

## Overview

The sub-process node is to execute an external workflow definition as a task node.
The sub-workflow node is to execute an external workflow definition as a task node.

## Create Task

- Click `Project Management -> Project Name -> Workflow Definition`, and click the `Create Workflow` button to enter the DAG editing page.
- Drag from the toolbar <img src="../../../../img/tasks/icons/sub_workflow.png" width="15"/> task node to canvas to create a new SubProcess task.
- Drag from the toolbar <img src="../../../../img/tasks/icons/sub_workflow.png" width="15"/> task node to canvas to create a new SubWorkflow task.

## Task Parameter

Expand All @@ -18,7 +18,7 @@ The sub-process node is to execute an external workflow definition as a task nod

| **Parameter** | **Description** |
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Child node | It is the workflow definition of the selected sub-process. Enter the child node in the upper right corner to jump to the workflow definition of the selected sub-process. |
| Child node | It is the workflow definition of the selected sub-workflow. Enter the child node in the upper right corner to jump to the workflow definition of the selected sub-workflow. |

## Task Example

Expand All @@ -28,17 +28,17 @@ This example simulates a common task type, here we use a child node task to reca

Create a shell task to print "hello" and define the workflow as `test_dag01`.

![subprocess_task01](../../../../img/tasks/demo/subprocess_task01.png)
![subworkflow_task01](../../../../img/tasks/demo/subworkflow_task01.png)

## Create the Sub_workflow task

To use the sub_workflow, you need to create the sub-node task, which is the workflow `test_dag01` we created in the first step. After that, as shown in the diagram below, select the corresponding sub-node in position ⑤.

![subprocess_task02](../../../../img/tasks/demo/subprocess_task02.png)
![subworkflow_task02](../../../../img/tasks/demo/subworkflow_task02.png)

After creating the sub_workflow, create a corresponding shell task for printing "world" and link both together. Save the current workflow and run it to get the expected result.

![subprocess_task03](../../../../img/tasks/demo/subprocess_task03.png)
![subworkflow_task03](../../../../img/tasks/demo/subworkflow_task03.png)

## Note

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/zh/guide/parameter/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DolphinScheduler 允许在任务间进行参数传递,目前传递方向仅支
* [SQL](../task/sql.md)
* [Procedure](../task/stored-procedure.md)
* [Python](../task/python.md)
* [SubProcess](../task/sub-process.md)
* [SubProcess](../task/sub-workflow)
* [Kubernetes](../task/kubernetes.md)

当定义上游节点时,如果有需要将该节点的结果传递给有依赖关系的下游节点,需要在【当前节点设置】的【自定义参数】设置一个方向是 OUT 的变量。如果是 SubProcess 节点无需在【当前节点设置】中设置变量,需要在子流程的工作流定义中设置一个方向是 OUT 的变量。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@

创建一个 shell 任务,用于打印 “hello”。并为该工作流定义为 test_dag01。

![subprocess_task01](../../../../img/tasks/demo/subprocess_task01.png)
![subworkflow_task01](../../../../img/tasks/demo/subworkflow_task01.png)

### 创建 sub_workflow 任务

在使用 sub_workflow 的过程中,需要创建所需的子结点任务,也就是我们第一步所创建的 test_dag01 工作流。然后如下图所示,在 ⑤ 的位置选择对应的子结点即可。

![subprocess_task02](../../../../img/tasks/demo/subprocess_task02.png)
![subworkflow_task02](../../../../img/tasks/demo/subworkflow_task02.png)

创建 sub_workflow 完成之后,再创建一个对应的 shell 任务,用于打印 “world”,并将二者连接起来。保存当前工作流,并上线运行,即可得到想要的结果。

![subprocess_task03](../../../../img/tasks/demo/subprocess_task03.png)
![subworkflow_task03](../../../../img/tasks/demo/subworkflow_task03.png)

## 注意事项

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit dff5cf8

Please sign in to comment.