package ink.wgink.module.activiti.service.activiti;

import com.alibaba.fastjson.JSONObject;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IActivitiModelService
 * @Description: 流程模型
 * @Author: WangGeng
 * @Date: 2021/7/12 22:01
 * @Version: 1.0
 **/
public interface IActivitiModelService {

    void saveModel(String modelId, String name, String description, String json_xml, String svg_xml) throws Exception;

    JSONObject getEditorJson(String modelId) throws UnsupportedEncodingException;

    JSONObject getStencilset() throws IOException;

    /**
     * 查看部署流程图
     *
     * @param response     响应
     * @param deploymentId 部署ID
     */
    void getProcessImage(HttpServletResponse response, String deploymentId);

    /**
     * 查看运行流程图
     *
     * @param response
     * @param processInstanceId
     */
    void getRuntimeProcessImage(HttpServletResponse response, String processInstanceId);
}
