import request from '@/utils/request.js'


/**
 * 开始实例流程
 * @param param
 * @returns {*}
 */
export function startProcessInstance(param) {
    return request({
        url: "/workflow/process/instance/start",
        method: "post",
        data: param
    })
}
export function restartProcessInstance(param) {
    return request({
        url: "/workflow/process/instance/restart",
        method: "post",
        data: param
    })
}

export function getAboutInstanceList(param) {
    return request({
        url: "/workflow/process/instance/about",
        method: "get",
        params: param
    })
}

export function getInitiatedInstanceList(param) {
    return request({
        url: "/workflow/process/instance/self",
        method: "get",
        params: param
    })
}

export function getInitiatedInstanceInfo(processInstanceId) {
    return request({
        url: "/workflow/process/instance/info/"+processInstanceId,
        method: "get",
    })
}


export function getInitiatedInstanceReInfo(instanceId) {
    return request({
        url: "/workflow/process/instance/re/info/"+instanceId,
        method: "get",
    })
}
