public boolean startProcess(String clusterTag, String operator, boolean sync) {
        log.info("start cluster process for clusterTag={}, operator={}", clusterTag, operator);

        List<GroupFullInfo> groupFullInfoList = new ArrayList<>();
        LoginUserUtils.getLoginUser().getRoles().add(UserRoleCode.INLONG_SERVICE);
        groupFullInfoList.addAll(groupService.getGroupByClusterTag(clusterTag));
        groupFullInfoList.addAll(groupService.getGroupByBackUpClusterTag(clusterTag));
        Preconditions.expectTrue(CollectionUtils.isNotEmpty(groupFullInfoList),
                ErrorCodeEnum.GROUP_NOT_FOUND.getMessage());
        ClusterResourceProcessForm clusterResourceProcessForm = ClusterResourceProcessForm.getProcessForm(clusterTag,
                groupFullInfoList);
        LoginUserUtils.getLoginUser().getRoles().remove(UserRoleCode.INLONG_SERVICE);
        ProcessName processName = ProcessName.CREATE_CLUSTER_RESOURCE;
        if (sync) {
            WorkflowResult workflowResult = workflowService.start(processName, operator, clusterResourceProcessForm);
            ProcessStatus processStatus = workflowResult.getProcessInfo().getStatus();
            return processStatus == ProcessStatus.COMPLETED;
        } else {
            log.info("start cluster process for clusterTag={}, form={}", clusterTag, clusterResourceProcessForm);
            UserInfo userInfo = LoginUserUtils.getLoginUser();
            EXECUTOR_SERVICE.execute(
                    () -> workflowService.startAsync(processName, userInfo, clusterResourceProcessForm));
            return true;
        }
    }
Create cluster in synchronous/asynchronous way.
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterProcessService.java