public static Map<Long, String> queryAllProcessDef(String url, String token) {
        Map<String, String> header = buildHeader(token);
        try {
            JsonObject response = executeHttpRequest(url, GET, new HashMap<>(), header);

            Map<Long, String> processDef =
                    StreamSupport.stream(response.get(DS_RESPONSE_DATA).getAsJsonArray().spliterator(), false)
                            .map(JsonElement::getAsJsonObject)
                            .collect(Collectors.toMap(
                                    jsonObject -> jsonObject.get(DS_CODE).getAsLong(),
                                    jsonObject -> jsonObject.get(DS_PROCESS_NAME).getAsString()));

            LOGGER.info("Query all process definition success, processes info: {}", processDef);
            return processDef;

        } catch (JsonParseException e) {
            LOGGER.error("JsonParseException during query all process definition", e);
            throw new DolphinScheduleException(
                    JSON_PARSE_ERROR,
                    String.format("Error querying all process definitions at URL: %s", url));

        } catch (DolphinScheduleException e) {
            LOGGER.info("Query all process definition failed: {}", e.getMessage());
            throw new DolphinScheduleException(
                    PROCESS_DEFINITION_QUERY_FAILED,
                    String.format("Error querying all process definitions at URL: %s", url));
        }

    }
Query all process definition in project

@param url The base URL of the DolphinScheduler API.
@param token The authentication token to be used in the request header.
@return Map of all the process definition
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java