import request from '@/utils/request'
import { flowablePrefix } from '@/settings'

//查询已部署流程数据
export function deployedQuery (data) {
    return request({
        url: `${flowablePrefix}/V1/flowDefinitionManagement/deployedQuery`,
        method: 'post',
        data: data,
        requestType: 'json',
    })
}

//流程定义启用
export function processDefStart (data) {
    return request({
        url: `${flowablePrefix}/V1/flowDefinitionManagement/startusing`,
        method: 'post',
        data: data,
        requestType: 'json',
    })
}

//流程定义挂起
export function processDefStop (data) {
    return request({
        url: `${flowablePrefix}/V1/flowDefinitionManagement/stopusing`,
        method: 'post',
        data: data,
        requestType: 'json',
    })
}



/**
 * 流程实例查询
 * @param {*} data 
 */
export function queryInstanceApi (data) {
    return request({
        url: `${flowablePrefix}/V1/flowInstancesManagement/query`,
        method: 'post',
        data: data,
        requestType: 'json'
    })
}