public static void delete(String url, String token, long code) {
        try {
            Map<String, String> header = buildHeader(token);

            String requestUrl = url + "/" + code;
            for (int retryTime = 1; retryTime <= DS_DEFAULT_RETRY_TIMES; retryTime++) {
                JsonObject response = executeHttpRequest(requestUrl, DELETE, new HashMap<>(), header);
                if (response.get(DS_CODE).getAsInt() == PROCESS_DEFINITION_IN_USED_ERROR) {

                    LOGGER.warn(
                            "Retrying for current retry time ={}, maximum retry count={}, code={}, url={}, after {} ms...",
                            retryTime, DS_DEFAULT_RETRY_TIMES, code, url, DS_DEFAULT_WAIT_MILLS);
                    Thread.sleep(DS_DEFAULT_WAIT_MILLS);

                } else if (response.get(DS_SUCCESS).getAsBoolean()) {
                    LOGGER.info("Delete process or project success, response data: {}", response);
                    return;
                } else {
                    LOGGER.warn("Delete process or project failed, response data: {}", response);
                }

            }
            LOGGER.error(
                    "Maximum retry attempts reached for deleting process or project. URL: {}, Code: {}",
                    url, code);
            throw new DolphinScheduleException(
                    DELETION_FAILED,
                    String.format("Failed to delete after %d retries. Code: %d at URL: %s",
                            DS_DEFAULT_RETRY_TIMES, code, url));

        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            LOGGER.error("Thread interrupted while retrying delete process or project: ", e);
            throw new DolphinScheduleException(
                    DELETION_FAILED,
                    String.format("Thread interrupted while retrying delete for code: %d at URL: %s", code, url));
        } catch (JsonParseException e) {
            LOGGER.error("JsonParseException during deleting process or project", e);
            throw new DolphinScheduleException(
                    JSON_PARSE_ERROR,
                    String.format("Error deleting process or project with code: %d at URL: %s", code, url));

        } catch (DolphinScheduleException e) {
            LOGGER.error("Error deleting process or project for code={}, url={} ", code, url, e);
            throw new DolphinScheduleException(
                    DELETION_FAILED,
                    String.format("Error deleting process or project with code: %d at URL: %s", code, url));
        }
    }
Delete the process definition in DolphinScheduler.

@param url The URL to delete the project or process definition.
@param token          The authentication token to be used in the request header.
@param code          The project code or process definition code
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java