public static boolean onlineScheduleForProcessDef(String scheduleUrl, int scheduleId,
            String token) {
        try {
            Map<String, String> header = buildHeader(token);

            String url = scheduleUrl + "/" + scheduleId + DS_ONLINE_URL;
            JsonObject response = executeHttpRequest(url, POST, new HashMap<>(), header);
            LOGGER.info("online schedule for process definition success, response data: {}", response);

            if (response != null && !response.get(DS_RESPONSE_DATA).isJsonNull()) {
                return response.get(DS_RESPONSE_DATA).getAsBoolean();
            }
            return false;

        } catch (JsonParseException e) {
            LOGGER.error("JsonParseException during online schedule", e);
            throw new DolphinScheduleException(
                    JSON_PARSE_ERROR,
                    String.format("Error online schedule with ID: %d online at URL: %s", scheduleId, scheduleUrl));

        } catch (DolphinScheduleException e) {
            throw new DolphinScheduleException(
                    SCHEDULE_ONLINE_FAILED,
                    String.format("Error online schedule with ID: %d online at URL: %s", scheduleId, scheduleUrl));
        }
    }
Online the schedule for process definition in DolphinScheduler.

@param scheduleUrl The URL to online the schedule for process definition.
@param scheduleId The ID of the schedule of process definition.
@param token          The authentication token to be used in the request header.
@return whether online is succeeded
inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java