-
Notifications
You must be signed in to change notification settings - Fork 5k
[Feature-17501][Worker] Generic Third-party System API Connector for REST-based Task Scheduling #17779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dill21yu
wants to merge
23
commits into
apache:dev
Choose a base branch
from
dill21yu:thirdparty-system-connector
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,273
−26
Open
[Feature-17501][Worker] Generic Third-party System API Connector for REST-based Task Scheduling #17779
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9c6cf15
[Feature-17501]Third-party System API Connector for REST-based Task …
edce44e
[Feature-17501]Generic Third-party System API Connector for REST-base…
b1ee992
Merge branch 'dev' into thirdparty-system-connector
SbloodyS 469bc54
[Feature-17501]simplify and modernize third-party connector
1dbb678
[Feature-17501]Third-party System API Connector fix CI error
895f440
Merge remote-tracking branch 'github/thirdparty-system-connector' int…
3a5c842
Merge branch 'dev' into thirdparty-system-connector
dill21yu b311bef
Merge branch 'dev' into thirdparty-system-connector
SbloodyS 7a37ab2
[Feature-17501]Third-party System APl Connector fix UI CI error
deed2ba
[Feature-17501]Third-party System APl Connector fix UI CI error2
0690673
[Feature-17501]Third-party System APl Connector fix CI error -revert …
ce6d068
Merge remote-tracking branch 'github/thirdparty-system-connector' int…
046d20d
Merge branch 'dev' into thirdparty-system-connector
dill21yu 16ea2b5
Merge branch 'dev' into thirdparty-system-connector
dill21yu 38a1f34
Merge branch 'dev' into thirdparty-system-connector
dill21yu 00200c7
Merge branch 'dev' into thirdparty-system-connector
ruanwenjun 5df5bce
Merge branch 'dev' into thirdparty-system-connector
SbloodyS 3ad5473
[Feature-17501]Third-party System APl Connector fix UI CI error remov…
daa86ce
[Feature-17501]Third-party System APl Connector fix UI CI error pnpm …
3123356
Merge branch 'dev' into thirdparty-system-connector
dill21yu ca52f4a
[Feature-17501]Third-party System APl Connector add unit test
a1f3565
Merge remote-tracking branch 'origin/thirdparty-system-connector' int…
c735e14
[Feature-17501]Third-party System APl Connector fix sonarqubecloud
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # External System Task | ||
|
|
||
| The External System task is used to call external system APIs and integrate with third-party systems. This task type allows DolphinScheduler to interact with external services, execute remote operations, and retrieve results. | ||
|
|
||
| ## Introduction | ||
|
|
||
| External System tasks provide a way to execute operations in external systems through REST APIs calls. These tasks can be configured to authenticate with external systems, send requests, and process responses. | ||
|
|
||
| ## Configuration | ||
|
|
||
| - **Task Name**: The name of the task. | ||
| - **Task Type**: Select "External System" from the task type list. | ||
| - **External System**: Select the external system to connect to. | ||
| - **API Endpoint**: The API endpoint to call in the external system. | ||
| - **Authentication**: Configure authentication parameters for the external system. | ||
| - **Request Method**: The HTTP method to use (GET, POST, PUT, DELETE, etc.). | ||
| - **Request Parameters**: Parameters to send with the request. | ||
| - **Response Processing**: How to process the response from the external system. | ||
|
|
||
| ## Example | ||
|
|
||
|  | ||
|
|
||
| This is an example of how to configure an External System task in the workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # 外部系统任务 | ||
|
|
||
| 外部系统任务用于调用外部系统API并与第三方系统集成。这种任务类型允许DolphinScheduler与外部服务交互,执行远程操作并检索结果。 | ||
|
|
||
| ## 介绍 | ||
|
|
||
| 外部系统任务提供了一种通过REST APIs调用与外部系统交互的方式。这些任务可以配置为对第三方系统进行身份验证,发送请求并处理响应。 | ||
|
|
||
| ## 配置 | ||
|
|
||
| - **任务名称**: 任务的名称。 | ||
| - **任务类型**: 从任务类型列表中选择"外部系统"。 | ||
| - **外部系统**: 选择要连接的外部系统。 | ||
| - **API端点**: 在外部系统中调用的API端点。 | ||
| - **认证**: 配置外部系统的认证参数。 | ||
| - **请求方法**: 要使用的HTTP方法(GET、POST、PUT、DELETE等)。 | ||
| - **请求参数**: 与请求一起发送的参数。 | ||
| - **响应处理**: 如何处理来自外部系统的响应。 | ||
|
|
||
| ## 示例 | ||
|
|
||
|  | ||
|
|
||
| 这是在工作流程中配置外部系统任务的示例。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...pi/src/main/java/org/apache/dolphinscheduler/api/controller/ExternalSystemController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.dolphinscheduler.api.controller; | ||
|
|
||
| import static org.apache.dolphinscheduler.api.enums.Status.QUERY_EXTERNAL_SYSTEM_ERROR; | ||
|
|
||
| import org.apache.dolphinscheduler.api.exceptions.ApiException; | ||
| import org.apache.dolphinscheduler.api.service.ExternalSystemService; | ||
| import org.apache.dolphinscheduler.api.utils.Result; | ||
| import org.apache.dolphinscheduler.common.constants.Constants; | ||
| import org.apache.dolphinscheduler.dao.entity.ExternalSystemTaskQuery; | ||
| import org.apache.dolphinscheduler.dao.entity.User; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.http.HttpStatus; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.RequestAttribute; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RequestParam; | ||
| import org.springframework.web.bind.annotation.ResponseStatus; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Operation; | ||
| import io.swagger.v3.oas.annotations.Parameter; | ||
| import io.swagger.v3.oas.annotations.tags.Tag; | ||
|
|
||
| @Tag(name = "EXTERNAL_SYSTEM_TAG") | ||
| @RestController | ||
| @RequestMapping("external-systems") | ||
| public class ExternalSystemController extends BaseController { | ||
|
|
||
| @Autowired | ||
| private ExternalSystemService externalSystemService; | ||
|
|
||
| @Operation(summary = "queryExternalSystemTasks", description = "QUERY_EXTERNAL_SYSTEM_TASKS_NOTES") | ||
| @GetMapping(value = "/queryExternalSystemTasks") | ||
| @ResponseStatus(HttpStatus.OK) | ||
| @ApiException(QUERY_EXTERNAL_SYSTEM_ERROR) | ||
| public Result<List<ExternalSystemTaskQuery>> queryExternalSystemTasks(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser, | ||
| @RequestParam("externalSystemId") Integer externalSystemId) { | ||
| List<ExternalSystemTaskQuery> result = | ||
| externalSystemService.queryExternalSystemTasks(loginUser, externalSystemId); | ||
| return Result.success(result); | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...uler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExternalSystemService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.dolphinscheduler.api.service; | ||
|
|
||
| import org.apache.dolphinscheduler.dao.entity.ExternalSystemTaskQuery; | ||
| import org.apache.dolphinscheduler.dao.entity.User; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| public interface ExternalSystemService { | ||
|
|
||
| List<ExternalSystemTaskQuery> queryExternalSystemTasks(User loginUser, int externalSystemId); | ||
|
|
||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.