提交 e26ce439 编写于 作者: zcdtk's avatar zcdtk

Merge remote-tracking branch 'core/dev' into dev

......@@ -713,11 +713,17 @@ export class EntityServiceBase {
* @memberof EntityServiceBase
*/
public async WFSubmit(context: any = {}, data: any = {}, wfdata?: any): Promise<HttpResponse> {
if (wfdata && Object.keys(wfdata).length !== 0) {
const _data: any = { ...{ activedata: data }, wfdata };
return Http.getInstance().post(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/${data[this.key]}/tasks/${wfdata['taskId']}`, _data);
try {
let res: any;
if (wfdata && Object.keys(wfdata).length !== 0) {
const _data: any = { ...{ activedata: data }, wfdata };
res = await this.http.post(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/${data[this.key]}/tasks/${wfdata['taskId']}`, _data);
}
res = await this.http.post(`/${this.dePath}/${context[this.key]}/wfsubmit`, data);
return res;
} catch (res) {
return new HttpResponse(res.status, null);
}
return this.http.post(`/${this.dePath}/${context[this.key]}/wfsubmit`, data);
}
/**
......@@ -725,11 +731,16 @@ export class EntityServiceBase {
*
* @param {*} [context={}]
* @param {*} [data={}]
* @returns {Promise<any>}
* @returns {Promise<HttpResponse>}
* @memberof EntityServiceBase
*/
public async WFGetWFStep(context: any = {}, data: any = {}): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/process-definitions-nodes`);
public async WFGetWFStep(context: any = {}, data: any = {}): Promise<HttpResponse> {
try {
const res = await this.http.get(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/process-definitions-nodes`);
return res;
} catch (res) {
return new HttpResponse(res.status, null);
}
}
/**
......@@ -737,11 +748,16 @@ export class EntityServiceBase {
*
* @param {*} [context={}]
* @param {*} [data={}]
* @returns {Promise<any>}
* @returns {Promise<HttpResponse>}
* @memberof EntityServiceBase
*/
public async GetWFLink(context: any = {}, data: any = {}): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/${context[this.deName]}/usertasks/${data['taskDefinitionKey']}/ways`);
public async GetWFLink(context: any = {}, data: any = {}): Promise<HttpResponse> {
try {
const res = await this.http.get(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/${context[this.deName]}/usertasks/${data['taskDefinitionKey']}/ways`);
return res;
} catch (res) {
return new HttpResponse(res.status, null);
}
}
/**
......@@ -749,11 +765,16 @@ export class EntityServiceBase {
*
* @param {*} [context={}]
* @param {*} [data={}]
* @returns {Promise<any>}
* @returns {Promise<HttpResponse>}
* @memberof EntityServiceBase
*/
public async GetWFHistory(context: any = {}, data: any = {}): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/${context[this.deName]}/process-instances/alls/history`);
public async GetWFHistory(context: any = {}, data: any = {}): Promise<HttpResponse> {
try {
const res = await this.http.get(`/wfcore/${this.systemName}-app-${this.appName}/${this.dePath}/${context[this.deName]}/process-instances/alls/history`);
return res;
} catch (res) {
return new HttpResponse(res.status, null);
}
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册