@Override
    public WorkflowProcess defineProcess() {
        // Configuration process
        WorkflowProcess process = new WorkflowProcess();
        process.setName(getProcessName().name());
        process.setType(getProcessName().getDisplayName());
        process.setDisplayName(getProcessName().getDisplayName());
        process.setFormClass(GroupResourceProcessForm.class);
        process.setVersion(1);
        process.setHidden(1);

        // Set up the listener
        process.addListener(updateGroupListener);
        process.addListener(updateGroupCompleteListener);
        process.addListener(updateGroupFailedListener);

        // Start node
        StartEvent startEvent = new StartEvent();
        process.setStartEvent(startEvent);

        // Stop Source
        ServiceTask stopSourceTask = new ServiceTask();
        stopSourceTask.setName("StopSource");
        stopSourceTask.setDisplayName("Group-StopSource");
        stopSourceTask.setServiceTaskType(ServiceTaskType.STOP_SOURCE);
        stopSourceTask.setListenerFactory(groupTaskListenerFactory);
        process.addTask(stopSourceTask);

        // Stop Sort
        ServiceTask stopSortTask = new ServiceTask();
        stopSortTask.setName("StopSort");
        stopSortTask.setDisplayName("Group-StopSort");
        stopSortTask.setServiceTaskType(ServiceTaskType.STOP_SORT);
        stopSortTask.setListenerFactory(groupTaskListenerFactory);
        process.addTask(stopSortTask);

        // End node
        EndEvent endEvent = new EndEvent();
        process.setEndEvent(endEvent);

        startEvent.addNext(stopSourceTask);
        stopSourceTask.addNext(stopSortTask);
        stopSortTask.addNext(endEvent);

        return process;
    }
Suspend workflow definition for inlong group
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/workflow/group/SuspendGroupWorkflowDefinition.java