import createAxios from '@/utils/request'

import { BPM_BOOT } from '@/utils/constantRequest'

const MAPPING_PATH = BPM_BOOT + '/bpm/processDefinition'

/**
 * 通过任务
 */
export const approveTask = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/approve',
        method: 'POST',
        data: data
    })
}


/**
 * 获得流程定义
 */
export const getProcessDefinitionById = (id: string, key: string) => {
    return createAxios({
        url: MAPPING_PATH + '/get?id=' + id + '&key=' + key,
        method: 'GET'
    })
}
