feat:流程-流程实例的版本问题

1.流程变更后,新旧流程按版本执行,按各种版本的流程定义和流程配置继续流转
2.可以切换流程实例的版本
This commit is contained in:
lvjunzhao
2025-02-25 18:42:40 +08:00
parent 2850e8abf5
commit 2d240ccf0c
6 changed files with 399 additions and 23 deletions

View File

@ -4,6 +4,7 @@ import {
WorkflowPageParams,
WorkflowPageResult,
ChangeResultModel,
WorkflowPageModel,
} from './model/index';
import { defHttp } from '/@/utils/http/axios';
@ -22,6 +23,7 @@ enum Api {
HistoryList = '/workflow/schema-history/list',
HistorySetCurrent = '/workflow/schema-history/set-current',
PreviewProcess = '/workflow/execute/preview',
UpdateVersion = '/workflow/schema/updateVersion',
}
/**
* @description: 导出流程设计
@ -51,7 +53,19 @@ export async function getDesignPage(params: WorkflowPageParams, mode: ErrorMessa
},
);
}
/**
* @description: 查询Workflow全量
*/
export async function getDesignList(mode: ErrorMessageMode = 'modal') {
return defHttp.get<Array<WorkflowPageModel>>(
{
url: Api.List,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 获取Workflow信息
*/
@ -191,3 +205,20 @@ export async function getPreviewProcess(schemaId: string, mode: ErrorMessageMode
},
);
}
/**
* updateVersion 更新流程
*/
export async function updateProcessVersionApi(
updateVersionDto: Recordable,
mode: ErrorMessageMode = 'modal',
) {
return defHttp.post<boolean>(
{
url: Api.UpdateVersion,
params: updateVersionDto,
},
{
errorMessageMode: mode,
},
);
}