@Override
    public ListenerResult listen(WorkflowContext context) throws WorkflowListenerException {
        ApplyConsumeProcessForm processForm = (ApplyConsumeProcessForm) context.getProcessForm();

        InlongConsumeEntity consumeEntity = consumeMapper.selectById(processForm.getConsumeInfo().getId());
        consumeEntity.setStatus(ConsumeStatus.APPROVE_CANCELED.getCode());
        int rowCount = consumeMapper.updateByIdSelective(consumeEntity);
        if (rowCount != InlongConstants.AFFECTED_ONE_ROW) {
            log.error("inlong consume has already updated, id={}, curVersion={}",
                    consumeEntity.getId(), consumeEntity.getVersion());
            throw new BusinessException(ErrorCodeEnum.CONFIG_EXPIRED);
        }
        return ListenerResult.success("Application process is cancelled");
    }
Inlong consume process cancellation event listener
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/listener/consume/apply/CancelConsumeProcessListener.java