/*
 * Copyright (c) 2023 codvision.com All Rights Reserved.
 */

package com.codvision.workflow.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.codvision.workflow.entity.WorkFlowSubData;

/**
 * @author hxl
 */
public interface WorkFlowSubDataService extends IService<WorkFlowSubData> {

    /**
     * 根据任务ID查询
     * @param taskId 任务ID
     * @return 表单数据
     */
    WorkFlowSubData getByTaskId(String taskId);

    /**
     * 更新表单数据
     * @param taskId 任务ID
     * @param jsonData 表单数据
     */
    void updateFormData(String taskId, String jsonData);

    /**
     * 根据流程实例ID删除所有数据
     * @param instanceId 流程实例ID
     */
    void delAllByInstanceId(String instanceId);
}
